mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 21:44:12 +08:00
29 lines
829 B
C#
29 lines
829 B
C#
![]() |
using System;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.ComponentModel.DataAnnotations;
|
|||
|
using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
using Avalonia.Collections;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Newtonsoft.Json;
|
|||
|
|
|||
|
namespace detect.gui.Models.Entities;
|
|||
|
|
|||
|
[Table("Authority")]
|
|||
|
[Index(nameof(Name), IsUnique = true)]
|
|||
|
[Index(nameof(ParentId), IsUnique = false)]
|
|||
|
public class AuthorityEntity
|
|||
|
{
|
|||
|
[Key] public long? Id { get; set; }
|
|||
|
|
|||
|
[StringLength(255), Comment("名称")] public string? Name { get; set; }
|
|||
|
|
|||
|
[DefaultValue(0)] public long? ParentId { get; set; }
|
|||
|
|
|||
|
[Comment("创建时间")] public DateTime? CreateTime { get; set; }
|
|||
|
|
|||
|
[Comment("更新时间")] public DateTime? UpdateTime { get; set; }
|
|||
|
|
|||
|
[NotMapped]
|
|||
|
[JsonIgnore]
|
|||
|
public AvaloniaList<AuthorityEntity>? Children { get; set; }
|
|||
|
}
|