feat: working on saving goals jounrey for juniors

This commit is contained in:
Abdalhamid Alhamad
2024-12-15 12:44:59 +03:00
parent 24d990592d
commit 4d2f6f57f4
35 changed files with 754 additions and 2 deletions
@@ -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',
};
+4
View File
@@ -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;
+1
View File
@@ -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',
}