This commit is contained in:
2026-01-25 09:35:01 +03:30
parent dc281c4f9a
commit 2449ac447d
8 changed files with 13 additions and 242 deletions
+2 -6
View File
@@ -1,6 +1,5 @@
import { Entity, Index, Property, OneToMany, Collection, Cascade, PrimaryKey } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { UserAddress } from './user-address.entity';
import { Order } from 'src/modules/order/entities/order.entity';
import { normalizePhone } from '../../util/phone.util';
import { ulid } from 'ulid';
@@ -41,9 +40,6 @@ export class User extends BaseEntity {
@Property({ default: 0 })
maxCredit: number;
@OneToMany(() => UserAddress, address => address.user, {
cascade: [Cascade.ALL],
orphanRemoval: true,
})
addresses = new Collection<UserAddress>(this);
@Property({ type: 'string', nullable: true })
addresse?: string
}