mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-10-24 18:17:57 +00:00
refactor: remove unsed code
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user