gateway schema

This commit is contained in:
Hide_D committed 2023-08-18 15:29:18 +00:00
1 parent ae22fc7c28
commit a37baa64fe
5 files changed
+95 -8

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import { Schema, model } from "mongoose";
export interface IServerVersion {
serverKey: string;
branch: string;
version: string;
updateDate: Date;
}
export const ServerVersion = new Schema<IServerVersion>({
serverKey: { type: String, required: true },
branch: { type: String, required: true },
version: { type: String, required: true },
updateDate: { type: Date, required: true },
}, { autoIndex: false })
.index({ serverKey: 1 }, { unique: true })
;
export default model<IServerVersion>('ServerVersion', ServerVersion);