package user import "time" // User is the user aggregate root. type User struct { ID string ZitadelUserID string Email string EmailVerified bool DisplayName string ConsentVersion string ConsentGivenAt time.Time ConsentSource string CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time } // IsDeleted reports whether the user has been soft-deleted. func (u *User) IsDeleted() bool { return u != nil && u.DeletedAt != nil } // ConsentRecord captures user consent details. type ConsentRecord struct { Version string GivenAt time.Time Source string } // AuditLogEntry tracks compliance-relevant actions. type AuditLogEntry struct { ID string ActorUserID string TargetUserID string Action string MetadataJSON string CreatedAt time.Time } const ( // AuditActionGDPRExport indicates a GDPR export operation. AuditActionGDPRExport = "gdpr_export" // AuditActionGDPRDelete indicates a GDPR delete operation. AuditActionGDPRDelete = "gdpr_delete" )