code.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. 'state' => array
  57. (
  58. 'type' => 'tinyint-1',
  59. 'name' => '状态',
  60. 'default' => '1',
  61. 'desc' => '请选择状态',
  62. 'match' => 'is_numeric',
  63. ),
  64. 'cdate' => array
  65. (
  66. 'type' => 'int-11',
  67. 'name' => '申请时间',
  68. 'match' => array('is_numeric', time()),
  69. 'desc' => '',
  70. # 只有insert时才生效
  71. 'insert' => true,
  72. 'search' => 'date',
  73. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  74. ),
  75. ),
  76. );