{
  "bsonType": "object",
  "required": ["name", "contact", "content"],
  "properties": {
    "_id": {
      "description": "ID，系统自动生成"
    },
    "name": {
      "bsonType": "string",
      "title": "姓名",
      "minLength": 2,
      "maxLength": 20,
      "errorMessage": {
        "required": "{title}不能为空",
        "minLength": "{title}长度不能小于{minLength}",
        "maxLength": "{title}长度不能大于{maxLength}"
      }
    },
    "contact": {
      "bsonType": "string",
      "title": "联系方式",
      "format": "email|phone",
      "errorMessage": {
        "required": "{title}不能为空",
        "format": "{title}格式不正确"
      }
    },
    "content": {
      "bsonType": "string",
      "title": "反馈内容",
      "minLength": 10,
      "maxLength": 500,
      "errorMessage": {
        "required": "{title}不能为空",
        "minLength": "{title}长度不能小于{minLength}",
        "maxLength": "{title}长度不能大于{maxLength}"
      }
    },
    "createTime": {
      "bsonType": "timestamp",
      "title": "创建时间",
      "defaultValue": {
        "$env": "now"
      }
    }
  }
} 