mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-10-23 19:37:57 +00:00
feat: working on saving goals jounrey for juniors
This commit is contained in:
@@ -7,4 +7,5 @@ export const BUCKETS: Record<DocumentType, string> = {
|
||||
[DocumentType.DEFAULT_TASKS_LOGO]: 'tasks-logo',
|
||||
[DocumentType.CUSTOM_AVATAR]: 'avatars',
|
||||
[DocumentType.CUSTOM_TASKS_LOGO]: 'tasks-logo',
|
||||
[DocumentType.GOALS]: 'goals',
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Column, Entity, OneToMany, OneToOne, PrimaryGeneratedColumn, UpdateDate
|
||||
import { User } from '~/auth/entities';
|
||||
import { Customer } from '~/customer/entities';
|
||||
import { Junior, Theme } from '~/junior/entities';
|
||||
import { SavingGoal } from '~/saving-goals/entities';
|
||||
import { Task } from '~/task/entities';
|
||||
import { TaskSubmission } from '~/task/entities/task-submissions.entity';
|
||||
import { DocumentType } from '../enums';
|
||||
@@ -38,6 +39,9 @@ export class Document {
|
||||
@OneToMany(() => TaskSubmission, (taskSubmission) => taskSubmission.proofOfCompletion)
|
||||
submissions?: TaskSubmission[];
|
||||
|
||||
@OneToMany(() => SavingGoal, (savingGoal) => savingGoal.image)
|
||||
goals?: SavingGoal[];
|
||||
|
||||
@UpdateDateColumn({ name: 'updated_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
||||
updatedAt!: Date;
|
||||
|
||||
|
||||
@@ -5,4 +5,5 @@ export enum DocumentType {
|
||||
DEFAULT_TASKS_LOGO = 'DEFAULT_TASKS_LOGO',
|
||||
CUSTOM_AVATAR = 'CUSTOM_AVATAR',
|
||||
CUSTOM_TASKS_LOGO = 'CUSTOM_TASKS_LOGO',
|
||||
GOALS = 'GOALS',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user