xhRecommend.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhRecommend".
  5. *
  6. * @property int $id
  7. * @property int $merchantId 商家id
  8. * @property string $goods 首页推荐的商品json
  9. * @property string $slide 幻灯片内容
  10. * @property string $createTime 创建时间
  11. * @property string $updateTime
  12. */
  13. class xhRecommend extends xhBaseModel
  14. {
  15. /**
  16. * @inheritdoc
  17. */
  18. public static function tableName()
  19. {
  20. return 'xhRecommend';
  21. }
  22. /**
  23. * @inheritdoc
  24. */
  25. public function rules()
  26. {
  27. return [
  28. [['merchantId'], 'integer'],
  29. [['createTime'], 'required'],
  30. [['createTime', 'updateTime'], 'safe'],
  31. [['goods'], 'string', 'max' => 100],
  32. [['slide'], 'string', 'max' => 1000],
  33. ];
  34. }
  35. /**
  36. * @inheritdoc
  37. */
  38. public function attributeLabels()
  39. {
  40. return [
  41. 'id' => 'ID',
  42. 'merchantId' => 'Merchant ID',
  43. 'goods' => 'Goods',
  44. 'slide' => 'Slide',
  45. 'createTime' => 'Create Time',
  46. 'updateTime' => 'Update Time',
  47. ];
  48. }
  49. }