opendb-banner.schema.json 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {
  2. "bsonType": "object",
  3. "required": ["bannerfile"],
  4. "permission": {
  5. "read": true
  6. },
  7. "properties": {
  8. "_id": {
  9. "description": "ID,系统自动生成"
  10. },
  11. "bannerfile": {
  12. "bsonType": "file",
  13. "fileMediaType": "image",
  14. "title": "图片文件",
  15. "description": "图片文件信息,包括文件名、url等"
  16. },
  17. "open_url": {
  18. "bsonType": "string",
  19. "description": "点击跳转目标地址。如果是web地址则使用内置web-view打开;如果是本地页面则跳转本地页面;如果是schema地址则打开本地的app",
  20. "title": "点击目标地址",
  21. "format": "url",
  22. "pattern": "^(http:\/\/|https:\/\/|\/|.\/|@\/)\\S",
  23. "trim": "both"
  24. },
  25. "title": {
  26. "bsonType": "string",
  27. "description": "注意标题文字颜色和背景图靠色导致看不清的问题",
  28. "maxLength": 20,
  29. "title": "标题",
  30. "trim": "both"
  31. },
  32. "sort": {
  33. "bsonType": "int",
  34. "description": "数字越小,排序越前",
  35. "title": "排序"
  36. },
  37. "category_id": {
  38. "bsonType": "string",
  39. "description": "多个栏目的banner都存在一个表里时可用这个字段区分",
  40. "title": "分类id"
  41. },
  42. "status": {
  43. "bsonType": "bool",
  44. "defaultValue": true,
  45. "title": "生效状态"
  46. },
  47. "description": {
  48. "bsonType": "string",
  49. "description": "维护者自用描述",
  50. "title": "备注",
  51. "trim": "both"
  52. }
  53. }
  54. }