// Package models defines domain models for the application package models import "time" // User represents a system user type User struct { ID string Username string Email *string PasswordHash *string DisplayName *string IsActive bool IsOIDCUser bool OIDCProviderID *string OIDCSubject *string LastLoginUTC *time.Time CreatedUTC time.Time UpdatedUTC time.Time DeletedUTC *time.Time PasswordResetRequired bool Roles []Role } // Role represents a system role for RBAC type Role struct { ID string Name string Description *string IsSystemRole bool CreatedUTC time.Time UpdatedUTC time.Time } // Session represents a user session type Session struct { ID string UserID string TokenHash string ExpiresUTC time.Time CreatedUTC time.Time RevokedUTC *time.Time } // APIKey represents an API key for programmatic access type APIKey struct { ID string UserID string Name string KeyPrefix string KeyHash string ExpiresUTC *time.Time IsEnabled bool LastUsedUTC *time.Time CreatedUTC time.Time RevokedUTC *time.Time } // OIDCProvider represents an OIDC identity provider configuration type OIDCProvider struct { ID string Name string DisplayName string IssuerURL string ClientID string ClientSecretEncrypted string Scopes string IsEnabled bool AutoCreateUsers bool DefaultRoleID *string CreatedUTC time.Time UpdatedUTC time.Time DeletedUTC *time.Time } // Credential represents a stored credential for AD connections type Credential struct { ID string Name string Description *string CredentialType string Username *string EncryptedSecret *string IsEnabled bool LastTestedUTC *time.Time LastTestResult *string CreatedUTC time.Time UpdatedUTC time.Time DeletedUTC *time.Time } // ADConnection represents an Active Directory connection configuration type ADConnection struct { ID string Name string Description *string IsEnabled bool Hosts string Port int UseTLS bool UseStartTLS bool AllowInvalidCerts bool RootDN string BindDN *string CredentialID *string DefaultSearchScope string TimeoutSeconds int PagingEnabled bool PageSize int LastTestedUTC *time.Time LastTestResult *string CreatedUTC time.Time UpdatedUTC time.Time DeletedUTC *time.Time } // Schedule represents a reusable schedule definition type Schedule struct { ID string Name string Description *string IsEnabled bool ScheduleKind string EasyIntervalValue *int EasyIntervalUnit *string CronExpression *string TimezoneMode string NextRunUTC *time.Time CreatedUTC time.Time UpdatedUTC time.Time DeletedUTC *time.Time }