TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'], ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'] ] ] ]; } /** * @inheritdoc */ public function rules() { return [ [['id', 'type', 'times', 'is_delete', 'status', 'store_id', 'days'], 'integer'], [['name'], 'string'], [['created_at', 'updated_at'], 'safe'] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'status' => '状态', 'times' => '天数设置', 'type' => '时效设置', 'name' => '规则名称', 'created_at' => '创建时间', 'updated_at' => '状态更新时间', 'is_delete' => 'is_delete', 'days' => '天数设置' ]; } }