Initial commit

This commit is contained in:
2025-03-06 12:24:20 +01:00
commit 7f3cefdc22
37 changed files with 6581 additions and 0 deletions

17
src/schemas/Key.ts Normal file
View File

@@ -0,0 +1,17 @@
import { ObjectId, Schema, model } from "mongoose"
interface IKey {
room: string;
whom: ObjectId;
borrow: Date;
tb?: Date;
}
const keySchema = new Schema<IKey>({
room: {type: String, required: true},
whom: {type: Schema.Types.ObjectId, ref: "logins", required: true},
borrow: {type: Date, default: Date.now, required: true},
tb: {type: Date}
})
export default model("key", keySchema)