-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rsc question and resource tables and indexes; add rsc user type; …
…alpahbetized table names.
- Loading branch information
1 parent
8fe2660
commit b3d4aff
Showing
5 changed files
with
84 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
export * from './domain'; | ||
export * from './cve'; | ||
export * from './cpe'; | ||
export * from './service'; | ||
export * from './api-key'; | ||
export * from './connection'; | ||
export * from './vulnerability'; | ||
export * from './scan'; | ||
export * from './cpe'; | ||
export * from './cve'; | ||
export * from './domain'; | ||
export * from './organization'; | ||
export * from './user'; | ||
export * from './organization-tag'; | ||
export * from './role'; | ||
export * from './rsc_question'; | ||
export * from './rsc_resource'; | ||
export * from './saved-search'; | ||
export * from './scan'; | ||
export * from './scan-task'; | ||
export * from './service'; | ||
export * from './user'; | ||
export * from './vulnerability'; | ||
export * from './webpage'; | ||
export * from './api-key'; | ||
export * from './saved-search'; | ||
export * from './organization-tag'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { | ||
BaseEntity, | ||
Column, | ||
Entity, | ||
OneToMany, | ||
PrimaryGeneratedColumn | ||
} from 'typeorm'; | ||
import { RscResource } from './rsc_resource'; | ||
|
||
@Entity() | ||
export class RscQuestion extends BaseEntity { | ||
@PrimaryGeneratedColumn('uuid') | ||
id: string; | ||
|
||
@Column() | ||
name: string; | ||
|
||
@OneToMany(() => RscResource, (resource) => resource.question) | ||
resources: RscResource[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { | ||
BaseEntity, | ||
Column, | ||
Entity, | ||
ManyToOne, | ||
PrimaryGeneratedColumn | ||
} from 'typeorm'; | ||
import { RscQuestion } from './rsc_question'; | ||
|
||
@Entity() | ||
export class RscResource extends BaseEntity { | ||
@PrimaryGeneratedColumn('uuid') | ||
id: string; | ||
|
||
@Column() | ||
title: string; | ||
|
||
@Column() | ||
text: string; | ||
|
||
@Column() | ||
url: string; | ||
|
||
@ManyToOne(() => RscQuestion, (question) => question.resources) | ||
question: RscQuestion; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters