@randombenj/db
Version:
Display, search and copy LXD-images using a web interface.
32 lines (25 loc) • 702 B
text/typescript
import { Entity, PrimaryGeneratedColumn, Column, BaseEntity } from 'typeorm';
export enum SyncState {
NOT_STARTED = 0,
RUNNING = 1,
FAILED = 2,
SUCCEEDED = 3,
}
/**
* Represents a run by the database synchronization tool
*/
()
export class SyncRun extends BaseEntity {
()
id: number;
({ type: 'varchar', default: Date.now() })
created: number;
({ type: 'varchar', nullable: true })
started?: number;
({ type: 'varchar', nullable: true })
ended?: number;
({ type: 'enum', enum: SyncState, default: SyncState.NOT_STARTED })
state: SyncState;
({ type: 'varchar', nullable: true })
error?: string;
}