contact.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. $xuqiu = array
  3. (
  4. 1 => '广告',
  5. 2 => '投稿',
  6. 3 => '合作',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'contact',
  12. # 显示给用户看的名称
  13. 'lang' => '联系信息管理',
  14. # 是否显示在后台菜单
  15. 'order' => 99,
  16. 'xuqiu' => $xuqiu,
  17. # 数据结构
  18. 'struct' => array
  19. (
  20. 'id' => array
  21. (
  22. 'type' => 'int-11',
  23. 'name' => 'ID',
  24. 'default' => '',
  25. 'desc' => '',
  26. 'match' => 'is_numeric',
  27. 'order' => 'desc',
  28. //'list' => true,
  29. ),
  30. 'username' => array
  31. (
  32. 'type' => 'varchar-200',
  33. 'name' => '姓名',
  34. 'default' => '',
  35. 'desc' => '姓名',
  36. 'match' => 'option',
  37. 'search' => 'fulltext',
  38. 'list' => true,
  39. ),
  40. 'mobile' => array
  41. (
  42. 'type' => 'varchar-500',
  43. 'name' => '电话',
  44. 'default' => '',
  45. 'desc' => '电话',
  46. 'match' => 'option',
  47. 'search' => 'fulltext',
  48. 'list' => true,
  49. ),
  50. 'email' => array
  51. (
  52. 'type' => 'varchar-500',
  53. 'name' => '电子邮件',
  54. 'default' => '',
  55. 'desc' => '电子邮件',
  56. 'match' => 'option',
  57. 'search' => 'fulltext',
  58. 'list' => true,
  59. ),
  60. 'content' => array
  61. (
  62. 'type' => 'varchar-2000',
  63. 'name' => '留言内容',
  64. 'default' => '',
  65. 'desc' => '留言内容',
  66. 'match' => 'option',
  67. 'search' => 'fulltext',
  68. 'list' => true,
  69. ),
  70. 'xuqiu' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '需求',
  74. 'default' => '3',
  75. 'desc' => '需求',
  76. 'match' => 'is_numeric',
  77. 'update' => 'select',
  78. 'option' => $xuqiu,
  79. 'search' => 'select',
  80. 'list' => true,
  81. ),
  82. 'state' => array
  83. (
  84. 'type' => 'tinyint-1',
  85. 'name' => '状态',
  86. 'default' => '1',
  87. 'desc' => '请选择状态',
  88. 'match' => 'is_numeric',
  89. ),
  90. 'cdate' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '创建时间',
  94. 'match' => array('is_numeric', time()),
  95. 'desc' => '',
  96. # 只有insert时才生效
  97. 'insert' => true,
  98. 'search' => 'date',
  99. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  100. ),
  101. ),
  102. 'manage' => array
  103. (
  104. 'insert' => false,
  105. 'edit' => false,
  106. ),
  107. # request 请求接口定义
  108. 'request' => array
  109. (
  110. )
  111. );