order_goods.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. $type = Dever::db('agent/member_goods')->config['set']['type'];
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'order_goods',
  7. # 显示给用户看的名称
  8. 'lang' => '商品权益',
  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',
  21. 'update' => 'hidden',
  22. //'list' => true,
  23. ),
  24. 'order_id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => '订单表id',
  28. 'default' => '',
  29. 'desc' => '订单表id',
  30. 'match' => 'is_numeric',
  31. ),
  32. 'type' => array
  33. (
  34. 'type' => 'tinyint-1',
  35. 'name' => '类型',
  36. 'default' => '1',
  37. 'desc' => '类型',
  38. 'match' => 'is_numeric',
  39. 'update' => 'radio',
  40. 'option' => $type,
  41. ),
  42. 'type_id' => array
  43. (
  44. 'type' => 'int-11',
  45. 'name' => '类型id',
  46. 'default' => '-1',
  47. 'desc' => '类型id',
  48. 'match' => 'is_numeric',
  49. ),
  50. 'sku_id' => array
  51. (
  52. 'type' => 'int-11',
  53. 'name' => 'sku_id',
  54. 'default' => '-1',
  55. 'desc' => 'sku_id',
  56. 'match' => 'is_numeric',
  57. ),
  58. 'num' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '数量',
  62. 'default' => '',
  63. 'desc' => '数量',
  64. 'match' => 'is_numeric',
  65. 'search' => 'select',
  66. 'list' => true,
  67. ),
  68. 'state' => array
  69. (
  70. 'type' => 'tinyint-1',
  71. 'name' => '状态',
  72. 'default' => '1',
  73. 'desc' => '请选择状态',
  74. 'match' => 'is_numeric',
  75. ),
  76. 'cdate' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => '创建时间',
  80. 'match' => array('is_numeric', time()),
  81. 'desc' => '',
  82. # 只有insert时才生效
  83. //'insert' => true,
  84. 'search' => 'date',
  85. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  86. ),
  87. ),
  88. 'manage' => array
  89. (
  90. ),
  91. 'request' => array
  92. (
  93. 'getData' => array
  94. (
  95. # 匹配的正则或函数 选填项
  96. 'option' => array
  97. (
  98. 'order_id' => 'yes',
  99. 'config' => 'yes',
  100. 'state' => 1,
  101. ),
  102. 'order' => array('type' => 'desc', 'id' => 'desc'),
  103. 'type' => 'all',
  104. 'col' => '*',
  105. ),
  106. ),
  107. );