Created the Project.ts model

This commit is contained in:
2023-01-14 23:16:37 +01:00
parent 9af16f9160
commit b9ef786131

15
src/models/Project.ts Normal 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);