opendb-news-categories.schema.json 1000 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {
  2. "bsonType": "object",
  3. "required": ["name"],
  4. "permission": {
  5. "read": true,
  6. "create": false,
  7. "update": false,
  8. "delete": false
  9. },
  10. "properties": {
  11. "_id": {
  12. "description": "存储文档 ID(文章 ID),系统自动生成"
  13. },
  14. "name": {
  15. "bsonType": "string",
  16. "description": "类别名称",
  17. "label": "名称",
  18. "trim": "both"
  19. },
  20. "description": {
  21. "bsonType": "string",
  22. "description": "类别描述",
  23. "label": "描述",
  24. "trim": "both"
  25. },
  26. "icon": {
  27. "bsonType": "string",
  28. "description": "类别图标地址",
  29. "label": "图标地址",
  30. "pattern": "^(http:\/\/|https:\/\/|\/|.\/|@\/)\\S",
  31. "trim": "both"
  32. },
  33. "sort": {
  34. "bsonType": "int",
  35. "description": "类别显示顺序",
  36. "label": "排序"
  37. },
  38. "article_count": {
  39. "bsonType": "int",
  40. "description": "该类别下文章数量"
  41. },
  42. "create_date": {
  43. "bsonType": "timestamp",
  44. "description": "创建时间",
  45. "forceDefaultValue": {
  46. "$env": "now"
  47. }
  48. }
  49. }
  50. }