avatar.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'avatar',
  6. # 显示给用户看的名称
  7. 'lang' => '默认头像',
  8. 'order' => -1,
  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,fulltext',
  20. 'list' => true,
  21. ),
  22. //search_exist_avatar=yes
  23. 'avatar' => array
  24. (
  25. 'type' => 'varchar-150',
  26. 'name' => '头像',
  27. 'default' => '',
  28. 'desc' => '请选择头像',
  29. 'match' => 'option',
  30. 'update' => 'image',
  31. 'key' => '1',
  32. 'place' => '150',
  33. 'list' => '"{avatar}" ? "<img src=\'{avatar}\' width=\'150\'>": ""',
  34. //'list' => 'Dever::load("passport/lib/manage.showAvatar", {id})',
  35. ),
  36. 'state' => array
  37. (
  38. 'type' => 'tinyint-1',
  39. 'name' => '状态',
  40. 'default' => '1',
  41. 'desc' => '请选择状态',
  42. 'match' => 'is_numeric',
  43. ),
  44. 'cdate' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '注册时间',
  48. 'match' => array('is_numeric', time()),
  49. 'desc' => '',
  50. # 只有insert时才生效
  51. 'insert' => true,
  52. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  53. ),
  54. ),
  55. 'manage' => array
  56. (
  57. ),
  58. # request 请求接口定义
  59. 'request' => array
  60. (
  61. # 后台搜索用到
  62. 'rand' => array
  63. (
  64. # 匹配的正则或函数 选填项
  65. 'option' => array
  66. (
  67. 'state' => 1,
  68. ),
  69. 'type' => 'one',
  70. 'order' => 'rand()',
  71. 'col' => '*',
  72. ),
  73. ),
  74. );