@veramo/data-store
Version:
Veramo data storage plugin based on TypeORM database drivers
33 lines (27 loc) • 982 B
text/typescript
import { Entity, Column, PrimaryColumn, BaseEntity, ManyToOne, Relation } from 'typeorm'
import { Identifier } from './identifier.js'
/**
* Represents some properties of a {@link did-resolver#ServiceEndpoint | ServiceEndpoint} as it is stored in a TypeORM
* database. This is used by {@link @veramo/data-store#DIDStore | DIDStore} to provide information to
* {@link @veramo/did-manager#DIDManager | DIDManager} when DID management information is stored in a local TypeORM
* database.
*
* @beta This API may change without a BREAKING CHANGE notice.
*/
('service')
export class Service extends BaseEntity {
()
// @ts-ignore
id: string
()
// @ts-ignore
type: string
()
// @ts-ignore
serviceEndpoint: string
({ nullable: true })
description?: string
((type) => Identifier, (identifier) => identifier?.services, { onDelete: 'CASCADE' })
// @ts-ignore
identifier?: Relation<Identifier>
}