info.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'info',
  6. # 显示给用户看的名称
  7. 'lang' => '公司简介',
  8. 'order' => 100,
  9. # 数据结构
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. 'list' => true,
  20. ),
  21. 'name' => array
  22. (
  23. 'type' => 'varchar-80',
  24. 'name' => '标题',
  25. 'default' => '',
  26. 'desc' => '标题',
  27. 'match' => 'is_string',
  28. 'update' => 'text',
  29. 'list' => true,
  30. 'search' => 'fulltext',
  31. //增加预览
  32. 'preview' => true,
  33. ),
  34. 'pic' => array
  35. (
  36. 'type' => 'varchar-150',
  37. 'name' => '图片-图片尺寸600*600px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  38. 'default' => '',
  39. 'desc' => '图片',
  40. 'match' => 'is_string',
  41. 'update' => 'image',
  42. 'key' => '1',
  43. 'place' => '600',
  44. //直接上传到云端
  45. //'upload' => 'qiniu',
  46. //上传大数据
  47. //'large' => true,
  48. ),
  49. 'content' => array
  50. (
  51. 'type' => 'text-255',
  52. 'name' => '内容',
  53. 'default' => '',
  54. 'desc' => '请输入内容',
  55. 'match' => 'is_string',
  56. 'update' => 'editor',
  57. 'key' => '1',
  58. ),
  59. 'reorder' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '排序(数值越大越靠前)',
  63. 'default' => '1',
  64. 'desc' => '请输入排序',
  65. 'match' => 'option',
  66. 'update' => 'text',
  67. 'search' => 'order',
  68. 'list' => true,
  69. 'order' => 'desc',
  70. 'edit' => true,
  71. ),
  72. 'state' => array
  73. (
  74. 'type' => 'tinyint-1',
  75. 'name' => '状态',
  76. 'default' => '1',
  77. 'desc' => '请选择状态',
  78. 'match' => 'is_numeric',
  79. ),
  80. 'cdate' => array
  81. (
  82. 'type' => 'int-11',
  83. 'name' => '录入时间',
  84. 'match' => array('is_numeric', time()),
  85. 'desc' => '',
  86. # 只有insert时才生效
  87. 'insert' => true,
  88. ),
  89. ),
  90. # 管理功能
  91. 'manage' => array
  92. (
  93. //'insert' => false,
  94. ),
  95. # request 请求接口定义
  96. 'request' => array
  97. (
  98. ),
  99. );