This commit is contained in:
2026-02-25 16:58:36 +03:30
parent 5112ff25ae
commit cf7fd04913
14 changed files with 68 additions and 117 deletions
+2 -11
View File
@@ -2,9 +2,7 @@ import { Entity, Index, Property, OneToMany, Collection, PrimaryKey, OptionalPro
import { BaseEntity } from '../../../common/entities/base.entity';
import { LearningProgress } from '../../learnings/entities/learning-progress.entity';
import { Criticism } from '../../criticisms/entities/criticism.entity';
// import { Order } from 'src/modules/order/entities/order.entity';
import { normalizePhone } from '../../util/phone.util';
import { ulid } from 'ulid';
@Entity({ tableName: 'users' })
export class User extends BaseEntity {
@@ -26,16 +24,9 @@ export class User extends BaseEntity {
@Property({ nullable: true })
lastName?: string;
private _phone!: string;
@Property({ unique: true })
get phone(): string {
return this._phone;
}
set phone(value: string) {
this._phone = normalizePhone(value);
}
phone: string
@Property({ default: true })