user_system.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'user_system',
  6. # 显示给用户看的名称
  7. 'lang' => '用户与项目关联表',
  8. 'order' => 10,
  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,fulltext',
  21. 'list' => true,
  22. ),
  23. 'uid' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '用户名',
  27. 'default' => '0',
  28. 'desc' => '请选择用户',
  29. 'match' => 'is_numeric',
  30. 'update' => 'text',
  31. //'search' => 'select',
  32. 'search' => array
  33. (
  34. 'api' => 'passport/user-all',
  35. 'col' => 'username',
  36. 'result' => 'id',
  37. ),
  38. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
  39. ),
  40. 'system_id' => array
  41. (
  42. 'type' => 'int-11',
  43. 'name' => '所属项目',
  44. 'default' => '1',
  45. 'desc' => '所属项目',
  46. 'match' => 'is_numeric',
  47. 'option' => $system,
  48. //'update' => 'select',
  49. //'list' => true,
  50. ),
  51. 'state' => array
  52. (
  53. 'type' => 'tinyint-1',
  54. 'name' => '状态',
  55. 'default' => '1',
  56. 'desc' => '请选择状态',
  57. 'match' => 'is_numeric',
  58. ),
  59. 'cdate' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '创建时间',
  63. 'match' => array('is_numeric', time()),
  64. 'desc' => '',
  65. # 只有insert时才生效
  66. 'insert' => true,
  67. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  68. ),
  69. ),
  70. );