54 lines
1.8 KiB
C#
54 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AyCode.Entities.Users
|
|
{
|
|
[Table("Users")]
|
|
public class UserBase : IUserBase
|
|
{
|
|
public UserBase() { }
|
|
|
|
public UserBase(string email, string password) : this(Guid.NewGuid(), email, password) { }
|
|
public UserBase(Guid id, string email, string password) : this()
|
|
{
|
|
Id = id;
|
|
Email = email;
|
|
Password = password;
|
|
}
|
|
|
|
public UserBase(string email, string phoneNumber, string password) : this(Guid.NewGuid(), email, phoneNumber, password) { }
|
|
public UserBase(Guid id, string email, string phoneNumber, string password) : this()
|
|
{
|
|
Id = id;
|
|
Email = email;
|
|
PhoneNumber = phoneNumber;
|
|
Password = password;
|
|
}
|
|
|
|
public UserBase(string email, string phoneNumber, string password, string refreshToken) : this(Guid.NewGuid(), email, phoneNumber, password, refreshToken) { }
|
|
public UserBase(Guid id, string email, string phoneNumber, string password, string refreshToken) : this()
|
|
{
|
|
Id = id;
|
|
Email = email;
|
|
PhoneNumber = phoneNumber;
|
|
Password = password;
|
|
RefreshToken = refreshToken;
|
|
}
|
|
|
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
|
|
public Guid Id { get; set; }
|
|
public string Email { get; set; }
|
|
public string PhoneNumber { get; set; }
|
|
public string Password { get; set; }
|
|
public string? RefreshToken { get; set; }
|
|
|
|
public DateTime Created { get; set; }
|
|
public DateTime Modified { get; set; }
|
|
}
|
|
}
|