import { Place } from 'src/place/entities/place.entity';
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class PointOfInterest {
  @PrimaryGeneratedColumn()
  idPoint: number;

  @Column({ nullable: false })
  name: string;

  @JoinColumn({ name: 'idPlace' })
  @ManyToOne(() => Place, (place) => place.points, { nullable: false })
  idPlace: Place;

  @Column({ nullable: false })
  imageName: string;
}
