UserGiftStatistics.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace addons\UserGift\common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%addons_user_gift_statistics}}".
  6. *
  7. * @property int $id
  8. * @property int $mall_id 商城id
  9. * @property int $gift_type 礼包类型
  10. * @property string|null $coupon 优惠券详细
  11. * @property int|null $coupon_num 优惠券数量
  12. * @property int|null $actual_coupon_num 实发优惠券数量
  13. * @property float|null $score 应发积分
  14. * @property float|null $actual_score 实发积分
  15. * @property float|null $balance 应发余额
  16. * @property float|null $actual_balance 实发余额
  17. * @property int $grant_num 发放总人数
  18. * @property int $status 状态[-1:删除;0:禁用;1启用]
  19. * @property int $created_at 创建时间
  20. * @property int $updated_at 更新时间
  21. */
  22. class UserGiftStatistics extends \common\models\base\BaseActiveRecord
  23. {
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public static function tableName()
  28. {
  29. return '{{%addons_user_gift_statistics}}';
  30. }
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public function rules()
  35. {
  36. return [
  37. [['mall_id', 'coupon_num', 'actual_coupon_num', 'grant_num', 'status', 'created_at', 'updated_at'], 'integer'],
  38. [['score', 'actual_score', 'balance', 'actual_balance'], 'number'],
  39. [['gift_type'], 'string', 'max' => 20],
  40. [['coupon'], 'string', 'max' => 1024],
  41. ];
  42. }
  43. /**
  44. * {@inheritdoc}
  45. */
  46. public function attributeLabels()
  47. {
  48. return [
  49. 'id' => 'ID',
  50. 'mall_id' => '商城id',
  51. 'gift_type' => '礼包类型',
  52. 'coupon' => '优惠券详细',
  53. 'coupon_num' => '优惠券数量',
  54. 'actual_coupon_num' => '实发优惠券数量',
  55. 'score' => '应发积分',
  56. 'actual_score' => '实发积分',
  57. 'balance' => '应发余额',
  58. 'actual_balance' => '实发余额',
  59. 'grant_num' => '发放总人数',
  60. 'status' => '状态[-1:删除;0:禁用;1启用]',
  61. 'created_at' => '创建时间',
  62. 'updated_at' => '更新时间',
  63. ];
  64. }
  65. }