mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
refactoring dashboard
This commit is contained in:
16
dashboard/shared/schema/FeedbackSchema.ts
Normal file
16
dashboard/shared/schema/FeedbackSchema.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { model, Schema, Types } from 'mongoose';
|
||||
|
||||
export type TFeedback = {
|
||||
user_id: Types.ObjectId,
|
||||
project_id: Types.ObjectId,
|
||||
text: string
|
||||
}
|
||||
|
||||
const FeedbackSchema = new Schema<TFeedback>({
|
||||
user_id: { type: Schema.Types.ObjectId, required: true },
|
||||
project_id: { type: Schema.Types.ObjectId, required: true },
|
||||
text: { type: String, required: true },
|
||||
});
|
||||
|
||||
export const FeedbackModel = model<TFeedback>('feedbacks', FeedbackSchema);
|
||||
|
||||
Reference in New Issue
Block a user