基类模型修改为接口
This commit is contained in:
@@ -9,9 +9,10 @@ namespace Yi.Framework.Model.Models
|
||||
///</summary>
|
||||
[SplitTable(SplitType.Year)]
|
||||
[SugarTable("SplitLog_{year}{month}{day}")]
|
||||
public partial class LogEntity
|
||||
public partial class LogEntity
|
||||
{
|
||||
[SplitField] //分表字段 在插入的时候会根据这个字段插入哪个表,在更新删除的时候用这个字段找出相关表
|
||||
public DateTime? LogCreateTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
59
Yi.Framework.Net6/Yi.Framework.Model/Models/LogEntity.cs
Normal file
59
Yi.Framework.Net6/Yi.Framework.Model/Models/LogEntity.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 日志表
|
||||
///</summary>
|
||||
public partial class LogEntity:IBaseModelEntity
|
||||
{
|
||||
public LogEntity()
|
||||
{
|
||||
this.IsDeleted = false;
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
/// <summary>
|
||||
/// 1
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CreateUser" )]
|
||||
public long? CreateUser { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CreateTime" )]
|
||||
public DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 修改者
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ModifyUser" )]
|
||||
public long? ModifyUser { get; set; }
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ModifyTime" )]
|
||||
public DateTime? ModifyTime { get; set; }
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="IsDeleted" )]
|
||||
public bool? IsDeleted { get; set; }
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="TenantId" )]
|
||||
public long? TenantId { get; set; }
|
||||
/// <summary>
|
||||
/// 消息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Message" )]
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace Yi.Framework.Model.Models
|
||||
[SugarTable("Role")]
|
||||
public partial class RoleEntity:IBaseModelEntity
|
||||
{
|
||||
public BaseModelEntity()
|
||||
public RoleEntity()
|
||||
{
|
||||
this.IsDeleted = false;
|
||||
this.CreateTime = DateTime.Now;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Yi.Framework.Model.Models
|
||||
[SugarTable("User")]
|
||||
public partial class UserEntity:IBaseModelEntity
|
||||
{
|
||||
public BaseModelEntity()
|
||||
public UserEntity()
|
||||
{
|
||||
this.IsDeleted = false;
|
||||
this.CreateTime = DateTime.Now;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Yi.Framework.Model.Models
|
||||
[SugarTable("UserRole")]
|
||||
public partial class UserRoleEntity:IBaseModelEntity
|
||||
{
|
||||
public BaseModelEntity()
|
||||
public UserRoleEntity()
|
||||
{
|
||||
this.IsDeleted = false;
|
||||
this.CreateTime = DateTime.Now;
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public partial class UserEntity:BaseModelEntity
|
||||
public partial class UserEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 看好啦!ORM精髓,导航属性
|
||||
|
||||
Reference in New Issue
Block a user