opendb-feedback.schema.json 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {
  2. "bsonType": "object",
  3. "required": ["content"],
  4. "permission": {
  5. "create": "auth.uid != null",
  6. "read": true,
  7. "delete": false,
  8. "update": false
  9. },
  10. "properties": {
  11. "_id": {
  12. "description": "ID,系统自动生成"
  13. },
  14. "user_id": {
  15. "bsonType": "string",
  16. "description": "留言反馈用户ID\/回复留言用户ID,参考uni-id-users表",
  17. "foreignKey": "uni-id-users._id",
  18. "forceDefaultValue": {
  19. "$env": "uid"
  20. }
  21. },
  22. "create_date": {
  23. "bsonType": "timestamp",
  24. "title": "留言时间\/回复留言时间",
  25. "forceDefaultValue": {
  26. "$env": "now"
  27. }
  28. },
  29. "content": {
  30. "bsonType": "string",
  31. "title": "留言内容\/回复内容",
  32. "componentForEdit": {
  33. "name": "textarea"
  34. },
  35. "trim": "right"
  36. },
  37. "imgs": {
  38. "bsonType": "array",
  39. "arrayType": "file",
  40. "maxLength": 6,
  41. "fileMediaType": "image",
  42. "title": "图片列表"
  43. },
  44. "is_reply": {
  45. "bsonType": "bool",
  46. "title": "是否是回复类型"
  47. },
  48. "feedback_id": {
  49. "bsonType": "string",
  50. "title": "被回复留言ID"
  51. },
  52. "contact": {
  53. "bsonType": "string",
  54. "title": "联系人",
  55. "trim": "both"
  56. },
  57. "mobile": {
  58. "bsonType": "string",
  59. "title": "联系电话",
  60. "pattern": "^\\+?[0-9-]{3,20}$",
  61. "trim": "both"
  62. },
  63. "reply_count": {
  64. "permission": {
  65. "write": false
  66. },
  67. "bsonType": "int",
  68. "title": "被回复条数",
  69. "defaultValue": 0
  70. }
  71. }
  72. }