order.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <?php
  2. $config = array
  3. (
  4. # 表名
  5. 'name' => 'order',
  6. # 显示给用户看的名称
  7. 'lang' => '商品订单',
  8. 'order' => 300,
  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. //'list' => true,
  21. ),
  22. 'uid' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => '用户名',
  26. 'default' => '0',
  27. 'desc' => '请选择用户',
  28. 'match' => 'is_numeric',
  29. 'update' => 'text',
  30. //'search' => 'select',
  31. 'search' => array
  32. (
  33. 'api' => 'passport/user-all',
  34. 'col' => 'username',
  35. 'result' => 'id',
  36. ),
  37. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
  38. ),
  39. 'info_id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '商品ID',
  43. 'default' => '',
  44. 'desc' => '商品ID',
  45. 'match' => 'is_numeric',
  46. 'update' => 'text',
  47. 'list' => true,
  48. ),
  49. 'name' => array
  50. (
  51. 'type' => 'varchar-100',
  52. 'name' => '商品名称',
  53. 'default' => '',
  54. 'desc' => '商品名称',
  55. 'match' => 'is_string',
  56. 'update' => 'text',
  57. 'list' => true,
  58. ),
  59. 'cash' => array
  60. (
  61. 'type' => 'varchar-100',
  62. 'name' => '价格',
  63. 'default' => '',
  64. 'desc' => '价格',
  65. 'match' => 'is_string',
  66. 'update' => 'text',
  67. 'list' => true,
  68. ),
  69. 'num' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '数量',
  73. 'default' => '',
  74. 'desc' => '数量',
  75. 'match' => 'is_string',
  76. 'update' => 'text',
  77. 'list' => true,
  78. ),
  79. 'source' => array
  80. (
  81. 'type' => 'varchar-100',
  82. 'name' => '来源',
  83. 'default' => '',
  84. 'desc' => '来源',
  85. 'match' => 'is_string',
  86. 'update' => 'text',
  87. //'list' => true,
  88. ),
  89. 'status' => array
  90. (
  91. 'type' => 'tinyint-1',
  92. 'name' => '订单状态',
  93. 'default' => '1',
  94. 'desc' => '订单状态',
  95. 'match' => 'is_numeric',
  96. ),
  97. 'state' => array
  98. (
  99. 'type' => 'tinyint-1',
  100. 'name' => '数据状态',
  101. 'default' => '1',
  102. 'desc' => '请选择状态',
  103. 'match' => 'is_numeric',
  104. ),
  105. 'cdate' => array
  106. (
  107. 'type' => 'int-11',
  108. 'name' => '发布时间',
  109. 'match' => array('is_numeric', time()),
  110. 'desc' => '',
  111. # 只有insert时才生效
  112. 'insert' => true,
  113. //'search' => 'date',
  114. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  115. ),
  116. ),
  117. 'manage' => array
  118. (
  119. 'insert' => false,
  120. 'edit' => false,
  121. 'delete' => false,
  122. ),
  123. # request 请求接口定义
  124. 'request' => array
  125. (
  126. ),
  127. );
  128. return $config;