import { Town } from 'src/town/entities/town.entity';
import { Entity, Column, PrimaryColumn, OneToMany, JoinColumn } from 'typeorm';

@Entity()
export class State {
  @PrimaryColumn()
  stateId: number;

  @OneToMany(() => Town, (town) => town.townId)
  @JoinColumn()
  towns: Town[];

  @Column()
  name: string;

  @Column()
  imageName: string;
}
