This commit is contained in:
2026-02-22 12:17:12 +03:30
parent e8eda432dc
commit 6fb561fb7f
17 changed files with 479 additions and 2 deletions
+4
View File
@@ -1,5 +1,6 @@
import { Entity, Index, Property, OneToMany, Collection, Cascade, PrimaryKey, OptionalProps } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { LearningProgress } from '../../learnings/entities/learning-progress.entity';
// import { Order } from 'src/modules/order/entities/order.entity';
import { normalizePhone } from '../../util/phone.util';
import { ulid } from 'ulid';
@@ -8,6 +9,9 @@ import { ulid } from 'ulid';
export class User extends BaseEntity {
[OptionalProps]?: 'createdAt' | 'deletedAt'
@OneToMany(() => LearningProgress, (lp) => lp.user)
learningProgress = new Collection<LearningProgress>(this);
// @OneToMany(() => Order, order => order.user)
// orders = new Collection<Order>(this);