TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'], ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at' ] ] ]; } /** * {@inheritdoc} */ public function rules() { return [ [['store_id'], 'required'], [['store_id','updated_at', 'created_at', 'is_delete', 'type', 'room_id'], 'integer'], [['user_id', 'level_id'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'room_id' => '直播间ID', 'user_id' => '用户ID', 'level_id' => '会员等级ID', 'type' => '可见范围:0=所有人;1=指定用户;2=指定会员', 'is_delete' => '是否删除:0=否;1=是;', 'created_at' => '添加时间', 'updated_at' => 'Update Time', ]; } }