import { CronExpression } from '../value-objects/CronExpression.js'; import { BackupRetentionPolicy, type BackupRetentionPolicyData } from '../value-objects/BackupRetentionPolicy.js'; /** * BackupSchedule entity data for construction */ export interface BackupScheduleData { id?: string; name: string; cronExpression: string; retentionPolicy?: BackupRetentionPolicyData; enabled?: boolean; lastRunAt?: Date | null; lastRunStatus?: 'success' | 'failure' | null; lastRunMessage?: string | null; createdAt?: Date; updatedAt?: Date; } /** * Database row structure for backup_schedules table */ export interface BackupScheduleRow { id: string; name: string; cron_expression: string; retention_max_count: number | null; retention_max_age_days: number | null; enabled: number; last_run_at: string | null; last_run_status: string | null; last_run_message: string | null; created_at: string; updated_at: string; } /** * BackupSchedule Entity * Represents a scheduled backup configuration */ export declare class BackupSchedule { private readonly _id; private readonly _name; private readonly _cronExpression; private readonly _retentionPolicy; private readonly _enabled; private readonly _lastRunAt; private readonly _lastRunStatus; private readonly _lastRunMessage; private readonly _createdAt; private readonly _updatedAt; private constructor(); get id(): string; get name(): string; get cronExpression(): CronExpression; get retentionPolicy(): BackupRetentionPolicy; get enabled(): boolean; get lastRunAt(): Date | null; get lastRunStatus(): 'success' | 'failure' | null; get lastRunMessage(): string | null; get createdAt(): Date; get updatedAt(): Date; /** * Create a new BackupSchedule entity */ static create(data: BackupScheduleData): BackupSchedule; /** * Create a BackupSchedule from a database row */ static fromRaw(row: BackupScheduleRow): BackupSchedule; /** * Return a new BackupSchedule with enabled = true */ enable(): BackupSchedule; /** * Return a new BackupSchedule with enabled = false */ disable(): BackupSchedule; /** * Return a new BackupSchedule with the run recorded */ recordRun(status: 'success' | 'failure', message?: string): BackupSchedule; /** * Convert to plain object for serialization */ toJSON(): { id: string; name: string; cronExpression: string; cronHumanReadable: string; retentionPolicy: BackupRetentionPolicyData; enabled: boolean; lastRunAt: string | null; lastRunStatus: 'success' | 'failure' | null; lastRunMessage: string | null; createdAt: string; updatedAt: string; }; } //# sourceMappingURL=BackupSchedule.d.ts.map