xhGoodsSetting.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhGoodsSetting".
  5. *
  6. * @property int $id
  7. * @property int $merchantId 商家id
  8. * @property int $startRiseTime 开始涨价时间
  9. * @property int $endRiseTime 结束涨价时间
  10. * @property int $riseType 涨价方式 0按百分比 1按金额
  11. * @property int $riseAmount 涨价金额或百分比数
  12. * @property string $goodSIntroduce 商品统一说明
  13. * @property int $addTime 添加时间
  14. * @property string $createTime 创建时间
  15. * @property string $updateTime
  16. */
  17. class xhGoodsSetting extends xhBaseModel
  18. {
  19. /**
  20. * @inheritdoc
  21. */
  22. public static function tableName()
  23. {
  24. return 'xhGoodsSetting';
  25. }
  26. /**
  27. * @inheritdoc
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['merchantId', 'startRiseTime', 'endRiseTime', 'riseType', 'riseAmount', 'addTime'], 'integer'],
  33. [['createTime'], 'required'],
  34. [['createTime', 'updateTime'], 'safe'],
  35. [['goodSIntroduce'], 'string', 'max' => 10000],
  36. [['merchantId'], 'unique'],
  37. ];
  38. }
  39. /**
  40. * @inheritdoc
  41. */
  42. public function attributeLabels()
  43. {
  44. return [
  45. 'id' => 'ID',
  46. 'merchantId' => 'Merchant ID',
  47. 'startRiseTime' => 'Start Rise Time',
  48. 'endRiseTime' => 'End Rise Time',
  49. 'riseType' => 'Rise Type',
  50. 'riseAmount' => 'Rise Amount',
  51. 'goodSIntroduce' => 'Good Sintroduce',
  52. 'addTime' => 'Add Time',
  53. 'createTime' => 'Create Time',
  54. 'updateTime' => 'Update Time',
  55. ];
  56. }
  57. }