share.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. $type = array
  3. (
  4. 1 => '微博分享',
  5. 2 => '微信分享',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'share',
  11. # 显示给用户看的名称
  12. 'lang' => '分享日志',
  13. # 是否显示在后台菜单
  14. 'order' => 101,
  15. # 数据结构
  16. 'struct' => array
  17. (
  18. 'id' => array
  19. (
  20. 'type' => 'int-11',
  21. 'name' => 'ID',
  22. 'default' => '',
  23. 'desc' => '',
  24. 'match' => 'is_numeric',
  25. 'order' => 'desc',
  26. 'list' => true,
  27. ),
  28. 'name' => array
  29. (
  30. 'type' => 'varchar-200',
  31. 'name' => '分享内容标题',
  32. 'default' => '',
  33. 'desc' => '分享内容标题',
  34. 'match' => 'option',
  35. 'search' => 'fulltext',
  36. 'list' => true,
  37. ),
  38. 'link' => array
  39. (
  40. 'type' => 'varchar-500',
  41. 'name' => '分享链接',
  42. 'default' => '',
  43. 'desc' => '分享链接',
  44. 'match' => 'option',
  45. 'search' => 'fulltext',
  46. 'list' => true,
  47. ),
  48. 'type' => array
  49. (
  50. 'type' => 'int-11',
  51. 'name' => '分享类别',
  52. 'default' => '1',
  53. 'desc' => '分享类别',
  54. 'match' => 'is_numeric',
  55. 'update' => 'select',
  56. 'option' => $type,
  57. 'search' => 'select',
  58. 'list' => true,
  59. ),
  60. 'state' => array
  61. (
  62. 'type' => 'tinyint-1',
  63. 'name' => '状态',
  64. 'default' => '1',
  65. 'desc' => '请选择状态',
  66. 'match' => 'is_numeric',
  67. ),
  68. 'cdate' => array
  69. (
  70. 'type' => 'int-11',
  71. 'name' => '分享时间',
  72. 'match' => array('is_numeric', time()),
  73. 'desc' => '',
  74. # 只有insert时才生效
  75. 'insert' => true,
  76. 'search' => 'date',
  77. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  78. ),
  79. ),
  80. 'manage' => array
  81. (
  82. 'insert' => false,
  83. 'edit' => false,
  84. ),
  85. # request 请求接口定义
  86. 'request' => array
  87. (
  88. )
  89. );