TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'], ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'] ] ] ]; } /** * @inheritdoc */ public function rules() { return [ [['level', 'status','is_delete','admin_id'], 'integer'], [['rate','achieve'], 'number'], [['name'], 'string'], [['created_at', 'updated_at'], 'safe'] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'level' => '等级', 'name' => '名称', 'rate' => '比例', 'status' => '状态', 'created_at' => '创建时间', 'updated_at' => '更新时间', ]; } }