share.php 1.9 KB

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