refactor: remove unsed code

This commit is contained in:
Abdalhamid Alhamad
2025-08-11 15:15:41 +03:00
parent cff87c4ecd
commit e8ee74d0d7
172 changed files with 177 additions and 10911 deletions
+2 -24
View File
@@ -9,11 +9,7 @@ import {
UpdateDateColumn,
} from 'typeorm';
import { Customer } from '~/customer/entities';
import { Gift } from '~/gift/entities';
import { Theme } from '~/junior/entities';
import { SavingGoal } from '~/saving-goals/entities';
import { Task } from '~/task/entities';
import { TaskSubmission } from '~/task/entities/task-submissions.entity';
import { User } from '~/user/entities';
import { DocumentType } from '../enums';
@@ -37,35 +33,17 @@ export class Document {
@OneToOne(() => Customer, (customer) => customer.profilePicture, { onDelete: 'SET NULL' })
customerPicture?: Customer;
@OneToOne(() => Customer, (customer) => customer.civilIdFront, { onDelete: 'SET NULL' })
customerCivilIdFront?: User;
@OneToOne(() => Customer, (customer) => customer.civilIdBack, { onDelete: 'SET NULL' })
customerCivilIdBack?: User;
@OneToMany(() => Theme, (theme) => theme.avatar)
themes?: Theme[];
@OneToMany(() => Task, (task) => task.image)
tasks?: Task[];
@OneToMany(() => TaskSubmission, (taskSubmission) => taskSubmission.proofOfCompletion)
submissions?: TaskSubmission[];
@OneToMany(() => SavingGoal, (savingGoal) => savingGoal.image)
goals?: SavingGoal[];
@OneToMany(() => Gift, (gift) => gift.image)
gifts?: Gift[];
@ManyToOne(() => User, (user) => user.createdDocuments, { nullable: true, onDelete: 'SET NULL' })
@JoinColumn({ name: 'created_by_id' })
createdBy?: User;
@UpdateDateColumn({ name: 'updated_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
@UpdateDateColumn({ name: 'updated_at', type: 'timestamp with time zone', default: () => 'CURRENT_TIMESTAMP' })
updatedAt!: Date;
@Column({ name: 'created_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
@Column({ name: 'created_at', type: 'timestamp with time zone', default: () => 'CURRENT_TIMESTAMP' })
createdAt!: Date;
// virtual field