channel.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'channel',
  6. # 显示给用户看的名称
  7. 'lang' => '渠道管理',
  8. 'order' => 8,
  9. 'menu' => false,
  10. 'end' => array
  11. (
  12. 'update' => array
  13. (
  14. 'pay/lib/manage.updateChannel',
  15. ),
  16. 'insert' => array
  17. (
  18. 'pay/lib/manage.updateChannel',
  19. )
  20. ),
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'search' => 'order',
  32. 'list' => true,
  33. ),
  34. 'name' => array
  35. (
  36. 'type' => 'varchar-60',
  37. 'name' => '渠道名称',
  38. 'default' => '',
  39. 'desc' => '渠道名称',
  40. 'match' => 'is_string',
  41. 'update' => 'text',
  42. 'search' => 'fulltext',
  43. 'list' => true,
  44. ),
  45. 'state' => array
  46. (
  47. 'type' => 'tinyint-1',
  48. 'name' => '状态',
  49. 'default' => '1',
  50. 'desc' => '请选择状态',
  51. 'match' => 'is_numeric',
  52. ),
  53. 'cdate' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '申请时间',
  57. 'match' => array('is_numeric', time()),
  58. 'desc' => '',
  59. # 只有insert时才生效
  60. 'insert' => true,
  61. 'search' => 'date',
  62. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  63. ),
  64. ),
  65. # 默认值
  66. 'default' => array
  67. (
  68. 'col' => 'name,state,cdate',
  69. 'value' => array
  70. (
  71. '"官方渠道",1,' . time(),
  72. ),
  73. ),
  74. # request 请求接口定义
  75. 'request' => array
  76. (
  77. 'getData' => array
  78. (
  79. 'where' => array
  80. (
  81. 'state' => 1,
  82. ),
  83. 'col' => 'id,name',
  84. 'type' => 'all',
  85. ),
  86. )
  87. );