UserSignInAward.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace addons\SignIn\common\models;
  3. use common\models\base\BaseActiveRecord;
  4. use Exception;
  5. use Yii;
  6. /**
  7. * This is the model class for table "{{%addons_user_sign_in_award}}".
  8. * @property int $id
  9. * @property int $mall_id
  10. * @property int $user_id
  11. * @property int $score_num 累计积分奖励数量
  12. * @property int $coupon_num 累计优惠券奖励数量
  13. * @property int $type 1:积分,2:优惠券
  14. * @property int $total_sign_in 累计签到天数
  15. * @property int $created_at 创建时间
  16. * @property int $updated_at 编辑时间
  17. */
  18. class UserSignInAward extends BaseActiveRecord
  19. {
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public static function tableName()
  24. {
  25. return '{{%addons_user_sign_in_award}}';
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function rules(){
  31. return [
  32. [['mall_id', 'user_id'], 'required'],
  33. [['mall_id', 'user_id', 'score_num', 'coupon_num', 'total_sign_in', 'sign_at', 'status', 'created_at', 'updated_at'], 'integer'],
  34. ];
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function attributeLabels(){
  40. return [
  41. 'id' => 'ID',
  42. 'mall_id' => 'Mall ID',
  43. 'user_id' => '签到天数',
  44. 'score_num' => '累计积分奖励数量',
  45. 'coupon_num' => '累计优惠券奖励数量',
  46. 'total_sign_in'=> '累计签到天数',
  47. 'sign_at' => '最新签到时间',
  48. 'status' => '状态',
  49. 'created_at' => '创建时间',
  50. 'updated_at' => '修改时间'
  51. ];
  52. }
  53. }