Files

32 lines
801 B
C#
Raw Permalink Normal View History

2023-12-01 10:05:54 +10:00
using Microsoft.EntityFrameworkCore;
using PARR.Domain.Entities.Base;
2023-12-01 10:05:54 +10:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.Domain.Entities
2023-12-01 10:05:54 +10:00
{
[Table("Users")]
[Index(nameof(Ip), IsUnique = true)]
public class User : IBaseEntity
2023-12-01 10:05:54 +10:00
{
[Key]
public Guid Id { get; set; }
public DateTimeOffset DateCreated { get; set; }
[NotMapped]
public DateTimeOffset? DateModified { get; set; }
public required string Ip { get; set; }
public required string Name { get; set; }
public string? Description { get; set; }
public DateTimeOffset? LastLogon { get; set; }
2023-12-01 10:05:54 +10:00
public ICollection<UsersInRole> Roles { get; set; } = new HashSet<UsersInRole>();
}
}