TimestampBehavior::class, 'createdAtAttribute' => 'create_time', 'updatedAtAttribute' => 'update_time', 'value' => function(){ return date('Y-m-d H:i:s'); } ], ]; } public function rules():array { return [ [['store_id','sort','status'],'integer'], ['name','string'], [['store_id','name'],'required'] ]; } public function attributeLabels():array { return [ 'store_id' => '商城ID', 'name' => '分类名称', 'sort' => '排序', 'status' => '状态' ]; } }