pic.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?php
  2. $type = array
  3. (
  4. 1 => '现场直击',
  5. 2 => '超模风采',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'pic',
  11. # 显示给用户看的名称
  12. 'lang' => '活动图片',
  13. 'order' => 80,
  14. # 数据结构
  15. 'struct' => array
  16. (
  17. 'id' => array
  18. (
  19. 'type' => 'int-11',
  20. 'name' => 'ID',
  21. 'default' => '',
  22. 'desc' => '',
  23. 'match' => 'is_numeric',
  24. 'list' => true,
  25. ),
  26. 'act_id' => array
  27. (
  28. 'type' => 'int-11',
  29. 'name' => '活动id',
  30. 'default' => '',
  31. 'desc' => '活动id',
  32. 'match' => 'is_numeric',
  33. ),
  34. 'type' => array
  35. (
  36. 'type' => 'tinyint-1',
  37. 'name' => '类型',
  38. 'default' => '1',
  39. 'desc' => '类型',
  40. 'match' => 'is_numeric',
  41. 'option' => $type,
  42. 'update' => 'radio',
  43. 'search' => 'select',
  44. 'list' => true,
  45. 'edit' => true,
  46. ),
  47. 'pic' => array
  48. (
  49. 'type' => 'varchar-255',
  50. 'name' => '图片-图片比例要求宽度不超过960px,高度不超过1200px',
  51. 'default' => '',
  52. 'desc' => '图片',
  53. 'match' => 'option',
  54. 'update' => 'image',
  55. 'key' => '1',
  56. 'list' => 'Dever::load("content/lib/manage.showPic", {id})',
  57. ),
  58. 'reorder' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '排序-数值越大越靠前,相当于置顶',
  62. 'default' => '1',
  63. 'desc' => '请输入排序',
  64. 'match' => 'option',
  65. //'update' => 'text',
  66. 'search' => 'order',
  67. 'list' => true,
  68. 'order' => 'desc',
  69. 'edit' => true,
  70. ),
  71. 'state' => array
  72. (
  73. 'type' => 'tinyint-1',
  74. 'name' => '状态',
  75. 'default' => '1',
  76. 'desc' => '请选择状态',
  77. 'match' => 'is_numeric',
  78. ),
  79. 'cdate' => array
  80. (
  81. 'type' => 'int-11',
  82. 'name' => '录入时间',
  83. 'match' => array('is_numeric', time()),
  84. 'desc' => '',
  85. # 只有insert时才生效
  86. 'insert' => true,
  87. ),
  88. ),
  89. # 管理功能
  90. 'manage' => array
  91. (
  92. 'insert' => false,
  93. 'edit' => false,
  94. # 自定义快捷新增和编辑
  95. 'button' => array
  96. (
  97. '新增' => array('fast'),
  98. ),
  99. 'list_button' => array
  100. (
  101. 'edit' => array('编辑'),
  102. )
  103. ),
  104. # request 请求接口定义
  105. 'request' => array
  106. (
  107. ),
  108. );