domain.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. /**
  3. * domain
  4. */
  5. $user = function()
  6. {
  7. $array = array();
  8. $info = Dever::load('component/user-state');
  9. if($info)
  10. {
  11. $array += $info;
  12. }
  13. return $array;
  14. };
  15. return array
  16. (
  17. # 表名
  18. 'name' => 'domain',
  19. # 显示给用户看的名称
  20. 'lang' => '设置服务域名',
  21. 'order' => 99,
  22. 'end' => array
  23. (
  24. 'insert' => array
  25. (
  26. 'component_applet/domain.update',
  27. ),
  28. 'update' => array
  29. (
  30. 'component_applet/domain.update',
  31. ),
  32. ),
  33. # 数据结构
  34. 'struct' => array
  35. (
  36. 'id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => 'ID',
  40. 'default' => '',
  41. 'desc' => '',
  42. 'match' => 'is_numeric',
  43. 'search' => 'order',
  44. 'list' => true,
  45. ),
  46. 'project_id' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '项目',
  50. 'default' => '',
  51. 'desc' => '请输入项目',
  52. 'match' => 'is_numeric',
  53. ),
  54. 'user' => array
  55. (
  56. 'type' => 'varchar-255',
  57. 'name' => '用户-不选择则获取所有用户',
  58. 'default' => '',
  59. 'desc' => '用户',
  60. 'match' => 'option',
  61. //'search' => 'order,fulltext',
  62. //'update' => 'checkbox',
  63. 'option' => $user,
  64. //'list' => true,
  65. ),
  66. 'value' => array
  67. (
  68. 'type' => 'varchar-255',
  69. 'name' => '域名',
  70. 'default' => '',
  71. 'desc' => '域名',
  72. 'match' => 'is_string',
  73. 'update' => 'text',
  74. 'list' => true,
  75. ),
  76. 'state' => array
  77. (
  78. 'type' => 'tinyint-1',
  79. 'name' => '状态',
  80. 'default' => '1',
  81. 'desc' => '请选择状态',
  82. 'match' => 'is_numeric',
  83. ),
  84. 'cdate' => array
  85. (
  86. 'type' => 'int-11',
  87. 'name' => '录入时间',
  88. 'match' => array('is_numeric', time()),
  89. 'desc' => '',
  90. # 只有insert时才生效
  91. 'insert' => true,
  92. ),
  93. ),
  94. 'top' => Dever::config('base', 'component')->top,
  95. 'manage' => array
  96. (
  97. ),
  98. );