ding.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. $qudao = array
  3. (
  4. 1 => '虚拟人社区',
  5. );
  6. return array
  7. (
  8. # 表名
  9. 'name' => 'ding',
  10. # 显示给用户看的名称
  11. 'lang' => '订阅信息',
  12. # 是否显示在后台菜单
  13. 'order' => 100,
  14. # 数据结构
  15. 'struct' => array
  16. (
  17. 'id' => array
  18. (
  19. 'type' => 'int-11',
  20. 'name' => 'ID',
  21. 'default' => '',
  22. 'desc' => '',
  23. 'match' => 'is_numeric',
  24. 'order' => 'desc',
  25. 'list' => true,
  26. ),
  27. 'uid' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => '用户名',
  31. 'default' => '0',
  32. 'desc' => '请选择用户',
  33. 'match' => 'is_numeric',
  34. //'update' => 'select',
  35. //'search' => 'select',
  36. /*
  37. 'search' => array
  38. (
  39. 'api' => 'passport/user-all',
  40. 'col' => 'username',
  41. 'result' => 'id',
  42. ),
  43. */
  44. //'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
  45. ),
  46. 'username' => array
  47. (
  48. 'type' => 'varchar-200',
  49. 'name' => '用户名',
  50. 'default' => '',
  51. 'desc' => '用户名',
  52. 'match' => 'option',
  53. 'search' => 'fulltext',
  54. 'list' => true,
  55. ),
  56. 'email' => array
  57. (
  58. 'type' => 'varchar-500',
  59. 'name' => '电子邮件',
  60. 'default' => '',
  61. 'desc' => '电子邮件',
  62. 'match' => 'option',
  63. 'search' => 'fulltext',
  64. 'list' => true,
  65. ),
  66. 'qudao' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '订阅渠道',
  70. 'default' => '1',
  71. 'desc' => '订阅渠道',
  72. 'match' => 'is_numeric',
  73. 'update' => 'select',
  74. 'option' => $qudao,
  75. 'search' => 'select',
  76. 'list' => true,
  77. ),
  78. 'state' => array
  79. (
  80. 'type' => 'tinyint-1',
  81. 'name' => '状态',
  82. 'default' => '1',
  83. 'desc' => '请选择状态',
  84. 'match' => 'is_numeric',
  85. ),
  86. 'cdate' => array
  87. (
  88. 'type' => 'int-11',
  89. 'name' => '创建时间',
  90. 'match' => array('is_numeric', time()),
  91. 'desc' => '',
  92. # 只有insert时才生效
  93. 'insert' => true,
  94. 'search' => 'date',
  95. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  96. ),
  97. ),
  98. 'manage' => array
  99. (
  100. 'insert' => false,
  101. 'edit' => false,
  102. ),
  103. # request 请求接口定义
  104. 'request' => array
  105. (
  106. )
  107. );