//product.schema.json
{
"bsonType": "object",
"required": [
],
"permission": {
"read": true,
"create": true,
"update": true,
"delete": true
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"id": {
"bsonType": "int",
"title": "自增ID",
"description": "自增ID",
"minimum": 1
},
"category_id": {
"bsonType": "int",
"title": "分类ID",
"description": "分类ID",
"minimum": 1,
"foreignKey": "product_category.id"
},
"name": {
"bsonType": "string",
"title": "商品名称",
"description": "分类名",
"trim": "both",
"maxLength": 255
},
"product_code": {
"bsonType": "string",
"title": "商品编码",
"description": "商品编码",
"trim": "both",
"maxLength": 255
},
"product_barcode": {
"bsonType": "string",
"title": "商品条码",
"description": "商品条码",
"trim": "both",
"maxLength": 255
},
"price": {
"bsonType": "int",
"title": "商品价格",
"description": "商品价格, 用分做单位",
"minimum": 1
},
"spec": {
"bsonType": "string",
"title": "商品规格",
"description": "商品规格",
"trim": "both",
"maxLength": 255
},
"brand": {
"bsonType": "string",
"title": "商品品牌",
"description": "商品品牌",
"trim": "both",
"maxLength": 255
},
"main_pic": {
"bsonType": "string",
"title": "商品主图",
"description": "商品主图",
"trim": "both",
"maxLength": 10000
},
"create_time": {
"bsonType": "string",
"title": "创建时间",
"description": "创建时间",
"trim": "both",
"maxLength": 255
},
"update_time": {
"bsonType": "string",
"title": "更新时间",
"description": "更新时间",
"trim": "both",
"maxLength": 255
}
}
}
//product_category.schema.json
{
"bsonType": "object",
"required": [
],
"permission": {
"read": true,
"create": true,
"update": true,
"delete": true
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"id": {
"bsonType": "int",
"title": "自增ID",
"description": "自增ID",
"minimum": 1,
"foreignKey": "product.category_id"
},
"name": {
"bsonType": "string",
"title": "分类名",
"description": "分类名",
"trim": "both",
"maxLength": 255
},
"desc": {
"bsonType": "string",
"title": "分类描述",
"description": "分类描述",
"trim": "both",
"maxLength": 255
},
"create_time": {
"bsonType": "string",
"title": "创建时间",
"description": "创建时间",
"trim": "both",
"maxLength": 255
},
"update_time": {
"bsonType": "string",
"title": "更新时间",
"description": "更新时间",
"trim": "both",
"maxLength": 255
}
}
}
弄了好久一直报这个错误Error: 未找到主表与副表之间的关联关系,注意使用临时表联表查询时只会使用过滤后的字段进行联表,想问下是哪里的问题请教下,谢谢