shop.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. $pay_channel = function()
  3. {
  4. return Dever::load('pay/api.channel');
  5. };
  6. return array
  7. (
  8. # 表名
  9. 'name' => 'shop',
  10. # 显示给用户看的名称
  11. 'lang' => '店铺管理',
  12. # 是否显示在后台菜单
  13. 'order' => 1,
  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' => 'asc',
  25. 'list' => true,
  26. ),
  27. 'name' => array
  28. (
  29. 'type' => 'varchar-150',
  30. 'name' => '店铺名称',
  31. 'default' => '',
  32. 'desc' => '店铺名称',
  33. 'match' => 'is_string',
  34. 'update' => 'text',
  35. 'search' => 'fulltext',
  36. 'list' => true,
  37. 'edit' => true,
  38. ),
  39. 'pay_channel' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '支付渠道',
  43. 'default' => '1',
  44. 'desc' => '支付渠道',
  45. 'match' => 'is_numeric',
  46. 'update' => 'select',
  47. 'option' => $pay_channel,
  48. ),
  49. 'reorder' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '排序(数值越大越靠前)',
  53. 'default' => '1',
  54. 'desc' => '请输入排序',
  55. 'match' => 'option',
  56. 'update' => 'text',
  57. 'search' => 'order',
  58. 'list_name' => '排序',
  59. 'list' => true,
  60. 'order' => 'desc',
  61. 'edit' => true,
  62. ),
  63. 'state' => array
  64. (
  65. 'type' => 'tinyint-1',
  66. 'name' => '状态',
  67. 'default' => '1',
  68. 'desc' => '请选择状态',
  69. 'match' => 'is_numeric',
  70. ),
  71. 'cdate' => array
  72. (
  73. 'type' => 'int-11',
  74. 'name' => '录入时间',
  75. 'match' => array('is_numeric', time()),
  76. 'desc' => '',
  77. # 只有insert时才生效
  78. 'insert' => true,
  79. 'search' => 'date',
  80. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  81. ),
  82. ),
  83. 'manage' => array
  84. (
  85. ),
  86. # 默认值
  87. 'default' => array
  88. (
  89. 'col' => 'name,state,cdate',
  90. 'value' => array
  91. (
  92. '"官方店铺",1,' . time(),
  93. ),
  94. ),
  95. 'request' => array
  96. (
  97. )
  98. );