xhCategory.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhCategory".
  5. *
  6. * @property string $id
  7. * @property integer $parentId
  8. * @property integer $merchantId
  9. * @property string $categoryName
  10. * @property string $showName
  11. * @property string $description
  12. * @property string $cover
  13. * @property integer $inTurn
  14. * @property integer $classify
  15. * @property integer $isShow
  16. */
  17. class xhCategory extends xhBaseModel
  18. {
  19. /**
  20. * @inheritdoc
  21. */
  22. public static function tableName()
  23. {
  24. return 'xhCategory';
  25. }
  26. /**
  27. * @inheritdoc
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['parentId', 'merchantId', 'inTurn', 'classify', 'isShow'], 'integer'],
  33. [['categoryName'], 'string', 'max' => 50],
  34. [['showName'], 'string', 'max' => 200],
  35. [['description', 'cover'], 'string', 'max' => 500]
  36. ];
  37. }
  38. /**
  39. * @inheritdoc
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => 'ID',
  45. 'parentId' => 'Parent ID',
  46. 'merchantId' => 'Merchant ID',
  47. 'categoryName' => 'Category Name',
  48. 'showName' => 'Show Name',
  49. 'description' => 'Description',
  50. 'cover' => 'Cover',
  51. 'inTurn' => 'In Turn',
  52. 'classify' => 'Classify',
  53. 'isShow' => 'Is Show',
  54. ];
  55. }
  56. }