code.php 2.0 KB

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