collection.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'collection',
  6. # 显示给用户看的名称
  7. 'lang' => '用户拥有合集记录',
  8. 'menu' => false,
  9. # 数据结构
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. 'search' => 'order',
  20. 'update' => 'hidden',
  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. 'source_uid' => array
  41. (
  42. 'type' => 'int-11',
  43. 'name' => '来源',
  44. 'default' => '0',
  45. 'desc' => '请选择用户',
  46. 'match' => 'is_numeric',
  47. 'update' => 'text',
  48. //'search' => 'select',
  49. 'search' => array
  50. (
  51. 'api' => 'passport/user-all',
  52. 'col' => 'username',
  53. 'result' => 'id',
  54. ),
  55. 'list' => '{source_uid} > 0 ? Dever::load("passport/user-one#username", {source_uid}) : "无"',
  56. ),
  57. 'info_id' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '合集',
  61. 'default' => '',
  62. 'desc' => '合集',
  63. 'match' => 'is_numeric',
  64. 'update' => 'text',
  65. ),
  66. 'ticket_id' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '门票id',
  70. 'default' => '',
  71. 'desc' => '门票id',
  72. 'match' => 'is_numeric',
  73. 'update' => 'text',
  74. ),
  75. 'num' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '数量',
  79. 'default' => '0',
  80. 'desc' => '数量',
  81. 'match' => 'is_numeric',
  82. 'update' => 'text',
  83. ),
  84. 'state' => array
  85. (
  86. 'type' => 'tinyint-1',
  87. 'name' => '状态',
  88. 'default' => '1',
  89. 'desc' => '请选择状态',
  90. 'match' => 'is_numeric',
  91. ),
  92. 'cdate' => array
  93. (
  94. 'type' => 'int-11',
  95. 'name' => '操作时间',
  96. 'match' => array('is_numeric', time()),
  97. 'desc' => '',
  98. # 只有insert时才生效
  99. //'insert' => true,
  100. 'search' => 'date',
  101. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  102. ),
  103. ),
  104. 'manage' => array
  105. (
  106. ),
  107. 'request' => array
  108. (
  109. ),
  110. );