@wearesage/schema
Version:
A flexible schema definition and validation system for TypeScript with multi-database support
31 lines (24 loc) • 930 B
text/typescript
import { Entity, Property, Id, ManyToOne, Index, Timestamp, Auth } from '../core/decorators';
import { Space } from './Space';
// Users can see events in spaces they have access to
export class Event {
id!: string;
// Space this event belongs to
space!: Space;
eventType!: 'file_change' | 'build_started' | 'build_succeeded' | 'build_failed' |
'lint_error' | 'typescript_error' | 'runtime_error' | 'test_result' |
'deployment' | 'user_action' | 'space_update' | 'custom';
eventData!: Record<string, any>;
severity?: 'info' | 'warning' | 'error';
source?: string; // Source of the event (file path, service name, etc.)
timestamp!: Date;
}