TopicType.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. /**
  10. * This is the model class for table "{{%topic_type}}".
  11. *
  12. * @property int $id
  13. * @property string|null $name
  14. * @property int|null $sort
  15. * @property int|null $is_delete
  16. * @property int|null $store_id
  17. * @property int|null $is_show 是否显示(0/不显示,1、显示)
  18. */
  19. class TopicType extends \yii\db\ActiveRecord
  20. {
  21. const IS_DELETE_YES = 1;//已删除
  22. const IS_DELETE_NO = 0;//未删除
  23. const IS_SHOW_YES = 1;//前台显示
  24. const IS_SHOW_NO = 0;//前台不显示
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public static function tableName()
  29. {
  30. return '{{%topic_type}}';
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function rules()
  36. {
  37. return [
  38. [['sort', 'is_delete', 'store_id', 'is_show'], 'integer'],
  39. [['name'], 'string', 'max' => 255],
  40. ];
  41. }
  42. /**
  43. * {@inheritdoc}
  44. */
  45. public function attributeLabels()
  46. {
  47. return [
  48. 'id' => 'ID',
  49. 'name' => 'Name',
  50. 'sort' => 'Sort',
  51. 'is_delete' => 'Is Delete',
  52. 'store_id' => 'Store ID',
  53. 'is_show' => 'Is Show',
  54. ];
  55. }
  56. }