Skip to content

Instantly share code, notes, and snippets.

@ktutnik
Created May 3, 2021 03:31
Show Gist options
  • Save ktutnik/116ea3878afa3125cd90fb5f686e37b3 to your computer and use it in GitHub Desktop.
Save ktutnik/116ea3878afa3125cd90fb5f686e37b3 to your computer and use it in GitHub Desktop.
@Entity()
export class Shop {
@PrimaryGeneratedColumn()
id: number
/** ------ other properties ------ **/
@genericController()
@OneToMany(x => Product, x => x.shop)
products:Product[]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment