info.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <?php
  2. $sex = array
  3. (
  4. 1 => '男',
  5. 2 => '女',
  6. 3 => '未知',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'info',
  12. # 显示给用户看的名称
  13. 'lang' => '销售人列表',
  14. 'order' => 100,
  15. # 同步更新另外一个或多个表的数据
  16. 'sync' => array
  17. (
  18. 'seller/area' => array
  19. (
  20. # 更新另外一个表的字段 => 本表的字段
  21. 'where' => array('seller_id', 'id'),
  22. # 要更新的数据
  23. 'update' => array('area_id' => 'area'),
  24. # 同步更新的类型,delete为先删再插入,update为直接更新
  25. 'type' => 'delete',
  26. ),
  27. ),
  28. # 数据结构
  29. 'struct' => array
  30. (
  31. 'id' => array
  32. (
  33. 'type' => 'int-11',
  34. 'name' => 'ID',
  35. 'default' => '',
  36. 'desc' => '',
  37. 'match' => 'is_numeric',
  38. 'list' => true,
  39. ),
  40. 'name' => array
  41. (
  42. 'type' => 'varchar-80',
  43. 'name' => '销售人名称',
  44. 'default' => '',
  45. 'desc' => '销售人名称',
  46. 'match' => 'is_string',
  47. 'update' => 'text',
  48. 'list' => true,
  49. 'search' => 'fulltext',
  50. //增加预览
  51. 'preview' => true,
  52. ),
  53. 'mobile' => array
  54. (
  55. 'type' => 'varchar-15',
  56. 'name' => '销售人手机号',
  57. 'default' => '',
  58. 'desc' => '销售人手机号',
  59. 'match' => 'is_string',
  60. 'update' => 'text',
  61. 'list' => true,
  62. 'search' => 'fulltext',
  63. ),
  64. 'desc' => array
  65. (
  66. 'type' => 'varchar-500',
  67. 'name' => '销售人介绍-销售人介绍',
  68. 'default' => '',
  69. 'desc' => '销售人介绍',
  70. 'match' => 'is_string',
  71. 'update' => 'textarea',
  72. ),
  73. 'avatar' => array
  74. (
  75. 'type' => 'varchar-150',
  76. 'name' => '销售人头像-图片尺寸200*200px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  77. 'default' => '',
  78. 'desc' => '销售人头像',
  79. 'match' => 'is_string',
  80. 'update' => 'image',
  81. 'key' => '1',
  82. 'place' => '150',
  83. ),
  84. 'sex' => array
  85. (
  86. 'type' => 'tinyint-1',
  87. 'name' => '性别',
  88. 'default' => '3',
  89. 'desc' => '性别',
  90. 'match' => 'is_numeric',
  91. 'option' => $sex,
  92. 'update' => 'radio',
  93. //'list' => true,
  94. ),
  95. 'area' => array
  96. (
  97. 'type' => 'varchar-100',
  98. 'name' => '地区',
  99. 'default' => '',
  100. 'desc' => '地区',
  101. 'match' => 'is_string',
  102. 'search' => 'linkage',
  103. 'update' => 'linkage',//多级联动 option参数:请求地址(参数为level_num当前联动级数,level_id当前选择的id)
  104. 'option' => Dever::url('api.get', 'area'),
  105. 'list' => 'Dever::load("area/api.string", "{area}")',
  106. ),
  107. 'address' => array
  108. (
  109. 'type' => 'varchar-500',
  110. 'name' => '详细地址',
  111. 'default' => '',
  112. 'desc' => '详细地址',
  113. 'match' => 'option',
  114. 'update' => 'text',
  115. //'search' => 'fulltext',
  116. // 'list' => true,
  117. ),
  118. 'map' => array
  119. (
  120. 'type' => 'varchar-500',
  121. 'name' => '坐标位置',
  122. 'default' => '',
  123. 'desc' => '坐标位置',
  124. 'match' => 'option',
  125. //'update' => 'map',
  126. //'search' => 'fulltext',
  127. // 'list' => true,
  128. ),
  129. 'reorder' => array
  130. (
  131. 'type' => 'int-11',
  132. 'name' => '排序(数值越大越靠前)',
  133. 'default' => '1',
  134. 'desc' => '请输入排序',
  135. 'match' => 'option',
  136. 'update' => 'text',
  137. 'search' => 'order',
  138. 'list' => true,
  139. 'order' => 'desc',
  140. 'edit' => true,
  141. ),
  142. 'state' => array
  143. (
  144. 'type' => 'tinyint-1',
  145. 'name' => '状态',
  146. 'default' => '1',
  147. 'desc' => '请选择状态',
  148. 'match' => 'is_numeric',
  149. ),
  150. 'cdate' => array
  151. (
  152. 'type' => 'int-11',
  153. 'name' => '录入时间',
  154. 'match' => array('is_numeric', time()),
  155. 'desc' => '',
  156. # 只有insert时才生效
  157. 'insert' => true,
  158. ),
  159. ),
  160. # 管理功能
  161. 'manage' => array
  162. (
  163. ),
  164. # request 请求接口定义
  165. 'request' => array
  166. (
  167. ),
  168. );