apply.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. # 获取分类权限
  3. $status = array
  4. (
  5. 1 => '申请合作中',
  6. 2 => '已开通门店',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'apply',
  12. # 显示给用户看的名称
  13. 'lang' => '申请合作记录',
  14. # 后台菜单排序
  15. 'order' => 200,
  16. 'menu' => false,
  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. 'search' => 'order',
  28. 'list' => true,
  29. 'order' => 'desc',
  30. ),
  31. 'uid' => array
  32. (
  33. 'type' => 'int-11',
  34. 'name' => '用户名',
  35. 'default' => '0',
  36. 'desc' => '请选择用户',
  37. 'match' => 'is_numeric',
  38. 'update' => 'text',
  39. //'search' => 'select',
  40. 'search' => array
  41. (
  42. 'api' => 'passport/user-select',
  43. 'col' => 'username',
  44. 'result' => 'id',
  45. ),
  46. 'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
  47. ),
  48. 'name' => array
  49. (
  50. 'type' => 'varchar-100',
  51. 'name' => '申请人姓名',
  52. 'default' => '',
  53. 'desc' => '申请人姓名',
  54. 'match' => 'is_string',
  55. 'update' => 'text',
  56. 'search' => 'fulltext',
  57. 'list' => true,
  58. ),
  59. 'mobile' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '申请人电话',
  63. 'default' => '',
  64. 'desc' => '申请人电话',
  65. 'match' => 'is_numeric',
  66. 'update' => 'text',
  67. 'search' => 'fulltext',
  68. 'list' => true,
  69. ),
  70. 'city' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '城市',
  74. 'default' => '',
  75. 'desc' => '城市',
  76. 'match' => 'option',
  77. //'update' => 'text',
  78. ),
  79. 'status' => array
  80. (
  81. 'type' => 'int-11',
  82. 'name' => '申请状态',
  83. 'default' => '1',
  84. 'desc' => '申请状态',
  85. 'match' => 'is_numeric',
  86. //'update' => 'select',
  87. 'option' => $status,
  88. 'search' => 'select',
  89. 'list' => true,
  90. 'edit' => true,
  91. ),
  92. 'state' => array
  93. (
  94. 'type' => 'tinyint-1',
  95. 'name' => '状态',
  96. 'default' => '1',
  97. 'desc' => '请选择状态',
  98. 'match' => 'is_numeric',
  99. ),
  100. 'cdate' => array
  101. (
  102. 'type' => 'int-11',
  103. 'name' => '录入时间',
  104. 'match' => array('is_numeric', time()),
  105. 'desc' => '',
  106. # 只有insert时才生效
  107. 'insert' => true,
  108. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  109. ),
  110. ),
  111. 'manage' => array
  112. (
  113. 'insert' => false,
  114. ),
  115. 'request' => array
  116. (
  117. ),
  118. );