Created the Project.ts model

This commit is contained in:
Mathias Wagner 2023-01-14 23:16:37 +01:00
parent 9af16f9160
commit b9ef786131
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

15
src/models/Project.ts Normal file
View File

@ -0,0 +1,15 @@
import {model, ObjectId, Schema} from "mongoose";
export interface IProject {
id: ObjectId,
name: string
}
const ProjectSchema = new Schema<IProject>({
name: {
type: String,
required: true
}
});
export const Project = model<IProject>('projects', ProjectSchema);