src/crypto/key/entities/cert.entity.ts
Entity to manage certificates for keys.
Properties |
createdAt |
Type : Date
|
Decorators :
@CreateDateColumn()
|
Defined in src/crypto/key/entities/cert.entity.ts:57
|
The timestamp when the VP request was created. |
crt |
Type : string
|
Decorators :
@Column('varchar')
|
Defined in src/crypto/key/entities/cert.entity.ts:39
|
Certificate in PEM format. |
Optional description |
Type : string
|
Decorators :
@Column('varchar', {nullable: true})
|
Defined in src/crypto/key/entities/cert.entity.ts:51
|
Description of the key. |
id |
Type : string
|
Decorators :
@Column('varchar', {primary: true})
|
Defined in src/crypto/key/entities/cert.entity.ts:21
|
Unique identifier for the key. |
tenant |
Type : TenantEntity
|
Decorators :
@ManyToOne(undefined, {cascade: true, onDelete: 'CASCADE'})
|
Defined in src/crypto/key/entities/cert.entity.ts:33
|
The tenant that owns this object. |
tenantId |
Type : string
|
Decorators :
@Column('varchar', {primary: true})
|
Defined in src/crypto/key/entities/cert.entity.ts:27
|
Tenant ID for the key. |
type |
Type : CertificateType
|
Decorators :
@Column('varchar', {default: 'signing', primary: true})
|
Defined in src/crypto/key/entities/cert.entity.ts:45
|
Type of the certificate (access or signing). |
updatedAt |
Type : Date
|
Decorators :
@UpdateDateColumn()
|
Defined in src/crypto/key/entities/cert.entity.ts:63
|
The timestamp when the VP request was last updated. |
import {
Column,
CreateDateColumn,
Entity,
ManyToOne,
UpdateDateColumn,
} from "typeorm";
import { TenantEntity } from "../../../auth/tenant/entitites/tenant.entity";
export type CertificateType = "access" | "signing";
/**
* Entity to manage certificates for keys.
*/
@Entity()
export class CertEntity {
/**
* Unique identifier for the key.
*/
@Column("varchar", { primary: true })
id: string;
/**
* Tenant ID for the key.
*/
@Column("varchar", { primary: true })
tenantId: string;
/**
* The tenant that owns this object.
*/
@ManyToOne(() => TenantEntity, { cascade: true, onDelete: "CASCADE" })
tenant: TenantEntity;
/**
* Certificate in PEM format.
*/
@Column("varchar")
crt: string;
/**
* Type of the certificate (access or signing).
*/
@Column("varchar", { default: "signing", primary: true })
type: CertificateType;
/**
* Description of the key.
*/
@Column("varchar", { nullable: true })
description?: string;
/**
* The timestamp when the VP request was created.
*/
@CreateDateColumn()
createdAt: Date;
/**
* The timestamp when the VP request was last updated.
*/
@UpdateDateColumn()
updatedAt: Date;
}