econocart/src/entities/Supermercado.ts

16 lines
480 B
TypeScript
Raw Normal View History

2017-05-21 00:16:17 +00:00
import { Column, ManyToMany, OneToMany } from "typeorm";
import { EntidadeAbstrata } from "./EntidadeAbstrata";
import { Planejamento } from "./Planejamento";
import { Consulta } from "./Consulta";
export class Supermercado extends EntidadeAbstrata {
@Column()
nome: string;
@ManyToMany(type => Planejamento, other => other.supermercados)
planejamentos: Planejamento[];
@OneToMany(type => Consulta, other => other.supermercado)
consultas: Consulta[];
}