TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'], ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at' ] ] ]; } /** * {@inheritdoc} */ public function rules() { return [ [['sharing_profit', 'amount'], 'number'], [['name', 'type_id'], 'string'], [['id', 'sharing_type', 'sharing_way', 'sharing_store_id', 'is_delete', 'created_at', 'updated_at', 'extra_saas_user_id'], 'integer'], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => '', 'name' => '分账名称', 'sharing_type' => '分账类型:0=微信用户;1=商户号', 'type_id' => '分类类型ID:联盟用户ID或者商户号', 'extra_saas_user_id' => '额外用户ID(如果sharing_type = 1时候需要)', 'sharing_way' => '分账方式:0=基于店铺;1=基于平台', 'sharing_store_id' => '分账方式如果是基于店铺,店铺ID', 'sharing_profit' => '分账比例', 'amount' => '累计佣金', 'is_delete' => '', 'created_at' => '', 'updated_at' => '', ]; } }