| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "{{%form}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property integer $goods_id
- * @property string $name
- * @property string $type
- * @property integer $required
- * @property string $default
- * @property string $tip
- * @property integer $sort
- * @property integer $is_delete
- * @property integer $created_at
- */
- class Form extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%form}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['store_id', 'required', 'sort', 'is_delete', 'created_at', 'goods_id'], 'integer'],
- [['name', 'type', 'default', 'tip'], 'string', 'max' => 255],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'name' => '名称',
- 'type' => '类型',
- 'required' => '必填项',
- 'default' => '默认值',
- 'tip' => '提示语',
- 'sort' => '排序',
- 'is_delete' => 'Is Delete',
- 'created_at' => 'Addtime',
- ];
- }
- public function beforeSave($insert)
- {
- $this->name = \yii\helpers\Html::encode($this->name);
- $this->tip = \yii\helpers\Html::encode($this->tip);
- $this->default = \yii\helpers\Html::encode($this->default);
- return parent::beforeSave($insert);
- }
- }
|