| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use yii\behaviors\TimestampBehavior;
- use yii\db\ActiveRecord;
- /**
- * Class Cat
- * @package app\modules\models
- * @property integer $id
- * @property integer $store_id
- * @property integer $cat_id
- * @property string $name
- * @property string $pic_url
- * @property integer $is_delete
- * @property integer $status
- * @property integer $created_at
- * @property integer $updated_at
- * @property integer $is_default
- */
- class IntelligentScene extends ActiveRecord
- {
- /**
- * 分类是否显示:显示
- */
- const IS_SHOW_TRUE = 1;
- /**
- * 分类是否显示:不显示
- */
- const IS_SHOW_FALSE = 0;
- public function behaviors()
- {
- return [
- [
- // 自动更新创建和更新时间
- 'class' => TimestampBehavior::class,
- 'value' => time()
- ]
- ];
- }
- public static function tableName()
- {
- return '{{%intelligent_scene}}';
- }
- public function rules()
- {
- return [
- [['store_id', 'name', 'pic_url'], 'required'],
- [['store_id', 'created_at', 'updated_at', 'is_delete', 'status','cat_id','is_default'], 'integer'],
- [['name','pic_url'], 'string', 'max' => 255],
- [['is_default'], 'default', 'value' => 0],
- ];
- }
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => '商城id',
- 'name' => '场景名称',
- 'pic_url' => '场景图片',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- 'is_delete' => 'Is Delete',
- 'status' => '是否显示',
- 'cat_id' => '分类ID',
- 'is_default' => '是否是默认'
- ];
- }
- }
|