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