xhGoodsPrice.php 893 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace common\models;
  3. class xhGoodsPrice extends xhBaseModel
  4. {
  5. /**
  6. * @inheritdoc
  7. */
  8. public static function tableName()
  9. {
  10. return 'xhGoodsPrice';
  11. }
  12. /**
  13. * @inheritdoc
  14. */
  15. public function rules()
  16. {
  17. return [
  18. [['softDel'], 'integer'],
  19. [['price'], 'number'],
  20. [['title', 'price'], 'required'],// 'picture',
  21. //[['createTime', 'updateTime'], 'safe'],
  22. [['title'], 'string', 'max' => 30],
  23. [['picture'], 'string', 'max' => 50],
  24. ];
  25. }
  26. /**
  27. * @inheritdoc
  28. */
  29. public function attributeLabels()
  30. {
  31. return [
  32. 'id' => 'ID',
  33. 'title' => 'title',
  34. 'picture' => 'picture',
  35. 'price' => 'price',
  36. 'order' => 'order',
  37. 'softDel' => 'soft Delete',
  38. ];
  39. }
  40. }