Skip to content

Commit

Permalink
fix(common): Synthetic data server example start error (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonVay authored Mar 19, 2020
1 parent 56a4663 commit d4c5c02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class VulnerabilityDto implements IVulnerabilityDto {
name: string;
records: RecordDto[];

id: string | number;
id: string;

constructor(model: Partial<IVulnerabilityDto>) {
Object.assign(this, model);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Column, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { RecordDto, VulnerabilityDto } from './vulnerability.dto';

@Entity()
export class Vulnerability {
export class Vulnerability implements VulnerabilityDto {
@PrimaryGeneratedColumn('uuid')
id: string;

Expand All @@ -20,13 +21,13 @@ export class Vulnerability {
}

@Entity()
export class Record {
export class Record implements RecordDto {
@PrimaryGeneratedColumn('uuid')
id: string;

@Column({length: 256})
name: string;

@ManyToOne((type) => Vulnerability, (vulnerability) => vulnerability.records)
vulnerabilityId: Vulnerability;
vulnerabilityId: string[];
}

0 comments on commit d4c5c02

Please sign in to comment.