20 lines
390 B
TypeScript
20 lines
390 B
TypeScript
import { Document, Schema, model } from 'mongoose';
|
|
|
|
export interface NoteInterface extends Document {
|
|
userID: string,
|
|
staffID: string,
|
|
date: Date,
|
|
category: 'comm' | 'cs' | 'edu' | '',
|
|
text: string,
|
|
}
|
|
|
|
const Note: Schema = new Schema({
|
|
userID: String,
|
|
staffID: String,
|
|
date: Date,
|
|
category: String,
|
|
text: String,
|
|
});
|
|
|
|
export default model<NoteInterface>('Note', Note);
|