import { BaseEntity, Column, Entity, ManyToOne, PrimaryGeneratedColumn, Relation, } from 'typeorm'; import { UserEntity } from './user.entity.js'; @Entity('branches') export class BranchEntity extends BaseEntity { @PrimaryGeneratedColumn('uuid') id: string; @Column() name: string; @Column() location: string; @Column() phone_number: string; @ManyToOne(() => UserEntity, (user) => user.branches) owner: Relation; @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }) create_at: Date; }