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

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

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

  @Column()
  name: string;

  @Column()
  imageName: string;
}
