2022-04-27 19:38:55 +00:00
|
|
|
import { Column, Entity, Index } from 'typeorm';
|
2022-04-26 20:34:05 +00:00
|
|
|
import BaseModel from './BaseModel';
|
2022-04-27 08:22:16 +00:00
|
|
|
import User from './User';
|
|
|
|
import Project from './Project';
|
2022-04-27 19:38:55 +00:00
|
|
|
@Entity({
|
|
|
|
name: "UserAlerts"
|
|
|
|
})
|
|
|
|
export default class Model extends BaseModel{
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
name!: string;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
slug!: string;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
dockerCredential!: {
|
|
|
|
|
|
|
|
@Column()
|
2022-04-29 19:52:23 +00:00
|
|
|
type!: Schema.Types.Object;
|
2022-04-27 19:38:55 +00:00
|
|
|
|
|
|
|
@Column()
|
|
|
|
ref!: 'DockerCredential';
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
index!: true;
|
|
|
|
};
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
imagePath!: string;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
imageTags!: string;
|
|
|
|
|
|
|
|
@Column()
|
2022-04-29 19:52:23 +00:00
|
|
|
component!: Component
|
2022-04-27 19:38:55 +00:00
|
|
|
|
|
|
|
@Column()
|
|
|
|
resourceCategory!: {
|
|
|
|
|
|
|
|
@Column()
|
2022-04-29 19:52:23 +00:00
|
|
|
type!: Schema.Types.Object;
|
2022-04-27 19:38:55 +00:00
|
|
|
|
|
|
|
@Column()
|
|
|
|
ref!: 'ResourceCategory';
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
index!: true;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
deleteAt!: Date;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
lastScan!: Date;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
scanned!: boolean;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
scanning!: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
//Automatically adds createdAt and updatedAt to the schema
|
|
|
|
}
|
2022-04-26 20:24:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-26 20:34:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|