order.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <?php
  2. $account = Dever::config('base')->account;
  3. $status = array
  4. (
  5. 1 => Dever::lang('pay_wait'),
  6. 2 => Dever::lang('pay_yes'),
  7. 3 => Dever::lang('pay_no'),
  8. );
  9. return array
  10. (
  11. # 表名
  12. 'name' => 'order',
  13. # 显示给用户看的名称
  14. 'lang' => Dever::lang('order_manage'),
  15. 'order' => 1,
  16. 'status' => $status,
  17. # 数据结构
  18. 'struct' => array
  19. (
  20. 'id' => array
  21. (
  22. 'type' => 'int-11',
  23. 'name' => 'ID',
  24. 'default' => '',
  25. 'desc' => '',
  26. 'match' => 'is_numeric',
  27. 'search' => 'order',
  28. //'list' => true,
  29. ),
  30. 'company_id' => array
  31. (
  32. 'type' => 'int-11',
  33. 'name' => Dever::lang('company'),
  34. 'default' => '1',
  35. 'desc' => Dever::lang('company'),
  36. 'match' => 'is_numeric',
  37. 'update' => 'text',
  38. 'list' => true,
  39. ),
  40. 'uid' => array
  41. (
  42. 'type' => 'varchar-200',
  43. 'name' => Dever::lang('user'),
  44. 'default' => '1',
  45. 'desc' => Dever::lang('user'),
  46. 'match' => 'is_string',
  47. 'update' => 'text',
  48. 'list' => true,
  49. ),
  50. 'order_id' => array
  51. (
  52. 'type' => 'varchar-100',
  53. 'name' => Dever::lang('order'),
  54. 'default' => '',
  55. 'desc' => Dever::lang('order'),
  56. 'match' => 'is_string',
  57. 'update' => 'text',
  58. 'list' => true,
  59. ),
  60. 'product_name' => array
  61. (
  62. 'type' => 'varchar-200',
  63. 'name' => Dever::lang('product_name'),
  64. 'default' => '',
  65. 'desc' => Dever::lang('product_name'),
  66. 'match' => 'is_string',
  67. 'update' => 'text',
  68. 'search' => 'fulltext',
  69. 'list' => true,
  70. ),
  71. 'account' => array
  72. (
  73. 'type' => 'varchar-24',
  74. 'name' => Dever::lang('account'),
  75. 'default' => 'payfort',
  76. 'desc' => Dever::lang('account'),
  77. 'match' => 'is_numeric',
  78. 'update' => 'select',
  79. 'option' => $account,
  80. 'search' => 'select',
  81. 'list' => true,
  82. ),
  83. 'type' => array
  84. (
  85. 'type' => 'int-11',
  86. 'name' => Dever::lang('type'),
  87. 'default' => '',
  88. 'desc' => Dever::lang('type'),
  89. 'match' => 'is_numeric',
  90. //'update' => 'text',
  91. //'list' => true,
  92. ),
  93. 'amount' => array
  94. (
  95. 'type' => 'varchar-30',
  96. 'name' => Dever::lang('amount'),
  97. 'default' => '',
  98. 'desc' => Dever::lang('amount'),
  99. 'match' => 'is_string',
  100. 'update' => 'text',
  101. 'list' => true,
  102. ),
  103. 'currency' => array
  104. (
  105. 'type' => 'varchar-11',
  106. 'name' => Dever::lang('currency'),
  107. 'default' => '',
  108. 'desc' => Dever::lang('currency'),
  109. 'match' => 'is_string',
  110. 'update' => 'text',
  111. 'list' => true,
  112. ),
  113. 'status' => array
  114. (
  115. 'type' => 'tinyint-1',
  116. 'name' => Dever::lang('status'),
  117. 'default' => '1',
  118. 'desc' => Dever::lang('status'),
  119. 'match' => 'is_numeric',
  120. 'update' => 'radio',
  121. 'option' => $status,
  122. 'search' => 'select',
  123. 'list' => true,
  124. 'control' => 'status',
  125. ),
  126. 'status_desc' => array
  127. (
  128. 'type' => 'varchar-300',
  129. 'name' => Dever::lang('status_desc'),
  130. 'default' => '',
  131. 'desc' => Dever::lang('status_desc'),
  132. 'match' => 'option',
  133. 'update' => 'textarea',
  134. 'show' => 'status=3',
  135. ),
  136. 'param' => array
  137. (
  138. 'type' => 'text-255',
  139. 'name' => Dever::lang('pay_info'),
  140. 'default' => '',
  141. 'desc' => Dever::lang('pay_info'),
  142. 'match' => 'option',
  143. ),
  144. 'state' => array
  145. (
  146. 'type' => 'tinyint-1',
  147. 'name' => Dever::lang('state'),
  148. 'default' => '1',
  149. 'desc' => Dever::lang('state'),
  150. 'match' => 'is_numeric',
  151. ),
  152. 'cdate' => array
  153. (
  154. 'type' => 'int-11',
  155. 'name' => Dever::lang('cdate'),
  156. 'match' => array('is_numeric', time()),
  157. 'desc' => '',
  158. # 只有insert时才生效
  159. 'insert' => true,
  160. 'search' => 'date',
  161. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  162. ),
  163. ),
  164. 'manage' => array
  165. (
  166. 'insert' => false,
  167. 'edit' => false,
  168. 'delete' => false,
  169. ),
  170. );