control_log.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'control_log',
  6. # 显示给用户看的名称
  7. 'lang' => '控制器日志',
  8. 'menu' => false,
  9. 'order' => 20,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. //'search' => 'order',
  21. //'list' => true,
  22. ),
  23. /*
  24. 'id' => array
  25. (
  26. 'type' => 'varchar-50',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_string',
  31. 'search' => 'order',
  32. 'list' => true,
  33. ),
  34. */
  35. 'product_id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '成品设备',
  39. 'default' => '',
  40. 'desc' => '请输入设备ID',
  41. 'match' => 'is_numeric',
  42. 'update' => 'text',
  43. ),
  44. 'device_id' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '基础设备',
  48. 'default' => '',
  49. 'desc' => '请输入基础设备',
  50. 'match' => 'is_numeric',
  51. 'update' => 'text',
  52. ),
  53. 'control_id' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '控制器',
  57. 'default' => '',
  58. 'desc' => '控制器',
  59. 'match' => 'is_numeric',
  60. 'update' => 'text',
  61. //'list' => 'Dever::load("device/control-one#name", {control_id})',
  62. ),
  63. 'product_control_id' => array
  64. (
  65. 'type' => 'int-11',
  66. 'name' => '控制器名称',
  67. 'default' => '',
  68. 'desc' => '控制器名称',
  69. 'match' => 'is_numeric',
  70. 'update' => 'text',
  71. 'list' => 'Dever::load("device/product_control-one#name", {product_control_id})',
  72. ),
  73. 'value' => array
  74. (
  75. 'type' => 'varchar-500',
  76. 'name' => '当前的值',
  77. 'default' => '',
  78. 'desc' => '当前的值',
  79. 'match' => 'is_string',
  80. 'update' => 'text',
  81. 'search' => 'fulltext',
  82. //'list' => '{reorder} == 10000 ? Dever::mdate("{value}") : "{value}{dw}"',
  83. 'list' => true,
  84. ),
  85. 'send' => array
  86. (
  87. 'type' => 'varchar-500',
  88. 'name' => '发送的数据',
  89. 'default' => '',
  90. 'desc' => '发送的数据',
  91. 'match' => 'is_string',
  92. 'update' => 'textarea',
  93. //'list' => true,
  94. ),
  95. 'receive' => array
  96. (
  97. 'type' => 'varchar-500',
  98. 'name' => '接收到的数据',
  99. 'default' => '',
  100. 'desc' => '接收到的数据',
  101. 'match' => 'is_string',
  102. 'list' => true,
  103. ),
  104. 'cdate' => array
  105. (
  106. 'type' => 'int-11',
  107. 'name' => '入库时间',
  108. 'match' => array('is_numeric', time()),
  109. 'desc' => '',
  110. # 只有insert时才生效
  111. 'insert' => true,
  112. 'search' => 'order',
  113. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  114. ),
  115. ),
  116. 'manage' => array
  117. (
  118. 'insert' => false,
  119. 'edit' => false,
  120. ),
  121. # request 请求接口定义
  122. 'request' => array
  123. (
  124. ),
  125. );