Esempio n. 1
0
 /**
  * Returns the list of all rules of TradePayment.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['orderNumber', 'user', 'expectedAmount', 'payMode'], 'required'], ['payMode', 'in', 'range' => [self::PAY_MODE_WECHAT, self::PAY_MODE_ALIPAY, self::PAY_MODE_CASH, self::PAY_MODE_BANK]], ['status', 'in', 'range' => [self::STATUS_PREPARE, self::STATUS_TIMEOUT, self::STATUS_PAID, self::STATUS_FAILED]], ['status', 'default', 'value' => self::STATUS_PREPARE]]);
 }
 /**
  * Returns the list of all rules of statsMemberPropTradeQuarterly.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['propId', 'propValue', 'total', 'year', 'quarter'], 'required'], ['total', 'integer']]);
 }
Esempio n. 3
0
 /**
  * Returns the list of all rules of questionnaire.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['name', 'startTime', 'endTime', 'isPublished'], 'required'], ['startTime', 'validateTime', 'on' => [self::SCENARIO_CREATE]], ['endTime', 'validateTime', 'on' => [self::SCENARIO_CREATE]]]);
 }
Esempio n. 4
0
 public function rules()
 {
     return array_merge(parent::rules(), [[['request', 'response', 'deviceType'], 'required']]);
 }
 /**
  * Returns the list of all rules of statsMemberGrowthQuarterly.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['totalNew', 'totalActive', 'totalInactive', 'year', 'quarter'], 'integer']]);
 }
Esempio n. 6
0
 /**
  * Returns the list of all rules of couponLog.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), []);
 }
 /**
  * Returns the list of all rules of statsMemberMonthly.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['month', 'total'], 'required'], ['origin', 'in', 'range' => self::$origins], ['total', 'integer']]);
 }
Esempio n. 8
0
 /**
  * Returns the list of all rules of question.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['type', 'title', 'order'], 'required']]);
 }
Esempio n. 9
0
 /**
  * Returns the list of all rules of campaignLog.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['code', 'productId', 'member'], 'required']]);
 }
Esempio n. 10
0
 /**
  * Returns the list of all rules of GoodsExchangeLog.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['usedScore', 'expectedScore'], 'number', 'min' => 0, 'integerOnly' => true], ['count', 'number', 'min' => 0, 'integerOnly' => true], ['isRemoved', 'default', 'value' => false], ['isDelivered', 'default', 'value' => false]]);
 }
Esempio n. 11
0
 /**
  * Returns the list of all rules of promotionCode.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['productId', 'code'], 'required'], ['isUsed', 'default', 'value' => false]]);
 }
Esempio n. 12
0
 /**
  * Returns the list of all rules of webHooks.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['url', 'isEnabled'], 'required'], ['isEnabled', 'default', 'value' => true]]);
 }
Esempio n. 13
0
 public function rules()
 {
     return array_merge(parent::rules(), [[['token', 'deviceType', 'messageId'], 'required']]);
 }
Esempio n. 14
0
 /**
  * Returns the list of all rules of ChatMessage.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [['increment', 'integer']]);
 }
Esempio n. 15
0
 public function rules()
 {
     return array_merge(parent::rules(), [['condition', 'default', 'value' => []], ['awards', 'default', 'value' => []], ['remark', 'default', 'value' => []]]);
 }
Esempio n. 16
0
 /**
  * Returns the list of all rules of captcha.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['channel', 'type', 'module', 'startAt', 'endAt'], 'required']]);
 }
Esempio n. 17
0
 public function rules()
 {
     return array_merge(parent::rules(), [[['name', 'phone', 'email'], 'required'], ['email', 'email'], ['avatar', 'default', 'value' => Yii::$app->params['defaultAvatar']]]);
 }
Esempio n. 18
0
 /**
  * Returns the list of all rules of MessageTemplate.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), ['useWebhook', 'default', 'value' => false]);
 }
Esempio n. 19
0
 /**
  * Returns the list of all rules of user.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [['source', 'in', 'range' => [ChatConversation::TYPE_WEBSITE, ChatConversation::TYPE_WECHAT, ChatConversation::TYPE_WEIBO, ChatConversation::TYPE_ALIPAY]], ['requestTime', 'default', 'value' => new \MongoDate(time())]]);
 }
Esempio n. 20
0
 /**
  * Returns the list of all rules of admin.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [['usedTimes', 'default', 'value' => 0]]);
 }
 /**
  * Returns the list of all rules of statsMemberPropAvgTradeQuaterly.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['propId', 'productId', 'avg', 'year', 'quarter'], 'required'], ['avg', 'double']]);
 }
Esempio n. 22
0
 /**
  * Returns the list of all rules of captcha.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['ip', 'mobile', 'code', 'isExpired'], 'required'], ['isExpired', 'default', 'value' => false]]);
 }
Esempio n. 23
0
 /**
  * Returns the list of all rules of tradeRefund.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['refundNumber', 'orderNumber', 'admin', 'expectedAmount', 'realAmount', 'refundMode'], 'required'], ['comments', 'default', 'value' => ''], ['refundMode', 'in', 'range' => [self::REFUND_MODE_WECHAT, self::REFUND_MODE_ALIPAY, self::REFUND_MODE_CASH, self::REFUND_MODE_BANK]]]);
 }
Esempio n. 24
0
 /**
  * Returns the list of all rules of questionnaireLog.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [['answers', 'required'], ['answers', 'validateAnswers']]);
 }
Esempio n. 25
0
 /**
  * Returns the list of all rules of memberLogs.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [['operation', 'in', 'range' => [self::OPERATION_REDEEM, self::OPERATION_VIEWED]]]);
 }
 /**
  * Returns the list of all rules of statsMemberCampaignLogDaily.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['memberId', 'memProperty', 'productId', 'code', 'year', 'quarter', 'month'], 'required']]);
 }
Esempio n. 27
0
 /**
  * Returns the list of all rules of channel.
  * This method must be overridden by child classes to define available attributes.
  *
  * @return array list of rules.
  */
 public function rules()
 {
     return array_merge(parent::rules(), [['status', 'in', 'range' => [self::STATUS_DISABLE, self::STATUS_ENABLE]], ['origin', 'in', 'range' => [self::ALIPAY, self::WECHAT, self::WEIBO]]]);
 }
Esempio n. 28
0
 public function rules()
 {
     return array_merge(parent::rules(), [[['name', 'type', 'url'], 'required']]);
 }