src/issuer/status-list/entities/status-list.entity.ts
Entity representing the status list for a tenant.
Properties |
bits |
Type : BitsPerStatus
|
Decorators :
@Column('int')
|
The number of bits used for each status in the status list. |
elements |
Type : number[]
|
Decorators :
@Column('json')
|
The elements of the status list. |
Optional jwt |
Type : string
|
Decorators :
@Column('varchar', {nullable: true})
|
The JSON Web Token (JWT) for the status list. |
stack |
Type : number[]
|
Decorators :
@Column('json')
|
The stack of available indexes for the status list. |
tenant |
Type : TenantEntity
|
Decorators :
@ManyToOne(undefined, {cascade: true, onDelete: 'CASCADE'})
|
The tenant that owns this object. |
tenantId |
Type : string
|
Decorators :
@Column('varchar', {primary: true})
|
The ID of the tenant to which the status list belongs. |
import { BitsPerStatus } from "@sd-jwt/jwt-status-list";
import { Column, Entity, ManyToOne } from "typeorm";
import { TenantEntity } from "../../../auth/tenant/entitites/tenant.entity";
/**
* Entity representing the status list for a tenant.
*/
@Entity()
export class StatusListEntity {
/**
* The ID of the tenant to which the status list belongs.
*/
@Column("varchar", { primary: true })
tenantId: string;
/**
* The tenant that owns this object.
*/
@ManyToOne(() => TenantEntity, { cascade: true, onDelete: "CASCADE" })
tenant: TenantEntity;
/**
* The elements of the status list.
*/
@Column("json")
elements: number[];
/**
* The stack of available indexes for the status list.
*/
@Column("json")
stack: number[];
/**
* The number of bits used for each status in the status list.
*/
@Column("int")
bits: BitsPerStatus;
/**
* The JSON Web Token (JWT) for the status list.
*/
@Column("varchar", { nullable: true })
jwt?: string;
}