import { State } from 'src/state/entities/state.entity';
import { Entity, Column, ManyToOne, JoinColumn, PrimaryGeneratedColumn } from 'typeorm';
@Entity()
export class Town {
  @PrimaryGeneratedColumn()
  townId: number;

  @ManyToOne(() => State, (state) => state.stateId, { nullable: false })
  @JoinColumn()
  state: number;

  @Column()
  name: string;

  @Column()
  imageName: string;

  @Column({ default: true })
  active: boolean = true;
}
