code.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. $mobile = Dever::rule('mobile');
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'code',
  7. # 显示给用户看的名称
  8. 'lang' => '验证码',
  9. 'menu' => false,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. //'list' => true,
  22. ),
  23. 'mobile' => array
  24. (
  25. 'type' => 'varchar-32',
  26. 'name' => '手机号',
  27. 'default' => '',
  28. 'desc' => '请输入用户手机号',
  29. 'match' => $mobile,
  30. 'update' => 'text',
  31. 'search' => 'fulltext',
  32. 'list' => true,
  33. ),
  34. 'code' => array
  35. (
  36. 'type' => 'varchar-32',
  37. 'name' => '验证码',
  38. 'default' => '',
  39. 'desc' => '验证码',
  40. 'match' => 'is_string',
  41. 'update' => 'text',
  42. 'search' => 'fulltext',
  43. 'list' => true,
  44. ),
  45. 'day' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '申请天',
  49. 'default' => '',
  50. 'desc' => '申请天',
  51. 'match' => 'is_numeric',
  52. 'update' => 'text',
  53. //'search' => 'fulltext',
  54. //'list' => true,
  55. ),
  56. 'result' => array
  57. (
  58. 'type' => 'text-255',
  59. 'name' => '返回记录',
  60. 'default' => '',
  61. 'desc' => '返回记录',
  62. 'match' => 'is_string',
  63. 'update' => 'text',
  64. 'search' => 'fulltext',
  65. 'list' => 'table',
  66. 'modal' => '查看详情',
  67. ),
  68. 'state' => array
  69. (
  70. 'type' => 'tinyint-1',
  71. 'name' => '状态',
  72. 'default' => '1',
  73. 'desc' => '请选择状态',
  74. 'match' => 'is_numeric',
  75. ),
  76. 'cdate' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => '申请时间',
  80. 'match' => array('is_numeric', time()),
  81. 'desc' => '',
  82. # 只有insert时才生效
  83. 'insert' => true,
  84. 'search' => 'date',
  85. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  86. ),
  87. ),
  88. );