user_task.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. $status = array
  3. (
  4. 1 => '正常',
  5. 2 => '异常',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'user_task',
  11. # 显示给用户看的名称
  12. 'lang' => '用户任务',
  13. 'menu' => 'passport',
  14. 'order' => 100,
  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. 'order' => 'desc',
  27. 'list' => true,
  28. ),
  29. 'uid' => array
  30. (
  31. 'type' => 'int-11',
  32. 'name' => '用户名',
  33. 'default' => '',
  34. 'desc' => '用户名',
  35. 'match' => 'is_numeric',
  36. //'update' => 'text',
  37. 'search' => array
  38. (
  39. 'api' => 'passport/user-all',
  40. 'col' => 'username',
  41. 'result' => 'id',
  42. ),
  43. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  44. ),
  45. 'task_id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '任务名',
  49. 'default' => '-1',
  50. 'desc' => '任务名',
  51. 'match' => 'is_numeric',
  52. //'update' => 'select',
  53. 'search' => array
  54. (
  55. 'api' => 'task/info-all',
  56. 'col' => 'name',
  57. 'result' => 'id',
  58. ),
  59. 'list' => '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
  60. ),
  61. 'status' => array
  62. (
  63. 'type' => 'tinyint-1',
  64. 'name' => '审核状态',
  65. 'default' => '1',
  66. 'desc' => '审核状态',
  67. 'match' => 'is_numeric',
  68. 'update' => 'select',
  69. 'option' => $status,
  70. 'search' => 'select',
  71. 'list' => true,
  72. 'edit' => true,
  73. ),
  74. 'state' => array
  75. (
  76. 'type' => 'tinyint-1',
  77. 'name' => '状态',
  78. 'default' => '1',
  79. 'desc' => '请选择状态',
  80. 'match' => 'is_numeric',
  81. ),
  82. 'cdate' => array
  83. (
  84. 'type' => 'int-11',
  85. 'name' => '领取时间',
  86. 'match' => array('is_numeric', time()),
  87. 'desc' => '',
  88. # 只有insert时才生效
  89. 'insert' => true,
  90. 'search' => 'date',
  91. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  92. ),
  93. ),
  94. 'manage' => array
  95. (
  96. 'insert' => false,
  97. 'edit' => false,
  98. 'delete' => false,
  99. ),
  100. );