mobile.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. $product = function()
  3. {
  4. return Dever::db('journal/info')->state();
  5. };
  6. return array
  7. (
  8. # 表名
  9. 'name' => 'mobile',
  10. # 显示给用户看的名称
  11. 'lang' => '电子刊导入用户',
  12. 'order' => 1,
  13. # 数据结构
  14. 'struct' => array
  15. (
  16. 'id' => array
  17. (
  18. 'type' => 'int-11',
  19. 'name' => 'ID',
  20. 'default' => '',
  21. 'desc' => '',
  22. 'match' => 'is_numeric',
  23. 'search' => 'order',
  24. //'list' => true,
  25. ),
  26. 'mobile' => array
  27. (
  28. 'type' => 'varchar-300',
  29. 'name' => '手机号',
  30. 'default' => '',
  31. 'desc' => '手机号',
  32. 'match' => 'is_string',
  33. 'update' => 'text',
  34. 'search' => 'fulltext',
  35. 'list' => true,
  36. //'list' => '"{order_id}" ? "{order_id}" : "{code}"',
  37. ),
  38. 'product_id' => array
  39. (
  40. 'type' => 'int-11',
  41. 'name' => '小刊',
  42. 'default' => '',
  43. 'desc' => '小刊',
  44. 'match' => 'is_numeric',
  45. 'update' => 'select',
  46. 'option' => $product,
  47. 'search' => 'select',
  48. 'list' => true,
  49. ),
  50. 'state' => array
  51. (
  52. 'type' => 'tinyint-1',
  53. 'name' => '状态',
  54. 'default' => '1',
  55. 'desc' => '请选择状态',
  56. 'match' => 'is_numeric',
  57. ),
  58. 'cdate' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '导入时间',
  62. 'match' => array('is_numeric', time()),
  63. 'desc' => '',
  64. 'default' => '',
  65. # 只有insert时才生效
  66. 'insert' => true,
  67. 'search' => 'date',
  68. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  69. //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
  70. ),
  71. ),
  72. 'manage' => array
  73. (
  74. //'delete' => false,
  75. 'edit' => false,
  76. 'insert' => false,
  77. 'button' => array
  78. (
  79. '导入用户' => array('fast', 1, 'mobile_upload&where_id=1'),
  80. '下载导入模板' => array('location', 'journal/lib/manage.mobileTemplate'),
  81. ),
  82. ),
  83. 'request' => array
  84. (
  85. ),
  86. );