Skip to content

Commit 07f2945

Browse files
author
Vadim Belov
committed
Move BasePostgresUser; add BaseUserDto class
- Relocated BasePostgresUser from BaseUser.cs to BasePostgresUser.cs. - Removed BaseUser.cs. - Introduced BaseUserDto in BaseUserDto.cs for user API data transfer.
1 parent 88508ef commit 07f2945

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

Sources/EasyExtensions.EntityFrameworkCore.Npgsql/Database/BaseUser.cs renamed to Sources/EasyExtensions.EntityFrameworkCore.Npgsql/Database/BasePostgresUser.cs

File renamed without changes.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using EasyExtensions.Models.Enums;
2+
using System;
3+
4+
namespace EasyExtensions.Models.Dto
5+
{
6+
/// <summary>
7+
/// Represents the base data transfer object for a user, including common user profile information and role
8+
/// assignment.
9+
/// </summary>
10+
/// <remarks>This class provides fundamental user properties for use in API requests and responses. It is
11+
/// intended to be inherited by more specialized user DTOs as needed. The properties include identification, contact
12+
/// information, activation status, and role assignment.</remarks>
13+
public class BaseUserDto : BaseDto<Guid>
14+
{
15+
/// <summary>
16+
/// Gets or sets the first name of the person.
17+
/// </summary>
18+
public string FirstName { get; set; } = null!;
19+
20+
/// <summary>
21+
/// Gets or sets the last name of the person.
22+
/// </summary>
23+
public string LastName { get; set; } = null!;
24+
25+
/// <summary>
26+
/// Gets or sets the email address associated with the user.
27+
/// </summary>
28+
public string Email { get; set; } = null!;
29+
30+
/// <summary>
31+
/// Gets or sets a value indicating whether the instance is currently active.
32+
/// </summary>
33+
public bool IsActive { get; set; }
34+
35+
/// <summary>
36+
/// Gets or sets the role assigned to the user.
37+
/// </summary>
38+
public UserRole Role { get; set; }
39+
}
40+
}

0 commit comments

Comments
 (0)