order_goods.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. $type = array
  3. (
  4. 1 => '商品',
  5. //2 => '体验卡',
  6. //3 => '名额',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'role_goods',
  12. # 显示给用户看的名称
  13. 'lang' => '商品权益',
  14. 'menu' => false,
  15. 'set' => array
  16. (
  17. 'type' => $type,
  18. ),
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'search' => 'order',
  30. 'update' => 'hidden',
  31. //'list' => true,
  32. ),
  33. 'order_id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '订单表id',
  37. 'default' => '',
  38. 'desc' => '订单表id',
  39. 'match' => 'is_numeric',
  40. ),
  41. 'type' => array
  42. (
  43. 'type' => 'tinyint-1',
  44. 'name' => '类型',
  45. 'default' => '1',
  46. 'desc' => '类型',
  47. 'match' => 'is_numeric',
  48. 'update' => 'radio',
  49. 'option' => $type,
  50. ),
  51. 'goods_id' => array
  52. (
  53. 'type' => 'int-11',
  54. 'name' => '商品名称',
  55. 'default' => '-1',
  56. 'desc' => '商品名称',
  57. 'match' => 'is_numeric',
  58. 'list' => 'Dever::load("goods/info-find#name", {goods_id})',
  59. ),
  60. 'sku_id' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => 'sku_id',
  64. 'default' => '-1',
  65. 'desc' => 'sku_id',
  66. 'match' => 'is_numeric',
  67. ),
  68. 'num' => array
  69. (
  70. 'type' => 'int-11',
  71. 'name' => '数量',
  72. 'default' => '',
  73. 'desc' => '数量',
  74. 'match' => 'is_numeric',
  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. ),
  101. 'request' => array
  102. (
  103. ),
  104. );