oneuptime/Model/Models/GreenlockCertificate.ts

70 lines
2.0 KiB
TypeScript
Raw Normal View History

2022-12-07 06:44:17 +00:00
import { Column, Entity, Index } from 'typeorm';
2022-11-27 20:16:28 +00:00
import BaseModel from 'Common/Models/BaseModel';
2023-08-21 10:40:35 +00:00
import TableColumnType from 'Common/Types/BaseDatabase/TableColumnType';
2022-11-27 20:16:28 +00:00
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';
2023-02-09 13:35:58 +00:00
import TableMetadata from 'Common/Types/Database/TableMetadata';
import IconProp from 'Common/Types/Icon/IconProp';
2022-11-27 20:16:28 +00:00
@TableAccessControl({
create: [],
read: [],
delete: [],
update: [],
})
2023-02-09 14:24:41 +00:00
@TableMetadata({
tableName: 'GreenlockCertificate',
singularName: 'Greenlock Certificate',
pluralName: 'Greenlock Certificate',
icon: IconProp.Lock,
2023-03-18 21:48:21 +00:00
tableDescription: 'Lets Encrypt Certificates',
2023-02-09 14:24:41 +00:00
})
2022-11-27 20:16:28 +00:00
@Entity({
2022-12-08 16:23:21 +00:00
name: 'GreenlockCertificate',
2022-11-27 20:16:28 +00:00
})
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: [],
})
2023-07-31 13:34:33 +00:00
@TableColumn({ type: TableColumnType.VeryLongText })
2022-11-27 20:16:28 +00:00
@Column({
2023-07-31 11:17:07 +00:00
type: ColumnType.VeryLongText,
2022-11-27 20:16:28 +00:00
nullable: false,
unique: false,
})
public blob?: string = undefined;
2022-12-10 14:30:39 +00:00
@ColumnAccessControl({
create: [],
read: [],
update: [],
})
@TableColumn({ type: TableColumnType.Boolean })
@Column({
type: ColumnType.Boolean,
nullable: false,
default: false,
unique: false,
})
public isKeyPair?: boolean = undefined;
2022-11-27 20:16:28 +00:00
}