template.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'template',
  6. # 显示给用户看的名称
  7. 'lang' => '模板设置',
  8. 'order' => 20,
  9. 'check' => 'key',
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. //'list' => true,
  22. ),
  23. 'name' => array
  24. (
  25. 'type' => 'varchar-32',
  26. 'name' => '模板名称',
  27. 'default' => '',
  28. 'desc' => '模板名称',
  29. 'match' => 'is_string',
  30. 'update' => 'text',
  31. 'search' => 'fulltext',
  32. 'list' => true,
  33. ),
  34. 'key' => array
  35. (
  36. 'type' => 'varchar-32',
  37. 'name' => '模板标识-调用模板时,使用该标识来获取模板信息',
  38. 'default' => '',
  39. 'desc' => '模板标识',
  40. 'match' => 'is_string',
  41. 'update' => 'text',
  42. 'search' => 'fulltext',
  43. 'list' => true,
  44. ),
  45. 'background' => array
  46. (
  47. 'type' => 'varchar-150',
  48. 'name' => '模板背景图',
  49. 'default' => '',
  50. 'desc' => '模板背景图',
  51. 'match' => 'option',
  52. 'update' => 'image',
  53. 'key' => '1',
  54. 'place' => '150',
  55. ),
  56. 'pic' => array
  57. (
  58. 'type' => 'varchar-150',
  59. 'name' => '模板样例图',
  60. 'default' => '',
  61. 'desc' => '模板样例图',
  62. 'match' => 'option',
  63. 'update' => 'image',
  64. 'key' => '1',
  65. 'place' => '150',
  66. ),
  67. 'state' => array
  68. (
  69. 'type' => 'tinyint-1',
  70. 'name' => '状态',
  71. 'default' => '1',
  72. 'desc' => '请选择状态',
  73. 'match' => 'is_numeric',
  74. ),
  75. 'cdate' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '录入时间',
  79. 'match' => array('is_numeric', time()),
  80. 'desc' => '',
  81. # 只有insert时才生效
  82. 'insert' => true,
  83. 'search' => 'date',
  84. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  85. ),
  86. ),
  87. # 管理功能
  88. 'manage' => array
  89. (
  90. # 列表
  91. 'list_button' => array
  92. (
  93. 'list' => array('模块', '"model&project=poster&search_option_template_id={id}&oper_parent=template&oper_project=poster"'),
  94. ),
  95. ),
  96. );