27 lines
667 B
TypeScript
27 lines
667 B
TypeScript
import { MiembroContacto } from "src/miembro-contacto/entity/miembro_contacto.entity";
|
|
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
|
|
|
|
|
@Entity()
|
|
export class Contacto {
|
|
@PrimaryGeneratedColumn()
|
|
id_contacto: number
|
|
|
|
@Column({nullable:false})
|
|
email: string
|
|
|
|
@Column({length: 40})
|
|
horario: string
|
|
|
|
@Column({length: 75, nullable:true})
|
|
facebook: string
|
|
|
|
@Column({length: 60, nullable: true})
|
|
linkedin: string
|
|
|
|
@ManyToOne(
|
|
() => MiembroContacto, (miembroContacto) => miembroContacto.contacto
|
|
)
|
|
@JoinColumn({name: "id_contacto"})
|
|
miembroContacto: MiembroContacto
|
|
} |