detect/detect.gui/Models/Entities/UserAuthorityEntity.cs

26 lines
693 B
C#
Raw Normal View History

2024-11-13 17:09:15 +08:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
2024-11-14 17:11:43 +08:00
using Newtonsoft.Json;
2024-11-13 17:09:15 +08:00
namespace detect.gui.Models.Entities;
2024-11-14 17:11:43 +08:00
[Table("dat_user_authority")]
2024-11-13 17:09:15 +08:00
[Index(nameof(UserId), IsUnique = false)]
[Index(nameof(AuthorityId), IsUnique = false)]
public class UserAuthorityEntity
{
2024-11-14 17:11:43 +08:00
[Key]
[JsonProperty(PropertyName = "id")]
[Column("id")]
public long? Id { get; set; }
2024-11-13 17:09:15 +08:00
2024-11-14 17:11:43 +08:00
[JsonProperty(PropertyName = "userId")]
[Column("user_id")]
2024-11-13 17:09:15 +08:00
public long? UserId { get; set; }
2024-11-14 17:11:43 +08:00
[JsonProperty(PropertyName = "authorityId")]
[Column("authority_id")]
2024-11-13 17:09:15 +08:00
public long? AuthorityId { get; set; }
}