wip
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { randomUUID } from 'crypto';
|
||||
import type { IEntity } from '@gridpilot/shared/domain';
|
||||
import { StepId } from '../value-objects/StepId';
|
||||
import { SessionState } from '../value-objects/SessionState';
|
||||
import { HostedSessionConfig } from './HostedSessionConfig';
|
||||
import type { HostedSessionConfig } from '../types/HostedSessionConfig';
|
||||
import { AutomationDomainError } from '../errors/AutomationDomainError';
|
||||
|
||||
export class AutomationSession {
|
||||
export class AutomationSession implements IEntity<string> {
|
||||
private readonly _id: string;
|
||||
private _currentStep: StepId;
|
||||
private _state: SessionState;
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
export interface HostedSessionConfig {
|
||||
sessionName: string;
|
||||
trackId: string;
|
||||
carIds: string[];
|
||||
|
||||
// Optional fields for extended configuration.
|
||||
serverName?: string;
|
||||
password?: string;
|
||||
adminPassword?: string;
|
||||
maxDrivers?: number;
|
||||
|
||||
/** Search term for car selection (alternative to carIds) */
|
||||
carSearch?: string;
|
||||
/** Search term for track selection (alternative to trackId) */
|
||||
trackSearch?: string;
|
||||
|
||||
weatherType?: 'static' | 'dynamic';
|
||||
timeOfDay?: 'morning' | 'afternoon' | 'evening' | 'night';
|
||||
sessionDuration?: number;
|
||||
practiceLength?: number;
|
||||
qualifyingLength?: number;
|
||||
warmupLength?: number;
|
||||
raceLength?: number;
|
||||
startType?: 'standing' | 'rolling';
|
||||
restarts?: 'single-file' | 'double-file';
|
||||
damageModel?: 'off' | 'limited' | 'realistic';
|
||||
trackState?: 'auto' | 'clean' | 'moderately-low' | 'moderately-high' | 'optimum';
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
import { StepId } from '../value-objects/StepId';
|
||||
import type { StepId } from '../value-objects/StepId';
|
||||
|
||||
/**
|
||||
* Domain Type: StepExecution
|
||||
*
|
||||
* Represents execution metadata for a single automation step.
|
||||
* This is a pure data shape (DTO-like), not an entity or value object.
|
||||
*/
|
||||
export interface StepExecution {
|
||||
stepId: StepId;
|
||||
startedAt: Date;
|
||||
|
||||
Reference in New Issue
Block a user