add onboarding and feedback models

This commit is contained in:
Emily
2024-12-20 16:31:34 +01:00
parent 39c42e7bd5
commit edc897d62a
5 changed files with 78 additions and 0 deletions

View 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);

View File

@@ -0,0 +1,16 @@
import { model, Schema, Types } from 'mongoose';
export type TOnboarding = {
user_id: Types.ObjectId,
analytics: string,
job: string
}
const OnboardingSchema = new Schema<TOnboarding>({
user_id: { type: Schema.Types.ObjectId, required: true },
analytics: { type: String, required: false },
job: { type: String, required: false },
});
export const OnboardingModel = model<TOnboarding>('onboardings', OnboardingSchema);