xhLuckyDrawAward.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhLuckyDrawAward".
  5. *
  6. * @property int $id
  7. * @property string $awardName 奖品名称
  8. * @property int $order 每个活动中的排序
  9. * @property int $count 奖品发放数量
  10. * @property int $drawCount 已中奖的数量
  11. * @property float $probability 中奖概率
  12. * @property string $luckyDrawActivityId 抽奖活动表ID
  13. *
  14. */
  15. class xhLuckyDrawAward extends xhBaseModel
  16. {
  17. /**
  18. * @inheritdoc
  19. */
  20. public static function tableName()
  21. {
  22. return 'xhLuckyDrawAward';
  23. }
  24. /**
  25. * @inheritdoc
  26. */
  27. public function rules()
  28. {
  29. return [
  30. [['awardName'], 'string', 'max' => 20],
  31. [['order', 'count', 'drawCount', 'luckyDrawActivityId'], 'integer'],
  32. [['probability'], 'number'],
  33. [['awardName'], 'required', 'message'=>'奖品名称必须填写'],
  34. ];
  35. }
  36. /**
  37. * @inheritdoc
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'id' => 'ID',
  43. 'awardName' => 'Award Name',
  44. 'order' => 'Order',
  45. 'count' => 'Count',
  46. 'drawCount' => 'Draw Count',
  47. 'probability' => 'Probability',
  48. 'luckyDrawActivityId' => 'Lucky Draw Activity Id',
  49. ];
  50. }
  51. }