xhVisitByMonth.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhVisitByMonth".
  5. *
  6. * @property int $id
  7. * @property int $year 年
  8. * @property int $month 月份
  9. * @property int $riseNum 增加数量
  10. * @property int $totalNum 总数量
  11. * @property int $merchantId 商家id
  12. * @property string $createTime 创建时间
  13. * @property string $updateTime
  14. */
  15. class xhVisitByMonth extends xhBaseModel
  16. {
  17. /**
  18. * @inheritdoc
  19. */
  20. public static function tableName()
  21. {
  22. return 'xhVisitByMonth';
  23. }
  24. /**
  25. * @inheritdoc
  26. */
  27. public function rules()
  28. {
  29. return [
  30. [['year', 'month', 'riseNum', 'totalNum', 'merchantId'], 'integer'],
  31. [['createTime'], 'required'],
  32. [['createTime', 'updateTime'], 'safe'],
  33. [['merchantId', 'year', 'month'], 'unique', 'targetAttribute' => ['merchantId', 'year', 'month']],
  34. ];
  35. }
  36. /**
  37. * @inheritdoc
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'id' => 'ID',
  43. 'year' => 'Year',
  44. 'month' => 'Month',
  45. 'riseNum' => 'Rise Num',
  46. 'totalNum' => 'Total Num',
  47. 'merchantId' => 'Merchant ID',
  48. 'createTime' => 'Create Time',
  49. 'updateTime' => 'Update Time',
  50. ];
  51. }
  52. }