Squashed 'backend/' content from commit fa83223

git-subtree-dir: backend
git-subtree-split: fa832234607d359848516c9334f2eec45f64969e
This commit is contained in:
2026-04-27 22:44:05 +02:00
commit f8bb37e12f
44 changed files with 7444 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import { Schema, Types, model } from "mongoose"
export interface IKey {
room: string;
whom: Types.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)