level.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'level',
  6. # 显示给用户看的名称
  7. 'lang' => '难度设置',
  8. 'order' => 2,
  9. # 数据结构
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. 'search' => 'order',
  20. 'list' => true,
  21. ),
  22. 'name' => array
  23. (
  24. 'type' => 'varchar-80',
  25. 'name' => '难度名称',
  26. 'default' => '',
  27. 'desc' => '难度名称',
  28. 'match' => 'is_string',
  29. 'update' => 'text',
  30. 'search' => 'fulltext',
  31. 'list' => true,
  32. ),
  33. 'reorder' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '排序(数值越大越靠前)',
  37. 'default' => '1',
  38. 'desc' => '请输入排序',
  39. 'match' => 'option',
  40. 'update' => 'text',
  41. 'search' => 'order',
  42. 'list_name' => '排序',
  43. 'list' => true,
  44. 'order' => 'desc',
  45. 'edit' => true,
  46. ),
  47. 'state' => array
  48. (
  49. 'type' => 'tinyint-1',
  50. 'name' => '状态',
  51. 'default' => '1',
  52. 'desc' => '请选择状态',
  53. 'match' => 'is_numeric',
  54. ),
  55. 'cdate' => array
  56. (
  57. 'type' => 'int-11',
  58. 'name' => '录入时间',
  59. 'match' => array('is_numeric', time()),
  60. 'desc' => '',
  61. # 只有insert时才生效
  62. 'insert' => true,
  63. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  64. ),
  65. ),
  66. # 管理功能
  67. 'manage' => array
  68. (
  69. ),
  70. # 默认值
  71. 'default' => array
  72. (
  73. 'col' => 'name,reorder,state,cdate',
  74. 'value' => array
  75. (
  76. '"简单",10,1,' . time(),
  77. '"普通",9,1,' . time(),
  78. '"困难",8,1,' . time(),
  79. ),
  80. ),
  81. 'request' => array
  82. (
  83. 'getAll' => array
  84. (
  85. # 匹配的正则或函数 选填项
  86. 'option' => array
  87. (
  88. 'state' => 1,
  89. ),
  90. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  91. 'type' => 'all',
  92. 'col' => '*',
  93. ),
  94. )
  95. );