| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| export interface UserRow { |
| id: string; |
| email: string; |
| password: string; |
| display_name: string | null; |
| email_verified: boolean; |
| is_admin: boolean; |
| is_active: boolean; |
| verification_code: string | null; |
| verification_expires: string | null; |
| reset_token: string | null; |
| reset_expires: string | null; |
| last_login_at: string | null; |
| disabled_reason: string | null; |
| created_at: string; |
| updated_at: string; |
| } |
|
|
| |
| export interface UserPublicRow { |
| id: string; |
| email: string; |
| display_name: string | null; |
| email_verified: boolean; |
| is_admin: boolean; |
| is_active: boolean; |
| created_at: string; |
| } |
|
|
| export interface SessionRow { |
| token: string; |
| user_id: string; |
| expires_at: string; |
| created_at: string; |
| } |
|
|
| |
| export interface SessionWithUserRow { |
| |
| token: string; |
| expires_at: string; |
| |
| user_id: string; |
| email: string; |
| display_name: string | null; |
| email_verified: boolean; |
| is_admin: boolean; |
| is_active: boolean; |
| } |
|
|
| export interface NewUserInput { |
| id: string; |
| email: string; |
| passwordHash: string; |
| displayName: string | null; |
| verificationCode: string | null; |
| verificationExpires: string | null; |
| } |
|
|
| export interface AuditEntryRow { |
| id: string; |
| user_id: string | null; |
| action: string; |
| ip: string | null; |
| meta: Record<string, unknown>; |
| created_at: string; |
| } |
|
|
| export interface NewAuditEntry { |
| userId?: string | null; |
| action: string; |
| ip?: string | null; |
| meta?: Record<string, unknown>; |
| } |
|
|
| |
|
|
| export interface HealthDataRow { |
| id: string; |
| user_id: string; |
| type: string; |
| data: string; |
| created_at: string; |
| updated_at: string; |
| } |
|
|
| export interface NewHealthData { |
| userId: string; |
| type: string; |
| data: string; |
| } |
|
|
| |
|
|
| export interface ChatHistoryRow { |
| id: string; |
| user_id: string; |
| preview: string | null; |
| messages: string; |
| topic: string | null; |
| created_at: string; |
| } |
|
|
| export interface NewChatHistory { |
| id: string; |
| userId: string; |
| preview: string | null; |
| messages: string; |
| topic: string | null; |
| } |
|
|
| |
|
|
| export interface UserSettingsRow { |
| user_id: string; |
| language: string | null; |
| country: string | null; |
| units: string | null; |
| default_model: string | null; |
| theme: string | null; |
| ehr: string; |
| hf_token_encrypted: string | null; |
| updated_at: string; |
| } |
|
|
| export interface UserSettingsUpdate { |
| userId: string; |
| language?: string | null; |
| country?: string | null; |
| units?: string | null; |
| defaultModel?: string | null; |
| theme?: string | null; |
| ehr?: string; |
| hfTokenEncrypted?: string | null; |
| } |
|
|
| |
|
|
| export interface NewScanLog { |
| userId: string | null; |
| ip: string | null; |
| status: number; |
| bytes: number; |
| latencyMs: number; |
| model: string | null; |
| } |
|
|