Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 22x 22x 22x | import "reflect-metadata";
import { Column, Entity, PrimaryGeneratedColumn } from "./decorators";
import BaseEntity from "./base-entity";
import { Vaccine } from "@/interfaces/iVaccineData";
@Entity()
export default class VaccineEntity extends BaseEntity implements Vaccine {
@PrimaryGeneratedColumn()
id: number;
@Column({ tsType: String })
vaccineName!: string;
@Column({ tsType: Number, isUnique: true })
productId!: number;
@Column({ tsType: Number })
englishFormatId!: number;
@Column({ tsType: Number })
frenchFormatId!: number;
@Column({ tsType: String, isNullable: true })
englishPDFFilename!: string;
@Column({ tsType: String, isNullable: true })
frenchPDFFilename!: string;
@Column({ tsType: String })
starting!: string;
@Column({ tsType: String, isList: true })
associatedDiseasesEnglish!: string[];
@Column({ tsType: String, isList: true })
associatedDiseasesFrench!: string[];
constructor(data?: Partial<Vaccine>) {
super();
Eif (data) {
(this.vaccineName = data.vaccineName ?? ""),
(this.productId = data.productId ?? 0),
(this.englishFormatId = data.englishFormatId ?? 0),
(this.frenchFormatId = data.frenchFormatId ?? 0),
(this.englishPDFFilename = data.englishPDFFilename ?? ""),
(this.frenchPDFFilename = data.frenchPDFFilename ?? ""),
(this.starting = data.starting ?? ""),
(this.associatedDiseasesEnglish = data.associatedDiseasesEnglish ?? []),
(this.associatedDiseasesFrench = data.associatedDiseasesFrench ?? []);
}
}
}
|