type.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. # 定义几个常用的选项
  3. $option = array
  4. (
  5. 1 => '显示',
  6. 2 => '不显示',
  7. );
  8. $type = array
  9. (
  10. 1 => '不发送push',
  11. 2 => '发送push',
  12. );
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'type',
  17. # 显示给用户看的名称
  18. 'lang' => '消息类型',
  19. 'order' => 20,
  20. 'menu' => false,
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'search' => 'fulltext',
  32. 'order' => 'desc',
  33. 'list' => true,
  34. ),
  35. 'name' => array
  36. (
  37. 'type' => 'varchar-30',
  38. 'name' => '类型名称-类型id值为10以下则为系统消息',
  39. 'default' => '',
  40. 'desc' => '请填写类型名称',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. //'list' => true,
  44. ),
  45. 'type' => array
  46. (
  47. 'type' => 'tinyint-1',
  48. 'name' => '是否同时发送push',
  49. 'default' => '1',
  50. 'desc' => '请选择是否同时发送push',
  51. 'match' => 'is_numeric',
  52. 'option' => $type,
  53. 'update' => 'radio',
  54. //'search' => 'select',
  55. //'list' => true,
  56. ),
  57. 'state' => array
  58. (
  59. 'type' => 'tinyint-1',
  60. 'name' => '状态',
  61. 'default' => '1',
  62. 'desc' => '请选择状态',
  63. 'match' => 'is_numeric',
  64. 'option' => $option,
  65. 'update' => 'radio',
  66. 'search' => 'select',
  67. 'list' => true,
  68. ),
  69. 'cdate' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '录入时间',
  73. 'match' => array('is_numeric', time()),
  74. 'desc' => '',
  75. # 只有insert时才生效
  76. 'insert' => true,
  77. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  78. ),
  79. ),
  80. 'manage' => array
  81. (
  82. ),
  83. # request 请求接口定义
  84. 'request' => array
  85. (
  86. ),
  87. );