"""Data models for the auth0-identity-analysis project.""" from dataclasses import dataclass, field @dataclass class TenantRelationship: """A tenant relationship from a Neo4j profile.""" relationship_type: str tenant_id: int | None tenant_uuid: str tenant_name: str tenant_labels: list[str] @dataclass class Profile: """A Neo4j profile with its tenant relationships.""" uuid: str profile_type: str profile_id: int | None full_catalog_access: bool brand: str relationships: list[TenantRelationship] = field(default_factory=list) @dataclass class Organization: """Auth0 Organization data.""" id: str name: str display_name: str @dataclass class Auth0User: """Auth0 user data from JSON Lines export.""" id: str nickname: str name: str email: str email_verified: bool connection: str created_at: str updated_at: str last_login: str identity_id: str vend_contact_id: int | None = None organizations: list[Organization] = field(default_factory=list) @dataclass class OrgMember: """User with their organization memberships.""" user_id: str email: str name: str organizations: list[Organization] @dataclass class Neo4jIdentity: """Neo4j identity data from exported JSON.""" id: str first_name: str last_name: str name: str email: str default_brand: str has_active_access: bool auth0_user_id: str original_auth0_id: str active: str is_employee: bool | None found: bool # Audit fields from cypher query updated_by: str updated_on: str created_at: str last_modified_by: str last_modified_at: str # Profiles and computed counts profiles: list[Profile] = field(default_factory=list) profile_count: int = 0 active_access_count: int = 0 deleted_access_count: int = 0 @dataclass class VendContactRecord: """A single vend_contact record from MySQL.""" id: int auth0_user_id: str | None auth0_primary: str | None active: str @dataclass class VendContactReport: """Vend contact report data for a user (Auth0 + Neo4j LabelProfiles + MySQL).""" mismatch: bool label_profile_ids: list[int] vend_contacts: list[VendContactRecord] @dataclass class CombinedUser: """Combined user data from Auth0, Neo4j, and MySQL.""" auth0_data: Auth0User neo4j_data: Neo4jIdentity | None mysql_data: VendContactReport | None = None