xhWxMenu.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhWxMenu".
  5. *
  6. * @property int $id
  7. * @property string $name 菜单标题
  8. * @property int $parentId 父菜单ID
  9. * @property int $merchantId 商家ID
  10. * @property string $menuKey 菜单key merchantId_菜单序号
  11. * @property int $menuOption 菜单选项
  12. * @property int $replyType 回复类型 0 跳转链接(view) 1 回复文字 2回复单图文 具体查看配置文件 configDict replyType
  13. * @property string $replyUrl 回复url
  14. * @property string $replyText 回复文字
  15. * @property string $replyMultiNews 回复多图文
  16. * @property string $replyNews 回复单图文
  17. * @property int $targetId 目标id 如活动id
  18. * @property int $hasSonMenu 是否子菜单 0没有 1有
  19. * @property int $menuOrder 菜单顺序
  20. * @property string $createTime 创建时间
  21. * @property string $updateTime
  22. */
  23. class xhWxMenu extends xhBaseModel
  24. {
  25. /**
  26. * @inheritdoc
  27. */
  28. public static function tableName()
  29. {
  30. return 'xhWxMenu';
  31. }
  32. /**
  33. * @inheritdoc
  34. */
  35. public function rules()
  36. {
  37. return [
  38. [['parentId', 'merchantId', 'menuOption', 'replyType', 'targetId', 'hasSonMenu', 'menuOrder'], 'integer'],
  39. [['createTime'], 'required'],
  40. [['createTime', 'updateTime'], 'safe'],
  41. [['name'], 'string', 'max' => 50],
  42. [['menuKey'], 'string', 'max' => 20],
  43. [['replyUrl'], 'string', 'max' => 100],
  44. [['replyText'], 'string', 'max' => 800],
  45. [['replyMultiNews', 'replyNews'], 'string', 'max' => 1000],
  46. [['menuKey'], 'unique'],
  47. ];
  48. }
  49. /**
  50. * @inheritdoc
  51. */
  52. public function attributeLabels()
  53. {
  54. return [
  55. 'id' => 'ID',
  56. 'name' => 'Name',
  57. 'parentId' => 'Parent ID',
  58. 'merchantId' => 'Merchant ID',
  59. 'menuKey' => 'Menu Key',
  60. 'menuOption' => 'Menu Option',
  61. 'replyType' => 'Reply Type',
  62. 'replyUrl' => 'Reply Url',
  63. 'replyText' => 'Reply Text',
  64. 'replyMultiNews' => 'Reply Multi News',
  65. 'replyNews' => 'Reply News',
  66. 'targetId' => 'Target ID',
  67. 'hasSonMenu' => 'Has Son Menu',
  68. 'menuOrder' => 'Menu Order',
  69. 'createTime' => 'Create Time',
  70. 'updateTime' => 'Update Time',
  71. ];
  72. }
  73. }