21 lines
567 B
C#
21 lines
567 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace khmereid_backend.Models;
|
|
|
|
[Index(nameof(Phone), IsUnique = true)]
|
|
[Index(nameof(NationalId), IsUnique = true)]
|
|
public class User
|
|
{
|
|
[Key]
|
|
public Guid Id { get; set; } = Guid.NewGuid();
|
|
|
|
[Required]
|
|
public Guid IdentityId { get; set; } = default!; // Identity id from the provider
|
|
|
|
[Required]
|
|
public string Phone { get; set; } = default!;
|
|
public string NationalId { get; set; } = "";
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|