🎉 Start project but-3

This commit is contained in:
Félix Legrelle
2024-01-28 14:31:51 +01:00
commit 341889b6f7
57 changed files with 10373 additions and 0 deletions

13
src/models/user.ts Normal file
View File

@@ -0,0 +1,13 @@
import { IUser } from '@types'
import mongoose, { Schema } from 'mongoose'
const UserSchema: Schema = new Schema({
username: { type: String, required: true, unique: true },
password: { type: String, required: true },
permission: { type: Number, required: true },
})
UserSchema.set('timestamps', true)
export const UserModel = mongoose.model<IUser>('User', UserSchema)