relation.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'relation',
  6. # 显示给用户看的名称
  7. 'lang' => '邀请关系',
  8. # 是否显示在后台菜单
  9. 'order' => 9,
  10. 'menu' => false,
  11. # 数据结构
  12. 'struct' => array
  13. (
  14. 'id' => array
  15. (
  16. 'type' => 'int-11',
  17. 'name' => 'ID',
  18. 'default' => '',
  19. 'desc' => '',
  20. 'match' => 'is_numeric',
  21. //'list' => true,
  22. ),
  23. 'uid' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '邀请人',
  27. 'default' => '',
  28. 'desc' => '邀请人',
  29. 'match' => 'is_numeric',
  30. 'list' => true,
  31. ),
  32. 'to_uid' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '被邀请人',
  36. 'default' => '',
  37. 'desc' => '被邀请人',
  38. 'match' => 'is_numeric',
  39. 'list' => true,
  40. ),
  41. 'level' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '邀请级数',
  45. 'default' => '',
  46. 'desc' => '邀请级数',
  47. 'match' => 'is_numeric',
  48. 'list' => true,
  49. ),
  50. 'cdate' => array
  51. (
  52. 'type' => 'int-11',
  53. 'name' => '录入时间',
  54. 'match' => array('is_numeric', time()),
  55. 'desc' => '',
  56. # 只有insert时才生效
  57. 'insert' => true,
  58. 'search' => 'date',
  59. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  60. ),
  61. ),
  62. 'manage' => array
  63. (
  64. 'delete' => false,
  65. 'edit' => false,
  66. 'insert' => false,
  67. ),
  68. 'request' => array
  69. (
  70. 'getChild' => array
  71. (
  72. # 匹配的正则或函数 选填项
  73. 'where' => array
  74. (
  75. 'uid' => 'yes',
  76. 'level' => array('yes', '<='),
  77. ),
  78. 'type' => 'all',
  79. 'order' => array('id' => 'desc'),
  80. 'col' => '*',
  81. ),
  82. )
  83. );