col.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. $time = time();
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'col',
  7. # 显示给用户看的名称
  8. 'lang' => '维度管理',
  9. 'order' => -10,
  10. 'check' => 'key',
  11. 'end' => array
  12. (
  13. 'insert' => 'log/lib/manage.create',
  14. 'update' => 'log/lib/manage.create',
  15. ),
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. //'search' => 'order',
  27. 'order' => 'desc',
  28. 'list' => true,
  29. ),
  30. 'name' => array
  31. (
  32. 'type' => 'varchar-60',
  33. 'name' => '维度名称',
  34. 'default' => '',
  35. 'desc' => '请输入维度名称',
  36. 'match' => 'is_string',
  37. 'update' => 'text',
  38. 'search' => 'fulltext',
  39. 'list' => true,
  40. ),
  41. 'key' => array
  42. (
  43. 'type' => 'varchar-60',
  44. 'name' => '维度标识',
  45. 'default' => '',
  46. 'desc' => '请输入维度标识',
  47. 'match' => 'is_string',
  48. 'update' => 'text',
  49. 'search' => 'fulltext',
  50. 'list' => true,
  51. ),
  52. 'state' => array
  53. (
  54. 'type' => 'tinyint-1',
  55. 'name' => '状态',
  56. 'default' => '1',
  57. 'desc' => '请选择状态',
  58. 'match' => 'is_numeric',
  59. ),
  60. 'cdate' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => '录入时间',
  64. 'match' => array('is_numeric', time()),
  65. 'desc' => '',
  66. # 只有insert时才生效
  67. 'insert' => true,
  68. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  69. ),
  70. ),
  71. 'manage' => array
  72. (
  73. ),
  74. # 默认值
  75. 'default' => array
  76. (
  77. 'col' => 'name,`key`,state,cdate',
  78. 'value' => array
  79. (
  80. '"项目ID","project",1,' . $time,
  81. '"来源","source",1,' . $time,
  82. '"系统","system",1,' . $time,
  83. '"用户ID","uid",1,' . $time,
  84. '"UA信息","ua",1,' . $time,
  85. '"是否微信","ck_wechat",1,' . $time,
  86. '"是否手机","ck_mobile",1,' . $time,
  87. '"ip地址","ip",1,' . $time,
  88. '"操作系统","os",1,' . $time,
  89. '"浏览器","browser",1,' . $time,
  90. ),
  91. ),
  92. # request 请求接口定义
  93. 'request' => array
  94. (
  95. ),
  96. );