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 -30
View File
@@ -5,19 +5,12 @@ import {
Entity,
JoinColumn,
ManyToOne,
OneToMany,
OneToOne,
PrimaryColumn,
UpdateDateColumn,
} from 'typeorm';
import { Allowance } from '~/allowance/entities';
import { Customer } from '~/customer/entities';
import { Gift } from '~/gift/entities';
import { Guardian } from '~/guardian/entities/guradian.entity';
import { MoneyRequest } from '~/money-request/entities';
import { Category, SavingGoal } from '~/saving-goals/entities';
import { Task } from '~/task/entities';
import { UserRegistrationToken } from '~/user/entities';
import { Relationship } from '../enums';
import { Theme } from './theme.entity';
@@ -46,30 +39,9 @@ export class Junior extends BaseEntity {
@JoinColumn({ name: 'guardian_id' })
guardian!: Guardian;
@OneToMany(() => Task, (task) => task.assignedTo)
tasks!: Task[];
@OneToMany(() => SavingGoal, (savingGoal) => savingGoal.junior)
goals!: SavingGoal[];
@OneToMany(() => Category, (category) => category.junior)
categories!: Category[];
@OneToMany(() => UserRegistrationToken, (token) => token.junior)
registrationTokens!: UserRegistrationToken[];
@OneToMany(() => MoneyRequest, (moneyRequest) => moneyRequest.requester)
moneyRequests!: MoneyRequest[];
@OneToMany(() => Allowance, (allowance) => allowance.junior)
allowances!: Allowance[];
@OneToMany(() => Gift, (gift) => gift.recipient)
gifts!: Gift[];
@CreateDateColumn({ name: 'created_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
@CreateDateColumn({ name: 'created_at', type: 'timestamp with time zone', default: () => 'CURRENT_TIMESTAMP' })
createdAt!: Date;
@UpdateDateColumn({ name: 'updated_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
@UpdateDateColumn({ name: 'updated_at', type: 'timestamp with time zone', default: () => 'CURRENT_TIMESTAMP' })
updatedAt!: Date;
}
+1 -1
View File
@@ -116,7 +116,7 @@ export class JuniorService {
async generateToken(juniorId: string) {
this.logger.log(`Generating token for junior ${juniorId}`);
const token = await this.userTokenService.generateToken(juniorId, UserType.JUNIOR);
const token = await this.userTokenService.generateToken(juniorId);
return this.qrCodeService.generateQrCode(token);
}