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