| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?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 $user_id
- * @property string $user_name
- * @property string $image
- * @property string $goods_ids
- * @property integer $created_at
- * @property integer $updated_at
- */
- class AccessoriesWorks 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 '{{%accessories_works}}';
- }
- public function rules()
- {
- return [
- [['store_id', 'image'], 'required'],
- [['store_id', 'created_at', 'user_id','updated_at'], 'integer'],
- [['user_name','image','goods_ids'], 'string', 'max' => 255],
- ];
- }
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => '商城id',
- 'user_id' => '用户ID',
- 'user_name' => '用户昵称',
- 'image' => '场景图片',
- 'goods_ids' => '关联商品ID',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间'
- ];
- }
- }
|