mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
64 lines
1.9 KiB
TypeScript
64 lines
1.9 KiB
TypeScript
import { Column, Entity, Index } from 'typeorm';
|
|
import BaseModel from 'Common/Models/BaseModel';
|
|
import TableColumnType from 'Common/Types/Database/TableColumnType';
|
|
import TableColumn from 'Common/Types/Database/TableColumn';
|
|
import ColumnType from 'Common/Types/Database/ColumnType';
|
|
import ColumnLength from 'Common/Types/Database/ColumnLength';
|
|
import TableAccessControl from 'Common/Types/Database/AccessControl/TableAccessControl';
|
|
import ColumnAccessControl from 'Common/Types/Database/AccessControl/ColumnAccessControl';
|
|
import TableMetadata from 'Common/Types/Database/TableMetadata';
|
|
import IconProp from 'Common/Types/Icon/IconProp';
|
|
@TableAccessControl({
|
|
create: [],
|
|
read: [],
|
|
delete: [],
|
|
update: [],
|
|
})
|
|
@TableMetadata({tableName: 'GreenlockCertificate', singularName: 'Greenlock Certificate', pluralName: 'Greenlock Certificate', icon: IconProp.Lock})
|
|
@Entity({
|
|
name: 'GreenlockCertificate',
|
|
})
|
|
export default class GreenlockCertificate extends BaseModel {
|
|
@Index()
|
|
@ColumnAccessControl({
|
|
create: [],
|
|
read: [],
|
|
update: [],
|
|
})
|
|
@TableColumn({ type: TableColumnType.LongText })
|
|
@Column({
|
|
type: ColumnType.LongText,
|
|
length: ColumnLength.LongText,
|
|
nullable: false,
|
|
unique: false,
|
|
})
|
|
public key?: string = undefined;
|
|
|
|
@ColumnAccessControl({
|
|
create: [],
|
|
read: [],
|
|
update: [],
|
|
})
|
|
@TableColumn({ type: TableColumnType.LongText })
|
|
@Column({
|
|
type: ColumnType.LongText,
|
|
nullable: false,
|
|
unique: false,
|
|
})
|
|
public blob?: string = undefined;
|
|
|
|
@ColumnAccessControl({
|
|
create: [],
|
|
read: [],
|
|
update: [],
|
|
})
|
|
@TableColumn({ type: TableColumnType.Boolean })
|
|
@Column({
|
|
type: ColumnType.Boolean,
|
|
nullable: false,
|
|
default: false,
|
|
unique: false,
|
|
})
|
|
public isKeyPair?: boolean = undefined;
|
|
}
|