Commit 548cbcbc authored by Diego Iván's avatar Diego Iván
Browse files

agregando entidad point of interest

parent ecf2ef71
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
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;
}