xhGoodsSetting.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace common\models;
  3. class xhGoodsSetting extends xhBaseModel
  4. {
  5. /**
  6. * @inheritdoc
  7. */
  8. public static function tableName()
  9. {
  10. return 'xhGoodsSetting';
  11. }
  12. /**
  13. * @inheritdoc
  14. */
  15. public function rules()
  16. {
  17. return [
  18. [['merchantId', 'startRiseTime', 'endRiseTime', 'riseType', 'riseAmount', 'addTime'], 'integer'],
  19. [['createTime'], 'required'],
  20. [['createTime', 'updateTime'], 'safe'],
  21. [['goodsIntroduce'], 'string', 'max' => 10000],
  22. [['merchantId'], 'unique'],
  23. ];
  24. }
  25. /**
  26. * @inheritdoc
  27. */
  28. public function attributeLabels()
  29. {
  30. return [
  31. 'id' => 'ID',
  32. 'merchantId' => 'Merchant ID',
  33. 'startRiseTime' => 'Start Rise Time',
  34. 'endRiseTime' => 'End Rise Time',
  35. 'riseType' => 'Rise Type',
  36. 'riseAmount' => 'Rise Amount',
  37. 'goodsIntroduce' => 'goodsIntroduce',
  38. 'addTime' => 'Add Time',
  39. 'createTime' => 'Create Time',
  40. 'updateTime' => 'Update Time',
  41. ];
  42. }
  43. }