Qumolama.d 3b8712a212
Some checks reported errors
continuous-integration/drone/push Build encountered an error
添加更多配置文件设置,实现了一个api,完成部分文件的部分测试
2022-05-03 18:57:20 +08:00

67 lines
1.6 KiB
JavaScript

import mongoose from 'mongoose'
const { Schema } = mongoose
export const PlayerSchema = new Schema({
username: String, // 有符号 UUID
password: String,
email: String,
uuid: String,
textures: {
skin: String,
cape: String,
},
registerDate: Number,
permissions: [{ node: String, allowed: Boolean, duration: Number, startDate: Number, highPriority: Boolean }], // ban -> true
})
export const PlayerSeriliazationSchema = {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"properties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"signature": {
"type": "string"
}
}
}
}
}
}
export const PlayerAccountSerializationSchema = {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"properties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
}
}