config.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. $seller = function()
  3. {
  4. return Dever::db('code/seller')->state();
  5. };
  6. return array
  7. (
  8. # 表名
  9. 'name' => 'config',
  10. # 显示给用户看的名称
  11. 'lang' => '新增兑换码',
  12. 'order' => 1,
  13. 'menu' => false,
  14. 'end' => array
  15. (
  16. 'update' => 'code/lib/manage.create',
  17. 'insert' => 'code/lib/manage.create',
  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. 'value' => Dever::input('where_id'),
  30. ),
  31. 'product_id' => array
  32. (
  33. 'type' => 'int-11',
  34. 'name' => '选择小刊',
  35. 'default' => '',
  36. 'desc' => '选择小刊',
  37. 'match' => 'option',
  38. 'update' => 'select',
  39. 'update_search' => 'journal/lib/manage.search_journal',
  40. ),
  41. 'seller_id' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '选择销售商',
  45. 'default' => '1',
  46. 'desc' => '选择销售商',
  47. 'match' => 'option',
  48. 'update' => 'select',
  49. 'option' => $seller,
  50. ),
  51. 'num' => array
  52. (
  53. 'type' => 'varchar-32',
  54. 'name' => '兑换码数量',
  55. 'default' => '',
  56. 'desc' => '请输入兑换码数量',
  57. 'match' => 'is_string',
  58. 'update' => 'text',
  59. 'value' => '',
  60. ),
  61. 'product_num' => array
  62. (
  63. 'type' => 'varchar-32',
  64. 'name' => '兑换本数',
  65. 'default' => '1',
  66. 'desc' => '兑换本数',
  67. 'match' => 'is_string',
  68. 'update' => 'text',
  69. ),
  70. 'cdate' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '录入时间',
  74. 'match' => array('is_numeric', time()),
  75. 'desc' => '',
  76. # 只有insert时才生效
  77. 'insert' => true,
  78. ),
  79. ),
  80. 'manage' => array
  81. (
  82. # 后台管理不要列表页
  83. 'list' => 'update',
  84. ),
  85. );