xhInvite.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhInvite".
  5. *
  6. * @property int $id
  7. * @property int $merchantId 邀请人
  8. * @property int $invitedMerchantId 被邀请的商家id
  9. * @property string $code 邀请码,如1-10-Iwb0
  10. * @property string $save 邀请码可抵扣金额,节省
  11. * @property string $prize 奖金
  12. * @property int $inviteUseTo 邀请码用于 0申请公众号 1开通续费 具体看configDict
  13. * @property string $targetId 目标id
  14. * @property int $takeStatus 领取状态 0待领取 1领取
  15. * @property int $deadline 过期时间
  16. * @property int $addTime 添加时间,时间戳格式
  17. * @property string $createTime 创建时间
  18. * @property string $updateTime 修改时间
  19. */
  20. class xhInvite extends xhBaseModel
  21. {
  22. /**
  23. * @inheritdoc
  24. */
  25. public static function tableName()
  26. {
  27. return 'xhInvite';
  28. }
  29. /**
  30. * @inheritdoc
  31. */
  32. public function rules()
  33. {
  34. return [
  35. [['merchantId', 'invitedMerchantId', 'inviteUseTo', 'takeStatus', 'deadline', 'addTime'], 'integer'],
  36. [['save', 'prize'], 'number'],
  37. [['createTime'], 'required'],
  38. [['createTime', 'updateTime'], 'safe'],
  39. [['code'], 'string', 'max' => 50],
  40. [['targetId'], 'string', 'max' => 100],
  41. [['code'], 'unique'],
  42. ];
  43. }
  44. /**
  45. * @inheritdoc
  46. */
  47. public function attributeLabels()
  48. {
  49. return [
  50. 'id' => 'ID',
  51. 'merchantId' => 'Merchant ID',
  52. 'invitedMerchantId' => 'Invited Merchant ID',
  53. 'code' => 'Code',
  54. 'save' => 'Save',
  55. 'prize' => 'Prize',
  56. 'inviteUseTo' => 'Invite Use To',
  57. 'targetId' => 'Target ID',
  58. 'takeStatus' => 'Take Status',
  59. 'deadline' => 'Deadline',
  60. 'addTime' => 'Add Time',
  61. 'createTime' => 'Create Time',
  62. 'updateTime' => 'Update Time',
  63. ];
  64. }
  65. }