type.php 1.7 KB

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