xhLuckyDrawActivity.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhLuckyDrawActivity".
  5. *
  6. * @property int $id
  7. * @property string $activityName 活动名称
  8. * @property int $merchantId 商户Id
  9. * @property int $startTime 活动开始时间
  10. * @property int $endTime 活动结束时间
  11. * @property int $drawCount 抽奖次数(机会)
  12. * @property int $needAttention 是否要求关注公众号:0、不要求(默认);1、必须是
  13. * @property int $needVip 是否要求会员:0、不要求(默认);1、必须是
  14. * @property int $participants 参与人数
  15. * @property int $inviteCount 获得一次抽奖机会需要邀请的好友数量
  16. * @property int $rewardCount 0或留空表示邀请好友没有奖励
  17. * @property string $introduce 活动介绍
  18. * @property string $awardIds 活动奖品ids,','分隔
  19. *
  20. */
  21. class xhLuckyDrawActivity extends xhBaseModel
  22. {
  23. /**
  24. * @inheritdoc
  25. */
  26. public static function tableName()
  27. {
  28. return 'xhLuckyDrawActivity';
  29. }
  30. /**
  31. * @inheritdoc
  32. */
  33. public function rules()
  34. {
  35. return [
  36. [['startTime', 'endTime', 'drawCount', 'needAttention', 'needVip', 'participants', 'inviteCount', 'rewardCount', 'merchantId'], 'integer'],
  37. [['urlQrCode'], 'string', 'max' => 100],
  38. [['introduce'], 'string', 'max' => 255],
  39. [['activityName'], 'required'],
  40. [['activityName'], 'unique', 'message'=>'抽奖活动名称重复'],
  41. [['createTime'], 'required', 'message' => '创建时间必须填写'],
  42. ];
  43. }
  44. /**
  45. * @inheritdoc
  46. */
  47. public function attributeLabels()
  48. {
  49. return [
  50. 'id' => 'ID',
  51. 'activityName' => 'Activity Name',
  52. 'merchantId' => '商户Id',
  53. 'startTime' => 'Start Time',
  54. 'endTime' => 'End Time',
  55. 'drawCount' => 'Draw Count',
  56. 'needAttention' => 'Need Attention',
  57. 'participants' => 'Participants',
  58. 'needVip' => 'Need Vip',
  59. 'introduce' => 'Introduce',
  60. 'awardIds' => 'Award Ids',
  61. 'inviteCount' => '邀请好友数量',
  62. 'rewardCount' => '最多奖励次数',
  63. 'urlQrCode' => '链接二维码',
  64. 'createTime' => 'Create Time',
  65. 'updateTime' => 'Update Time',
  66. ];
  67. }
  68. }