100], [['channel_order_id'], 'string', 'max' => 20], [['channel_order_id'], 'required', 'on' => ['error_order']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'ORDER_ID' => '订单号', 'InterFaceSendID' => '渠道订单接口发送号', 'UPDATE_TIME' => '更新时间', 'CANCEL_FLAG' => '记录有效性标记,CANCEL_FLAG=0记录有效;CANCEL_FLAG=1,记录已删除\'', 'channel_order_id' => '渠道单号', ]; } public function beforeSave($insert) { if ($this->isNewRecord) { $this->CANCEL_FLAG = 0; } return parent::beforeSave($insert); } }