@citrineos/data
Version:
The OCPP data module which includes all persistence layer implementation.
48 lines (47 loc) • 1.88 kB
TypeScript
import type { StartTransactionDto, StopTransactionDto, TenantDto, TransactionDto } from '@citrineos/base';
import { Model } from 'sequelize-typescript';
import { MeterValue } from './MeterValue.js';
import { TransactionEvent } from './TransactionEvent.js';
import { type ChargingStation as ChargingStationType } from '../Location/ChargingStation.js';
import { Connector } from '../Location/Connector.js';
import { Evse } from '../Location/Evse.js';
import { type Location as LocationType } from '../Location/Location.js';
import { Authorization } from '../Authorization/index.js';
import { Tariff } from '../index.js';
export declare class Transaction extends Model implements TransactionDto {
static readonly MODEL_NAME: string;
static readonly TRANSACTION_EVENTS_ALIAS = "transactionEvents";
static readonly TRANSACTION_EVENTS_FILTER_ALIAS = "transactionEventsFilter";
locationId?: number;
location?: LocationType;
stationId: string;
station: ChargingStationType;
evseId?: number;
evse?: Evse | null;
connectorId?: number;
connector?: Connector | null;
authorizationId?: number;
authorization?: Authorization;
tariffId?: number;
tariff?: Tariff;
transactionId: string;
isActive: boolean;
transactionEvents?: TransactionEvent[];
transactionEventsFilter?: TransactionEvent[];
meterValues?: MeterValue[];
startTransaction?: StartTransactionDto;
stopTransaction?: StopTransactionDto;
chargingState?: string | null;
timeSpentCharging?: number | null;
totalKwh?: number | null;
stoppedReason?: string | null;
remoteStartId?: number | null;
totalCost?: number;
startTime?: string;
endTime?: string;
customData?: any | null;
tenantId: number;
tenant?: TenantDto;
static setDefaultTenant(instance: Transaction): void;
constructor(...args: any[]);
}