You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1023 B
Go
50 lines
1023 B
Go
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"
|
|
)
|