Loading backend/src/place/entities/available-date.entity.ts +4 −4 Original line number Diff line number Diff line import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'; import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from 'typeorm'; import { Place } from './place.entity'; @Entity() export class AvailableDate { @PrimaryGeneratedColumn() idAvailableDate: number; @PrimaryColumn() idPlace: number; @JoinColumn({ name: 'idPlace' }) @ManyToOne(() => Place, (place) => place.availableDates, { nullable: false }) idPlace: Place; place: Place; @Column() startDate: Date; Loading backend/src/place/entities/place.entity.ts +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ export class Place { @OneToMany(() => PointOfInterest, (point) => point.idPoint) points: PointOfInterest[]; @OneToMany(() => AvailableDate, (available) => available.idPlace) @OneToMany(() => AvailableDate, (available) => available.place) availableDates: AvailableDate[]; @ManyToMany(() => Category) Loading Loading
backend/src/place/entities/available-date.entity.ts +4 −4 Original line number Diff line number Diff line import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'; import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from 'typeorm'; import { Place } from './place.entity'; @Entity() export class AvailableDate { @PrimaryGeneratedColumn() idAvailableDate: number; @PrimaryColumn() idPlace: number; @JoinColumn({ name: 'idPlace' }) @ManyToOne(() => Place, (place) => place.availableDates, { nullable: false }) idPlace: Place; place: Place; @Column() startDate: Date; Loading
backend/src/place/entities/place.entity.ts +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ export class Place { @OneToMany(() => PointOfInterest, (point) => point.idPoint) points: PointOfInterest[]; @OneToMany(() => AvailableDate, (available) => available.idPlace) @OneToMany(() => AvailableDate, (available) => available.place) availableDates: AvailableDate[]; @ManyToMany(() => Category) Loading