Created the Project.ts model
This commit is contained in:
parent
9af16f9160
commit
b9ef786131
15
src/models/Project.ts
Normal file
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);
|
Loading…
x
Reference in New Issue
Block a user