@sphereon/ssi-sdk.data-store
Version:
86 lines • 4.98 kB
JavaScript
;
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.MachineStateInfoEntity = void 0;
const typeorm_1 = require("typeorm");
const ssi_sdk_agent_config_1 = require("@sphereon/ssi-sdk.agent-config");
/**
* @class MachineStateInfoEntity
* Represents a machine state. It allows to continue a machine at a later point in time at the point it was left of
*
* @param {string} instanceId - The instance ID of the machine state.
* @param {string} [sessionId] - The session ID of the machine state. (optional)
* @param {string} machineName - The name of the machine.
* @param {string} [latestStateName] - The name of the latest state. (optional)
* @param {string} latestEventType - The type of the latest event.
* @param {string} state - The current state of the machine.
* @param {Date} createdAt - The date and time when the machine state was created.
* @param {Date} updatedAt - The date and time when the machine state was last updated.
* @param {number} updatedCount - The number of times the machine state has been updated.
* @param {Date} [expiresAt] - The date and time when the machine state expires. (optional)
* @param {Date} [completedAt] - The date and time when the machine state was completed. (optional)
* @param {string} [tenantId] - The ID of the tenant associated with the machine state. (optional)
*/
let MachineStateInfoEntity = class MachineStateInfoEntity extends typeorm_1.BaseEntity {
};
exports.MachineStateInfoEntity = MachineStateInfoEntity;
__decorate([
(0, typeorm_1.PrimaryColumn)({ name: 'instance_id', type: 'varchar', nullable: false }),
__metadata("design:type", String)
], MachineStateInfoEntity.prototype, "instanceId", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'session_id', type: 'varchar', nullable: true }),
__metadata("design:type", String)
], MachineStateInfoEntity.prototype, "sessionId", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'machine_name', type: 'varchar', nullable: false }),
__metadata("design:type", String)
], MachineStateInfoEntity.prototype, "machineName", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'latest_state_name', type: 'varchar', nullable: true }),
__metadata("design:type", String)
], MachineStateInfoEntity.prototype, "latestStateName", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'latest_event_type', type: 'varchar', nullable: false }),
__metadata("design:type", String)
], MachineStateInfoEntity.prototype, "latestEventType", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'state', type: 'text', nullable: false }),
__metadata("design:type", String)
], MachineStateInfoEntity.prototype, "state", void 0);
__decorate([
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
__metadata("design:type", Date)
], MachineStateInfoEntity.prototype, "createdAt", void 0);
__decorate([
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
__metadata("design:type", Date)
], MachineStateInfoEntity.prototype, "updatedAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'updated_count', type: 'integer', nullable: false }),
__metadata("design:type", Number)
], MachineStateInfoEntity.prototype, "updatedCount", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'expires_at', nullable: true, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
__metadata("design:type", Date)
], MachineStateInfoEntity.prototype, "expiresAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'completed_at', nullable: true, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
__metadata("design:type", Date)
], MachineStateInfoEntity.prototype, "completedAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'varchar', nullable: true }),
__metadata("design:type", String)
], MachineStateInfoEntity.prototype, "tenantId", void 0);
exports.MachineStateInfoEntity = MachineStateInfoEntity = __decorate([
(0, typeorm_1.Entity)('MachineStateInfoEntity')
], MachineStateInfoEntity);
//# sourceMappingURL=MachineStateInfoEntity.js.map