File

src/crypto/key/entities/cert-usage.entity.ts

Index

Properties

Properties

cert
Type : CertEntity
Decorators :
@ManyToOne(undefined, c => c.usages, {onDelete: 'CASCADE'})
@JoinColumn(['undefined', 'undefined'])
certId
Type : string
Decorators :
@Column('varchar', {primary: true})
tenantId
Type : string
Decorators :
@Column('varchar', {primary: true})
usage
Type : CertUsage
Decorators :
@Column('varchar', {primary: true})
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
import { CertEntity } from "./cert.entity";

export enum CertUsage {
    Access = "access",
    Signing = "signing",
    TrustList = "trustList",
    StatusList = "statusList",
}

@Entity()
@Index(["tenantId", "usage"])
export class CertUsageEntity {
    @Column("varchar", { primary: true })
    tenantId: string;

    @Column("varchar", { primary: true })
    certId: string;

    @Column("varchar", { primary: true })
    usage: CertUsage;

    @ManyToOne(
        () => CertEntity,
        (c) => c.usages,
        { onDelete: "CASCADE" },
    )
    @JoinColumn([
        { name: "tenantId", referencedColumnName: "tenantId" },
        { name: "certId", referencedColumnName: "id" },
    ])
    cert: CertEntity;
}

results matching ""

    No results matching ""