- 增加 Navigate 属性未设置 set 时的友好错误提示;

- 增加 延时属性重写类对 protected set 的支持;
This commit is contained in:
28810
2020-03-22 01:15:40 +08:00
parent 500a4d02f3
commit cb366cc771
6 changed files with 432 additions and 12 deletions

View File

@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;
using FreeSql;
namespace EMSServerModel.Model
{
/// <summary>
/// <20><>ɫ<EFBFBD><C9AB>
/// </summary>
[JsonObject(MemberSerialization.OptIn)]
public partial class Role : BaseEntity<Role>{
/// <summary>
/// <20><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
/// </summary>
[JsonProperty, Column(IsPrimary = true, IsIdentity = true)]
public long RoleId { get; set; }
/// <summary>
/// <20><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
/// </summary>
[JsonProperty, Column(DbType = "varchar(50)")]
public string RoleName { get; set; } = string.Empty;
/// <summary>
/// <20><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
/// </summary>
[JsonProperty, Column(DbType = "varchar(50)")]
public string RoleDesc { get; set; } = string.Empty;
///// <summary>
///// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
///// </summary>
//[JsonProperty, Column(DbType = "date")]
//public DateTime CreateTime { get; set; } = DateTime.Now;
/// <summary>
/// <20><><EFBFBD><EFBFBD>
/// </summary>
[JsonProperty]
public bool IsEnable { get; set; } = true;
/// <summary>
/// <20><>ɫ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>Զർ<D4B6><E0B5BC>
/// </summary>
[Navigate(ManyToMany = typeof(UserRole))]
public virtual ICollection<User> Users { get; protected set; }
}
}