TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'], ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at' ] ] ]; } /** * {@inheritdoc} */ public function rules() { return [ [['store_id', 'is_delete', 'created_at', 'updated_at', 'sort', 'send_integral','level_up'], 'integer'], [['pay_price', 'send_price','level_one_bonus','level_two_bonus',], 'number'], [['name'], 'required'], [['name','assign_member'], 'string', 'max' => 255], [['referral_commission'], 'string'], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'pay_price' => '支付金额', 'send_price' => '赠送金额', 'name' => '充值名称', 'is_delete' => 'Is Delete', 'created_at' => 'Add Time', 'updated_at' => 'Update Time', 'sort' => '权重', 'send_integral' => '赠送积分', ]; } }