41 lines
1,009 B
TypeScript
41 lines
1,009 B
TypeScript
|
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
|
||
|
//import { member } from "./member";
|
||
|
import { communicationType } from "./communicationType";
|
||
|
|
||
|
@Entity()
|
||
|
export class communication {
|
||
|
@PrimaryColumn({ generated: "increment", type: "int" })
|
||
|
id: number;
|
||
|
|
||
|
@Column({ type: "boolean", default: false })
|
||
|
preffered: boolean;
|
||
|
|
||
|
@Column({ type: "varchar", length: 255 })
|
||
|
mobile: string;
|
||
|
|
||
|
@Column({ type: "varchar", length: 255 })
|
||
|
email: string;
|
||
|
|
||
|
@Column({ type: "varchar", length: 255 })
|
||
|
city: string;
|
||
|
|
||
|
@Column({ type: "varchar", length: 255 })
|
||
|
street: string;
|
||
|
|
||
|
@Column({ type: "integer" })
|
||
|
streetNumber: number;
|
||
|
|
||
|
@Column({ type: "varchar", length: 255 })
|
||
|
streetNumberAddition: string;
|
||
|
|
||
|
@ManyToOne(() => communicationType, (communicationType) => communicationType.communications, {
|
||
|
nullable: false,
|
||
|
})
|
||
|
type: communicationType;
|
||
|
|
||
|
// @ManyToOne(() => member, (member) => member.awards, {
|
||
|
// onDelete: "RESTRICT",
|
||
|
// })
|
||
|
// member: member;
|
||
|
}
|