@sphereon/ssi-sdk.data-store
Version:
134 lines • 7.46 kB
JavaScript
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DigitalCredentialEntity = void 0;
const ssi_sdk_agent_config_1 = require("@sphereon/ssi-sdk.agent-config");
const typeorm_1 = require("typeorm");
const types_1 = require("../../types");
let DigitalCredentialEntity = class DigitalCredentialEntity extends typeorm_1.BaseEntity {
};
exports.DigitalCredentialEntity = DigitalCredentialEntity;
__decorate([
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "id", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'parent_id', nullable: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "parentId", void 0);
__decorate([
(0, typeorm_1.Column)('simple-enum', { name: 'document_type', enum: types_1.DocumentType, nullable: false }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "documentType", void 0);
__decorate([
(0, typeorm_1.Column)('simple-enum', { name: 'regulation_type', enum: types_1.RegulationType, nullable: false }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "regulationType", void 0);
__decorate([
(0, typeorm_1.Column)('simple-enum', { name: 'document_format', enum: types_1.CredentialDocumentFormat, nullable: false }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "documentFormat", void 0);
__decorate([
(0, typeorm_1.Column)('simple-enum', { name: 'credential_role', enum: types_1.CredentialRole, nullable: false }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "credentialRole", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'raw_document', nullable: false }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "rawDocument", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'uniform_document', nullable: false }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "uniformDocument", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'credential_id', nullable: true, unique: false }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "credentialId", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'hash', nullable: false, unique: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "hash", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'kms_key_ref', nullable: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "kmsKeyRef", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'identifier_method', nullable: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "identifierMethod", void 0);
__decorate([
(0, typeorm_1.Column)('simple-enum', { name: 'issuer_correlation_type', enum: types_1.CredentialCorrelationType, nullable: false }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "issuerCorrelationType", void 0);
__decorate([
(0, typeorm_1.Column)('simple-enum', { name: 'subject_correlation_type', enum: types_1.CredentialCorrelationType, nullable: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "subjectCorrelationType", void 0);
__decorate([
(0, typeorm_1.Column)('simple-enum', { name: 'rp_correlation_type', enum: types_1.CredentialCorrelationType, nullable: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "rpCorrelationType", void 0);
__decorate([
(0, typeorm_1.Column)('boolean', { name: 'issuer_signed', nullable: true }),
__metadata("design:type", Boolean)
], DigitalCredentialEntity.prototype, "isIssuerSigned", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'issuer_correlation_id', nullable: false }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "issuerCorrelationId", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'subject_correlation_id', nullable: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "subjectCorrelationId", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'rp_correlation_id', nullable: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "rpCorrelationId", void 0);
__decorate([
(0, typeorm_1.Column)('simple-enum', { name: 'verified_state', enum: types_1.CredentialStateType, nullable: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "verifiedState", void 0);
__decorate([
(0, typeorm_1.Column)('text', { name: 'tenant_id', nullable: true }),
__metadata("design:type", String)
], DigitalCredentialEntity.prototype, "tenantId", void 0);
__decorate([
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
__metadata("design:type", Date)
], DigitalCredentialEntity.prototype, "createdAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'presented_at', nullable: true, type: (0, ssi_sdk_agent_config_1.typeormDate)() }),
__metadata("design:type", Date)
], DigitalCredentialEntity.prototype, "presentedAt", void 0);
__decorate([
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
__metadata("design:type", Date)
], DigitalCredentialEntity.prototype, "lastUpdatedAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'valid_until', nullable: true, type: (0, ssi_sdk_agent_config_1.typeormDate)() }),
__metadata("design:type", Date)
], DigitalCredentialEntity.prototype, "validUntil", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'valid_from', nullable: true, type: (0, ssi_sdk_agent_config_1.typeormDate)() }),
__metadata("design:type", Date)
], DigitalCredentialEntity.prototype, "validFrom", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'verified_at', nullable: true, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
__metadata("design:type", Date)
], DigitalCredentialEntity.prototype, "verifiedAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'revoked_at', nullable: true, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
__metadata("design:type", Date)
], DigitalCredentialEntity.prototype, "revokedAt", void 0);
exports.DigitalCredentialEntity = DigitalCredentialEntity = __decorate([
(0, typeorm_1.Entity)('DigitalCredential')
], DigitalCredentialEntity);
//# sourceMappingURL=DigitalCredentialEntity.js.map