Class User
Represents a user in the OEMS system with authentication and authorization capabilities.
Inherited Members
Namespace: OEMS.Core.Domain.Klassen
Assembly: OEMS.Core.dll
Syntax
public class User
Remarks
The User class serves as the central identity entity in the system, managing user authentication, personal information, and relationships to organizations, events, and other system entities. Users can be administrators with elevated privileges or regular users with standard access rights.
Properties
CreatedEvents
Gets or sets the collection of events created by this user.
Declaration
public virtual ICollection<Event> CreatedEvents { get; set; }
Property Value
Type | Description |
---|---|
ICollection<Event> | A collection of Event entities that were created by this user. |
CreationDate
Gets or sets the date and time when the user account was created.
Declaration
[Required]
public DateTime CreationDate { get; set; }
Property Value
Type | Description |
---|---|
DateTime | The timestamp of user account creation in UTC. |
Gets or sets the user's email address.
Declaration
[Required]
[EmailAddress]
[StringLength(200)]
public string Email { get; set; }
Property Value
Type | Description |
---|---|
string | A valid email address that serves as the user's primary contact and login identifier. |
Remarks
The email address must be unique across the system and is validated for proper email format. Maximum length is 200 characters.
EventParticipations
Gets or sets the collection of event participations for this user.
Declaration
public virtual ICollection<EventParticipation> EventParticipations { get; set; }
Property Value
Type | Description |
---|---|
ICollection<EventParticipation> | A collection of EventParticipation entities representing events the user is participating in. |
Feedbacks
Gets or sets the collection of feedback provided by this user.
Declaration
public virtual ICollection<Feedback> Feedbacks { get; set; }
Property Value
Type | Description |
---|---|
ICollection<Feedback> | A collection of Feedback entities representing feedback or comments submitted by the user. |
FirstName
Gets or sets the user's first name.
Declaration
[Required]
[StringLength(50)]
public string FirstName { get; set; }
Property Value
Type | Description |
---|---|
string | The given name of the user, limited to 50 characters. |
GroupUsers
Gets or sets the collection of group memberships for this user.
Declaration
public virtual ICollection<GroupUser> GroupUsers { get; set; }
Property Value
Type | Description |
---|---|
ICollection<GroupUser> | A collection of GroupUser entities representing the user's membership in various groups. |
Id
Gets or sets the unique identifier for the user.
Declaration
[Key]
public Guid Id { get; set; }
Property Value
Type | Description |
---|---|
Guid | A GUID that uniquely identifies the user across the system. |
IsActive
Gets or sets a value indicating whether the user account is active.
Declaration
[Required]
public bool IsActive { get; set; }
Property Value
Type | Description |
---|---|
bool | true if the user account is active and can authenticate; otherwise, false. |
Remarks
Inactive users cannot log in or access system resources. This flag can be used for temporary account suspension without deleting the user record.
IsAdmin
Gets or sets a value indicating whether the user has administrative privileges.
Declaration
[Required]
public bool IsAdmin { get; set; }
Property Value
Type | Description |
---|---|
bool | true if the user is an administrator with elevated system access; otherwise, false. |
Remarks
Administrators have access to system-wide configuration, user management, and other privileged operations that regular users cannot perform.
LastLoginDate
Gets or sets the date and time of the user's last login.
Declaration
public DateTime? LastLoginDate { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | The timestamp of the most recent successful login, or null if the user has never logged in. |
LastName
Gets or sets the user's last name.
Declaration
[Required]
[StringLength(50)]
public string LastName { get; set; }
Property Value
Type | Description |
---|---|
string | The family name of the user, limited to 50 characters. |
OrganizationUsers
Gets or sets the collection of organization memberships for this user.
Declaration
public virtual ICollection<OrganizationUser> OrganizationUsers { get; set; }
Property Value
Type | Description |
---|---|
ICollection<OrganizationUser> | A collection of OrganizationUser entities representing the user's membership in various organizations. |
PasswordHash
Gets or sets the hashed password for user authentication.
Declaration
[Required]
public string PasswordHash { get; set; }
Property Value
Type | Description |
---|---|
string | A securely hashed representation of the user's password combined with the salt. |
Remarks
This field stores the result of applying a cryptographic hash function to the user's password and salt combination. The original password is never stored in plain text.
RefreshTokens
Gets or sets the collection of refresh tokens associated with this user.
Declaration
public virtual ICollection<RefreshToken> RefreshTokens { get; set; }
Property Value
Type | Description |
---|---|
ICollection<RefreshToken> | A collection of RefreshToken entities used for maintaining authenticated sessions. |
Remarks
Refresh tokens allow the system to maintain user sessions and issue new access tokens without requiring the user to re-authenticate frequently.
ResponsibleEventProcessSteps
Gets or sets the collection of event process steps for which this user is responsible.
Declaration
public virtual ICollection<EventProcessStep> ResponsibleEventProcessSteps { get; set; }
Property Value
Type | Description |
---|---|
ICollection<EventProcessStep> | A collection of EventProcessStep entities where this user is assigned as the responsible party. |
Salt
Gets or sets the cryptographic salt used for password hashing.
Declaration
[Required]
public string Salt { get; set; }
Property Value
Type | Description |
---|---|
string | A random string used to strengthen password security by preventing rainbow table attacks. |
UploadedEventFiles
Gets or sets the collection of event files uploaded by this user.
Declaration
public virtual ICollection<EventFile> UploadedEventFiles { get; set; }
Property Value
Type | Description |
---|---|
ICollection<EventFile> | A collection of EventFile entities representing files uploaded by the user for events. |
UploadedProcessStepFiles
Gets or sets the collection of process step files uploaded by this user.
Declaration
public virtual ICollection<ProcessStepFile> UploadedProcessStepFiles { get; set; }
Property Value
Type | Description |
---|---|
ICollection<ProcessStepFile> | A collection of ProcessStepFile entities representing files uploaded by the user for process steps. |
UserName
Gets or sets the user's display name or username.
Declaration
[Required]
public string UserName { get; set; }
Property Value
Type | Description |
---|---|
string | A human-readable identifier for the user within the system. |