seed users

This commit is contained in:
2025-12-04 00:00:52 +03:30
parent 87e935acfd
commit 1ba66c7946
6 changed files with 158 additions and 31 deletions
+1 -5
View File
@@ -1,13 +1,9 @@
import { Entity, Property, OneToOne, OneToMany, Collection, Cascade } from '@mikro-orm/core';
import { Entity, Property, OneToMany, Collection, Cascade } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Restaurant } from '../../restaurants/entities/restaurant.entity';
import { UserAddress } from './user-address.entity';
@Entity({ tableName: 'users' })
export class User extends BaseEntity {
@OneToOne(() => Restaurant, { owner: true })
restaurant!: Restaurant;
@Property()
firstName!: string;