爆肝,重构框架,你懂得
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public partial class ArticleEntity:IBaseModelEntity
|
||||
{
|
||||
[Navigate(NavigateType.OneToOne,nameof(UserId))]
|
||||
public UserEntity? User { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
|
||||
namespace Yi.Framework.Model.BBS.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 点赞表
|
||||
@@ -13,35 +14,35 @@ namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public AgreeEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="UserId" )]
|
||||
public long? UserId { get; set; }
|
||||
[SugarColumn(ColumnName = "UserId")]
|
||||
public long? UserId { get; set; }
|
||||
/// <summary>
|
||||
/// 文章或评论id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ArticleOrCommentId" )]
|
||||
public long? ArticleOrCommentId { get; set; }
|
||||
[SugarColumn(ColumnName = "ArticleOrCommentId")]
|
||||
public long? ArticleOrCommentId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建者
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CreateUser" )]
|
||||
public long? CreateUser { get; set; }
|
||||
[SugarColumn(ColumnName = "CreateUser")]
|
||||
public long? CreateUser { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CreateTime" )]
|
||||
public DateTime? CreateTime { get; set; }
|
||||
[SugarColumn(ColumnName = "CreateTime")]
|
||||
public DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="TenantId" )]
|
||||
public long? TenantId { get; set; }
|
||||
[SugarColumn(ColumnName = "TenantId")]
|
||||
public long? TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.BBS.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 文章表
|
||||
///</summary>
|
||||
[SugarTable("Article")]
|
||||
public partial class ArticleEntity : IBaseModelEntity
|
||||
{
|
||||
public ArticleEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
AgreeNum = 0;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 文章标题
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Title")]
|
||||
public string? Title { get; set; }
|
||||
/// <summary>
|
||||
/// 文章内容
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Content")]
|
||||
public string? Content { get; set; }
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UserId")]
|
||||
public long? UserId { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 图片列表
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Images", IsJson = true)]
|
||||
public List<string>? Images { get; set; }
|
||||
/// <summary>
|
||||
/// 点赞数量
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "AgreeNum")]
|
||||
public int AgreeNum { get; set; }
|
||||
|
||||
[Navigate(NavigateType.OneToOne, nameof(UserId))]
|
||||
public UserEntity? User { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.BBS.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 评论表
|
||||
///</summary>
|
||||
[SugarTable("Comment")]
|
||||
public partial class CommentEntity : IBaseModelEntity
|
||||
{
|
||||
public CommentEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
AgreeNum = 0;
|
||||
CommentNum = 0;
|
||||
ParentId = 0;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 文章id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ArticleId")]
|
||||
public long? ArticleId { get; set; }
|
||||
/// <summary>
|
||||
/// 被回复用户id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UserId")]
|
||||
public long? UserId { get; set; }
|
||||
/// <summary>
|
||||
/// 评论内容
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Content")]
|
||||
public string? Content { get; set; }
|
||||
/// <summary>
|
||||
/// 点赞数
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "AgreeNum")]
|
||||
public int? AgreeNum { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 子评论数
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CommentNum")]
|
||||
public int? CommentNum { get; set; }
|
||||
/// <summary>
|
||||
/// 父级评论id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ParentId")]
|
||||
public long? ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 被回复的用户信息
|
||||
///</summary>
|
||||
[Navigate(NavigateType.OneToOne, nameof(UserId), nameof(UserEntity.Id))]
|
||||
public UserEntity? UserInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建评论的用户信息
|
||||
///</summary>
|
||||
[Navigate(NavigateType.OneToOne, nameof(CreateUser), nameof(UserEntity.Id))]
|
||||
public UserEntity? CreateUserInfo { get; set; }
|
||||
}
|
||||
}
|
||||
18
Yi.Framework.Net6/Yi.Framework.Model/Base/Entity.cs
Normal file
18
Yi.Framework.Net6/Yi.Framework.Model/Base/Entity.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Base
|
||||
{
|
||||
public class Entity<Key> : IEntity<Key>
|
||||
{
|
||||
public Key Id { get; set; }
|
||||
|
||||
public object[] GetKeys()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Yi.Framework.Net6/Yi.Framework.Model/Base/EntityDto.cs
Normal file
31
Yi.Framework.Net6/Yi.Framework.Model/Base/EntityDto.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Base
|
||||
{
|
||||
[Serializable]
|
||||
public abstract class EntityDto<TKey> : EntityDto, IEntityDto<TKey>, IEntityDto
|
||||
{
|
||||
//
|
||||
// 摘要:
|
||||
// Id of the entity.
|
||||
public TKey Id { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"[DTO: {GetType().Name}] Id = {Id}";
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public abstract class EntityDto : IEntityDto
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return "[DTO: " + GetType().Name + "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,9 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
namespace Yi.Framework.Model.Base
|
||||
{
|
||||
public interface IBaseModelEntity
|
||||
public interface IBaseModelEntity
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
33
Yi.Framework.Net6/Yi.Framework.Model/Base/IEntity.cs
Normal file
33
Yi.Framework.Net6/Yi.Framework.Model/Base/IEntity.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines an entity. It's primary key may not be "Id" or it may have a composite primary key.
|
||||
/// Use <see cref="IEntity{TKey}"/> where possible for better integration to repositories and other structures in the framework.
|
||||
/// </summary>
|
||||
public interface IEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns an array of ordered keys for this entity.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
object[] GetKeys();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines an entity with a single primary key with "Id" property.
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey">Type of the primary key of the entity</typeparam>
|
||||
public interface IEntity<TKey> : IEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique identifier for this entity.
|
||||
/// </summary>
|
||||
TKey Id { get; }
|
||||
}
|
||||
}
|
||||
18
Yi.Framework.Net6/Yi.Framework.Model/Base/IEntityDto.cs
Normal file
18
Yi.Framework.Net6/Yi.Framework.Model/Base/IEntityDto.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Base
|
||||
{
|
||||
public interface IEntityDto
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public interface IEntityDto<TKey> : IEntityDto
|
||||
{
|
||||
TKey Id { get; set; }
|
||||
}
|
||||
}
|
||||
13
Yi.Framework.Net6/Yi.Framework.Model/Base/IMultiTenant.cs
Normal file
13
Yi.Framework.Net6/Yi.Framework.Model/Base/IMultiTenant.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Base
|
||||
{
|
||||
public interface IMultiTenant
|
||||
{
|
||||
Guid? TenantId { get; }
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Query
|
||||
namespace Yi.Framework.Model.Base.Query
|
||||
{
|
||||
public class QueryPageCondition
|
||||
{
|
||||
@@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Query
|
||||
namespace Yi.Framework.Model.Base.Query
|
||||
{
|
||||
public class QueryParameter
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Query
|
||||
namespace Yi.Framework.Model.Base.Query
|
||||
{
|
||||
public static class QueryParametersExtensions
|
||||
{
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品分类表
|
||||
///</summary>
|
||||
public partial class CategoryEntity:IBaseModelEntity
|
||||
{
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<CategoryEntity>? Children { get; set; }
|
||||
|
||||
|
||||
[Navigate(NavigateType.OneToMany,nameof(SpecsGroupEntity.CategoryId))]
|
||||
public List<SpecsGroupEntity>? SpecsGroups { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public partial class CommentEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 被回复的用户信息
|
||||
///</summary>
|
||||
[Navigate(NavigateType.OneToOne,nameof(UserId),nameof(UserEntity.Id))]
|
||||
public UserEntity? UserInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建评论的用户信息
|
||||
///</summary>
|
||||
[Navigate(NavigateType.OneToOne, nameof(CreateUser), nameof(UserEntity.Id))]
|
||||
public UserEntity? CreateUserInfo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 日志表
|
||||
///</summary>
|
||||
[SplitTable(SplitType.Year)]
|
||||
[SugarTable("SplitLog_{year}{month}{day}")]
|
||||
public partial class LogEntity
|
||||
{
|
||||
[SplitField] //分表字段 在插入的时候会根据这个字段插入哪个表,在更新删除的时候用这个字段找出相关表
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CreateTime")]
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Common.Models;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 菜单表
|
||||
///</summary>
|
||||
public partial class MenuEntity
|
||||
{
|
||||
[SqlSugar.SugarColumn(IsIgnore = true)]
|
||||
public List<MenuEntity>? Children { get; set; }
|
||||
|
||||
|
||||
public static List<VueRouterModel> RouterBuild(List<MenuEntity> menus)
|
||||
{
|
||||
menus = menus.Where(m => m.MenuType != null && m.MenuType != MenuTypeEnum.Component.GetHashCode()).ToList();
|
||||
List<VueRouterModel> routers = new();
|
||||
foreach (var m in menus)
|
||||
{
|
||||
|
||||
var r = new VueRouterModel();
|
||||
r.OrderNum = m.OrderNum ?? 0;
|
||||
var routerName = m.Router?.Split("/").LastOrDefault();
|
||||
r.Id = m.Id;
|
||||
r.ParentId = m.ParentId??-1;
|
||||
|
||||
//开头大写
|
||||
r.Name = routerName?.First().ToString().ToUpper() + routerName?.Substring(1);
|
||||
r.Path = m.Router;
|
||||
r.Hidden =!m.IsShow??false;
|
||||
|
||||
|
||||
if (m.MenuType == MenuTypeEnum.Catalogue.GetHashCode())
|
||||
{
|
||||
r.Redirect = "noRedirect";
|
||||
r.AlwaysShow = true;
|
||||
|
||||
//判断是否为最顶层的路由
|
||||
if (0 == m.ParentId)
|
||||
{
|
||||
r.Component = "Layout";
|
||||
}
|
||||
else
|
||||
{
|
||||
r.Component = "ParentView";
|
||||
}
|
||||
}
|
||||
if (m.MenuType == MenuTypeEnum.Menu.GetHashCode())
|
||||
{
|
||||
|
||||
r.Redirect = "noRedirect";
|
||||
r.AlwaysShow = true;
|
||||
r.Component = m.Component;
|
||||
r.AlwaysShow = false;
|
||||
}
|
||||
r.Meta = new Meta
|
||||
{
|
||||
Title = m.MenuName,
|
||||
Icon = m.MenuIcon,
|
||||
NoCache = !m.IsCache??true
|
||||
};
|
||||
if (m.IsLink??false)
|
||||
{
|
||||
r.Meta.link = m.Router;
|
||||
r.AlwaysShow = false;
|
||||
}
|
||||
|
||||
routers.Add(r);
|
||||
}
|
||||
return Common.Helper.TreeHelper.SetTree(routers);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 文章表
|
||||
///</summary>
|
||||
[SugarTable("Article")]
|
||||
public partial class ArticleEntity:IBaseModelEntity
|
||||
{
|
||||
public ArticleEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
this.AgreeNum = 0;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 文章标题
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Title" )]
|
||||
public string? Title { get; set; }
|
||||
/// <summary>
|
||||
/// 文章内容
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Content" )]
|
||||
public string? Content { get; set; }
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="UserId" )]
|
||||
public long? UserId { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 图片列表
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Images", IsJson = true)]
|
||||
public List<string>? Images { get; set; }
|
||||
/// <summary>
|
||||
/// 点赞数量
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="AgreeNum" )]
|
||||
public int AgreeNum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品分类表
|
||||
///</summary>
|
||||
[SugarTable("Category")]
|
||||
public partial class CategoryEntity:IBaseModelEntity
|
||||
{
|
||||
public CategoryEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 父级id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ParentId" )]
|
||||
public long? ParentId { get; set; }
|
||||
/// <summary>
|
||||
/// 分类名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CategoryName" )]
|
||||
public string CategoryName { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 评论表
|
||||
///</summary>
|
||||
[SugarTable("Comment")]
|
||||
public partial class CommentEntity:IBaseModelEntity
|
||||
{
|
||||
public CommentEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
this.AgreeNum= 0;
|
||||
this.CommentNum = 0;
|
||||
this.ParentId= 0;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 文章id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ArticleId" )]
|
||||
public long? ArticleId { get; set; }
|
||||
/// <summary>
|
||||
/// 被回复用户id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="UserId" )]
|
||||
public long? UserId { get; set; }
|
||||
/// <summary>
|
||||
/// 评论内容
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Content" )]
|
||||
public string? Content { get; set; }
|
||||
/// <summary>
|
||||
/// 点赞数
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="AgreeNum" )]
|
||||
public int? AgreeNum { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 子评论数
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CommentNum" )]
|
||||
public int? CommentNum { get; set; }
|
||||
/// <summary>
|
||||
/// 父级评论id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ParentId" )]
|
||||
public long? ParentId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置表
|
||||
///</summary>
|
||||
[SugarTable("Config")]
|
||||
public partial class ConfigEntity:IBaseModelEntity
|
||||
{
|
||||
public ConfigEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 配置名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ConfigName" )]
|
||||
public string? ConfigName { get; set; }
|
||||
/// <summary>
|
||||
/// 配置键
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ConfigKey" )]
|
||||
public string? ConfigKey { get; set; }
|
||||
/// <summary>
|
||||
/// 配置值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ConfigValue" )]
|
||||
public string? ConfigValue { get; set; }
|
||||
/// <summary>
|
||||
/// 配置类别
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ConfigType" )]
|
||||
public string? ConfigType { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 部门表
|
||||
///</summary>
|
||||
[SugarTable("Dept")]
|
||||
public partial class DeptEntity:IBaseModelEntity
|
||||
{
|
||||
public DeptEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 部门名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DeptName" )]
|
||||
public string? DeptName { get; set; }
|
||||
/// <summary>
|
||||
/// 部门编码
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DeptCode" )]
|
||||
public string? DeptCode { get; set; }
|
||||
/// <summary>
|
||||
/// 负责人
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Leader" )]
|
||||
public string? Leader { get; set; }
|
||||
/// <summary>
|
||||
/// 父级id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ParentId" )]
|
||||
public long? ParentId { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 字典表
|
||||
///</summary>
|
||||
[SugarTable("Dictionary")]
|
||||
public partial class DictionaryEntity:IBaseModelEntity
|
||||
{
|
||||
public DictionaryEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 字典名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DictName" )]
|
||||
public string? DictName { get; set; }
|
||||
/// <summary>
|
||||
/// 字典类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DictType" )]
|
||||
public string? DictType { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 字典信息表
|
||||
///</summary>
|
||||
[SugarTable("DictionaryInfo")]
|
||||
public partial class DictionaryInfoEntity:IBaseModelEntity
|
||||
{
|
||||
public DictionaryInfoEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 字典类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DictType" )]
|
||||
public string? DictType { get; set; }
|
||||
/// <summary>
|
||||
/// 字典标签
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DictLabel" )]
|
||||
public string? DictLabel { get; set; }
|
||||
/// <summary>
|
||||
/// 字典值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DictValue" )]
|
||||
public string? DictValue { get; set; }
|
||||
/// <summary>
|
||||
/// 是否为该类型的默认值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="IsDefault" )]
|
||||
public bool? IsDefault { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// tag类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ListClass" )]
|
||||
public string? ListClass { get; set; }
|
||||
/// <summary>
|
||||
/// tagClass
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CssClass" )]
|
||||
public string? CssClass { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件表
|
||||
///</summary>
|
||||
[SugarTable("File")]
|
||||
public partial class FileEntity:IBaseModelEntity
|
||||
{
|
||||
public FileEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="FileType" )]
|
||||
public string? FileType { get; set; }
|
||||
/// <summary>
|
||||
/// 文件大小
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="FileSize" )]
|
||||
public decimal? FileSize { get; set; }
|
||||
/// <summary>
|
||||
/// 文件名
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="FileName" )]
|
||||
public string? FileName { get; set; }
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="FilePath" )]
|
||||
public string? FilePath { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public partial class LogEntity:IBaseModelEntity
|
||||
{
|
||||
public LogEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 创建者
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CreateUser" )]
|
||||
public long? CreateUser { 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; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 登入日志
|
||||
///</summary>
|
||||
[SugarTable("LoginLog")]
|
||||
public partial class LoginLogEntity:IBaseModelEntity
|
||||
{
|
||||
public LoginLogEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 登录用户
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="LoginUser" )]
|
||||
public string? LoginUser { get; set; }
|
||||
/// <summary>
|
||||
/// 登录地点
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="LoginLocation" )]
|
||||
public string? LoginLocation { get; set; }
|
||||
/// <summary>
|
||||
/// 登录Ip
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="LoginIp" )]
|
||||
public string? LoginIp { get; set; }
|
||||
/// <summary>
|
||||
/// 浏览器
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Browser" )]
|
||||
public string? Browser { get; set; }
|
||||
/// <summary>
|
||||
/// 操作系统
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Os" )]
|
||||
public string? Os { get; set; }
|
||||
/// <summary>
|
||||
/// 登录信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="LogMsg" )]
|
||||
public string? LogMsg { 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>
|
||||
/// 租户Id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="TenantId" )]
|
||||
public long? TenantId { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="IsDeleted" )]
|
||||
public bool? IsDeleted { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 菜单表
|
||||
///</summary>
|
||||
[SugarTable("Menu")]
|
||||
public partial class MenuEntity:IBaseModelEntity
|
||||
{
|
||||
public MenuEntity()
|
||||
{
|
||||
this.IsCache = false;
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="MenuName" )]
|
||||
public string? MenuName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="MenuType" )]
|
||||
public int? MenuType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="PermissionCode" )]
|
||||
public string? PermissionCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="ParentId" )]
|
||||
public long? ParentId { 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="MenuIcon" )]
|
||||
public string? MenuIcon { get; set; }
|
||||
/// <summary>
|
||||
/// 菜单组件路由
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Router" )]
|
||||
public string? Router { get; set; }
|
||||
/// <summary>
|
||||
/// 是否为外部链接
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="IsLink" )]
|
||||
public bool? IsLink { get; set; }
|
||||
/// <summary>
|
||||
/// 是否缓存
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="IsCache" )]
|
||||
public bool? IsCache { get; set; }
|
||||
/// <summary>
|
||||
/// 是否显示
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="IsShow" )]
|
||||
public bool? IsShow { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 组件路径
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Component" )]
|
||||
public string? Component { get; set; }
|
||||
/// <summary>
|
||||
/// 路由参数
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Query" )]
|
||||
public string? Query { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 操作日志表
|
||||
///</summary>
|
||||
[SugarTable("OperationLog")]
|
||||
public partial class OperationLogEntity:IBaseModelEntity
|
||||
{
|
||||
public OperationLogEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 操作模块
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Title" )]
|
||||
public string? Title { get; set; }
|
||||
/// <summary>
|
||||
/// 操作类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OperType" )]
|
||||
public int? OperType { get; set; }
|
||||
/// <summary>
|
||||
/// 请求方法
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="RequestMethod" )]
|
||||
public string? RequestMethod { get; set; }
|
||||
/// <summary>
|
||||
/// 操作人员
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OperUser" )]
|
||||
public string? OperUser { get; set; }
|
||||
/// <summary>
|
||||
/// 操作Ip
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OperIp" )]
|
||||
public string? OperIp { get; set; }
|
||||
/// <summary>
|
||||
/// 操作地点
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OperLocation" )]
|
||||
public string? OperLocation { get; set; }
|
||||
/// <summary>
|
||||
/// 操作方法
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Method" )]
|
||||
public string? Method { get; set; }
|
||||
/// <summary>
|
||||
/// 请求参数
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="RequestParam" )]
|
||||
public string? RequestParam { get; set; }
|
||||
/// <summary>
|
||||
/// 请求结果
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="RequestResult" )]
|
||||
public string? RequestResult { 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>
|
||||
/// 租户Id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="TenantId" )]
|
||||
public long? TenantId { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="IsDeleted" )]
|
||||
public bool? IsDeleted { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位表
|
||||
///</summary>
|
||||
[SugarTable("Post")]
|
||||
public partial class PostEntity:IBaseModelEntity
|
||||
{
|
||||
public PostEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 岗位编码
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="PostCode" )]
|
||||
public string? PostCode { get; set; }
|
||||
/// <summary>
|
||||
/// 岗位名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="PostName" )]
|
||||
public string? PostName { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色部门关系表
|
||||
///</summary>
|
||||
[SugarTable("RoleDept")]
|
||||
public partial class RoleDeptEntity:IBaseModelEntity
|
||||
{
|
||||
public RoleDeptEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 角色id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="RoleId" )]
|
||||
public long? RoleId { get; set; }
|
||||
/// <summary>
|
||||
/// 部门id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DeptId" )]
|
||||
public long? DeptId { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色表
|
||||
///</summary>
|
||||
[SugarTable("Role")]
|
||||
public partial class RoleEntity : IBaseModelEntity
|
||||
{
|
||||
public RoleEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "RoleName")]
|
||||
public string? RoleName { 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="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="ModifyUser" )]
|
||||
public long? ModifyUser { get; set; }
|
||||
/// <summary>
|
||||
/// 角色编码
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="RoleCode" )]
|
||||
public string? RoleCode { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 角色数据范围
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DataScope" )]
|
||||
public int? DataScope { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色菜单关系表
|
||||
///</summary>
|
||||
[SugarTable("RoleMenu")]
|
||||
public partial class RoleMenuEntity:IBaseModelEntity
|
||||
{
|
||||
public RoleMenuEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="RoleId" )]
|
||||
public long? RoleId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="MenuId" )]
|
||||
public long? MenuId { 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; }
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Sku表
|
||||
///</summary>
|
||||
[SugarTable("Sku")]
|
||||
public partial class SkuEntity:IBaseModelEntity
|
||||
{
|
||||
public SkuEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// SpuId
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="SpuId" )]
|
||||
public long? SpuId { get; set; }
|
||||
/// <summary>
|
||||
/// 库存
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Stock" )]
|
||||
public int? Stock { get; set; }
|
||||
/// <summary>
|
||||
/// 价格
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Price" )]
|
||||
public int? Price { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品规格表
|
||||
///</summary>
|
||||
[SugarTable("Specs")]
|
||||
public partial class SpecsEntity:IBaseModelEntity
|
||||
{
|
||||
public SpecsEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 商品规格组id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="SpecsGroupId" )]
|
||||
public long? SpecsGroupId { get; set; }
|
||||
/// <summary>
|
||||
/// 商品规格名
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="SpecsName" )]
|
||||
public string SpecsName { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品规格组表
|
||||
///</summary>
|
||||
[SugarTable("SpecsGroup")]
|
||||
public partial class SpecsGroupEntity:IBaseModelEntity
|
||||
{
|
||||
public SpecsGroupEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 分类id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CategoryId" )]
|
||||
public long? CategoryId { get; set; }
|
||||
/// <summary>
|
||||
/// 商品规格组名
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="SpecsGroupName" )]
|
||||
public string SpecsGroupName { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Spu表
|
||||
///</summary>
|
||||
[SugarTable("Spu")]
|
||||
public partial class SpuEntity:IBaseModelEntity
|
||||
{
|
||||
public SpuEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 商品分类Id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="CategoryId" )]
|
||||
public long? CategoryId { get; set; }
|
||||
/// <summary>
|
||||
/// 商品名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="SpuName" )]
|
||||
public string? SpuName { get; set; }
|
||||
/// <summary>
|
||||
/// 商品详情
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Details" )]
|
||||
public string? Details { get; set; }
|
||||
/// <summary>
|
||||
/// 商品价格
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Price" )]
|
||||
public string? Price { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 租户表
|
||||
///</summary>
|
||||
[SugarTable("Tenant")]
|
||||
public partial class TenantEntity:IBaseModelEntity
|
||||
{
|
||||
public TenantEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="TenantName" )]
|
||||
public string? TenantName { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,132 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户表
|
||||
///</summary>
|
||||
[SugarTable("User")]
|
||||
public partial class UserEntity:IBaseModelEntity
|
||||
{
|
||||
public UserEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Name" )]
|
||||
public string? Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Age" )]
|
||||
public int? Age { 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>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="TenantId" )]
|
||||
public long? TenantId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="UserName" )]
|
||||
public string? UserName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Password" )]
|
||||
public string? Password { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Salt" )]
|
||||
public string? Salt { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Icon" )]
|
||||
public string? Icon { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Nick" )]
|
||||
public string? Nick { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Email" )]
|
||||
public string? Email { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Ip" )]
|
||||
public string? Ip { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Address" )]
|
||||
public string? Address { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Phone" )]
|
||||
public string? Phone { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Introduction" )]
|
||||
public string? Introduction { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 部门id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="DeptId" )]
|
||||
public long? DeptId { get; set; }
|
||||
/// <summary>
|
||||
/// 性别
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Sex" )]
|
||||
public int? Sex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户岗位表
|
||||
///</summary>
|
||||
[SugarTable("UserPost")]
|
||||
public partial class UserPostEntity:IBaseModelEntity
|
||||
{
|
||||
public UserPostEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 用户id s
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="UserId" )]
|
||||
public long? UserId { get; set; }
|
||||
/// <summary>
|
||||
/// 岗位id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName= "PostId")]
|
||||
public long? PostId { 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="OrderNum" )]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Remark" )]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户角色关系表
|
||||
///</summary>
|
||||
[SugarTable("UserRole")]
|
||||
public partial class UserRoleEntity:IBaseModelEntity
|
||||
{
|
||||
public UserRoleEntity()
|
||||
{
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="RoleId" )]
|
||||
public long? RoleId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="UserId" )]
|
||||
public long? UserId { 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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置表
|
||||
///</summary>
|
||||
[SugarTable("Config")]
|
||||
public partial class ConfigEntity : IBaseModelEntity
|
||||
{
|
||||
public ConfigEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 配置名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ConfigName")]
|
||||
public string? ConfigName { get; set; }
|
||||
/// <summary>
|
||||
/// 配置键
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ConfigKey")]
|
||||
public string? ConfigKey { get; set; }
|
||||
/// <summary>
|
||||
/// 配置值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ConfigValue")]
|
||||
public string? ConfigValue { get; set; }
|
||||
/// <summary>
|
||||
/// 配置类别
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ConfigType")]
|
||||
public string? ConfigType { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 部门表
|
||||
///</summary>
|
||||
[SugarTable("Dept")]
|
||||
public partial class DeptEntity : IBaseModelEntity
|
||||
{
|
||||
public DeptEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 部门名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DeptName")]
|
||||
public string? DeptName { get; set; }
|
||||
/// <summary>
|
||||
/// 部门编码
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DeptCode")]
|
||||
public string? DeptCode { get; set; }
|
||||
/// <summary>
|
||||
/// 负责人
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Leader")]
|
||||
public string? Leader { get; set; }
|
||||
/// <summary>
|
||||
/// 父级id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ParentId")]
|
||||
public long? ParentId { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 字典表
|
||||
///</summary>
|
||||
[SugarTable("Dictionary")]
|
||||
public partial class DictionaryEntity : IBaseModelEntity
|
||||
{
|
||||
public DictionaryEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 字典名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictName")]
|
||||
public string? DictName { get; set; }
|
||||
/// <summary>
|
||||
/// 字典类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictType")]
|
||||
public string? DictType { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 字典信息表
|
||||
///</summary>
|
||||
[SugarTable("DictionaryInfo")]
|
||||
public partial class DictionaryInfoEntity : IBaseModelEntity
|
||||
{
|
||||
public DictionaryInfoEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 字典类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictType")]
|
||||
public string? DictType { get; set; }
|
||||
/// <summary>
|
||||
/// 字典标签
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictLabel")]
|
||||
public string? DictLabel { get; set; }
|
||||
/// <summary>
|
||||
/// 字典值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictValue")]
|
||||
public string? DictValue { get; set; }
|
||||
/// <summary>
|
||||
/// 是否为该类型的默认值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "IsDefault")]
|
||||
public bool? IsDefault { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// tag类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ListClass")]
|
||||
public string? ListClass { get; set; }
|
||||
/// <summary>
|
||||
/// tagClass
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CssClass")]
|
||||
public string? CssClass { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件表
|
||||
///</summary>
|
||||
[SugarTable("File")]
|
||||
public partial class FileEntity : IBaseModelEntity
|
||||
{
|
||||
public FileEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "FileType")]
|
||||
public string? FileType { get; set; }
|
||||
/// <summary>
|
||||
/// 文件大小
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "FileSize")]
|
||||
public decimal? FileSize { get; set; }
|
||||
/// <summary>
|
||||
/// 文件名
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "FileName")]
|
||||
public string? FileName { get; set; }
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "FilePath")]
|
||||
public string? FilePath { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
[SplitTable(SplitType.Year)]
|
||||
[SugarTable("SplitLog_{year}{month}{day}")]
|
||||
public partial class LogEntity : IBaseModelEntity
|
||||
{
|
||||
public LogEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 创建者
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CreateUser")]
|
||||
public long? CreateUser { 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; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
[SplitField] //分表字段 在插入的时候会根据这个字段插入哪个表,在更新删除的时候用这个字段找出相关表
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CreateTime")]
|
||||
public DateTime? CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 登入日志
|
||||
///</summary>
|
||||
[SugarTable("LoginLog")]
|
||||
public partial class LoginLogEntity : IBaseModelEntity
|
||||
{
|
||||
public LoginLogEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 登录用户
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "LoginUser")]
|
||||
public string? LoginUser { get; set; }
|
||||
/// <summary>
|
||||
/// 登录地点
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "LoginLocation")]
|
||||
public string? LoginLocation { get; set; }
|
||||
/// <summary>
|
||||
/// 登录Ip
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "LoginIp")]
|
||||
public string? LoginIp { get; set; }
|
||||
/// <summary>
|
||||
/// 浏览器
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Browser")]
|
||||
public string? Browser { get; set; }
|
||||
/// <summary>
|
||||
/// 操作系统
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Os")]
|
||||
public string? Os { get; set; }
|
||||
/// <summary>
|
||||
/// 登录信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "LogMsg")]
|
||||
public string? LogMsg { 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>
|
||||
/// 租户Id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "TenantId")]
|
||||
public long? TenantId { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "IsDeleted")]
|
||||
public bool? IsDeleted { get; set; }
|
||||
}
|
||||
}
|
||||
185
Yi.Framework.Net6/Yi.Framework.Model/RABC/Entitys/MenuEntity.cs
Normal file
185
Yi.Framework.Net6/Yi.Framework.Model/RABC/Entitys/MenuEntity.cs
Normal file
@@ -0,0 +1,185 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 菜单表
|
||||
///</summary>
|
||||
[SugarTable("Menu")]
|
||||
public partial class MenuEntity : IBaseModelEntity
|
||||
{
|
||||
public MenuEntity()
|
||||
{
|
||||
IsCache = false;
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "MenuName")]
|
||||
public string? MenuName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "MenuType")]
|
||||
public int? MenuType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "PermissionCode")]
|
||||
public string? PermissionCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ParentId")]
|
||||
public long? ParentId { 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 = "MenuIcon")]
|
||||
public string? MenuIcon { get; set; }
|
||||
/// <summary>
|
||||
/// 菜单组件路由
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Router")]
|
||||
public string? Router { get; set; }
|
||||
/// <summary>
|
||||
/// 是否为外部链接
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "IsLink")]
|
||||
public bool? IsLink { get; set; }
|
||||
/// <summary>
|
||||
/// 是否缓存
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "IsCache")]
|
||||
public bool? IsCache { get; set; }
|
||||
/// <summary>
|
||||
/// 是否显示
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "IsShow")]
|
||||
public bool? IsShow { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 组件路径
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Component")]
|
||||
public string? Component { get; set; }
|
||||
/// <summary>
|
||||
/// 路由参数
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Query")]
|
||||
public string? Query { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<MenuEntity>? Children { get; set; }
|
||||
|
||||
|
||||
public static List<VueRouterModel> RouterBuild(List<MenuEntity> menus)
|
||||
{
|
||||
menus = menus.Where(m => m.MenuType != null && m.MenuType != MenuTypeEnum.Component.GetHashCode()).ToList();
|
||||
List<VueRouterModel> routers = new();
|
||||
foreach (var m in menus)
|
||||
{
|
||||
|
||||
var r = new VueRouterModel();
|
||||
r.OrderNum = m.OrderNum ?? 0;
|
||||
var routerName = m.Router?.Split("/").LastOrDefault();
|
||||
r.Id = m.Id;
|
||||
r.ParentId = m.ParentId ?? -1;
|
||||
|
||||
//开头大写
|
||||
r.Name = routerName?.First().ToString().ToUpper() + routerName?.Substring(1);
|
||||
r.Path = m.Router;
|
||||
r.Hidden = !m.IsShow ?? false;
|
||||
|
||||
|
||||
if (m.MenuType == MenuTypeEnum.Catalogue.GetHashCode())
|
||||
{
|
||||
r.Redirect = "noRedirect";
|
||||
r.AlwaysShow = true;
|
||||
|
||||
//判断是否为最顶层的路由
|
||||
if (0 == m.ParentId)
|
||||
{
|
||||
r.Component = "Layout";
|
||||
}
|
||||
else
|
||||
{
|
||||
r.Component = "ParentView";
|
||||
}
|
||||
}
|
||||
if (m.MenuType == MenuTypeEnum.Menu.GetHashCode())
|
||||
{
|
||||
|
||||
r.Redirect = "noRedirect";
|
||||
r.AlwaysShow = true;
|
||||
r.Component = m.Component;
|
||||
r.AlwaysShow = false;
|
||||
}
|
||||
r.Meta = new Meta
|
||||
{
|
||||
Title = m.MenuName,
|
||||
Icon = m.MenuIcon,
|
||||
NoCache = !m.IsCache ?? true
|
||||
};
|
||||
if (m.IsLink ?? false)
|
||||
{
|
||||
r.Meta.link = m.Router;
|
||||
r.AlwaysShow = false;
|
||||
}
|
||||
|
||||
routers.Add(r);
|
||||
}
|
||||
return Common.Helper.TreeHelper.SetTree(routers);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 操作日志表
|
||||
///</summary>
|
||||
[SugarTable("OperationLog")]
|
||||
public partial class OperationLogEntity : IBaseModelEntity
|
||||
{
|
||||
public OperationLogEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 操作模块
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Title")]
|
||||
public string? Title { get; set; }
|
||||
/// <summary>
|
||||
/// 操作类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OperType")]
|
||||
public int? OperType { get; set; }
|
||||
/// <summary>
|
||||
/// 请求方法
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "RequestMethod")]
|
||||
public string? RequestMethod { get; set; }
|
||||
/// <summary>
|
||||
/// 操作人员
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OperUser")]
|
||||
public string? OperUser { get; set; }
|
||||
/// <summary>
|
||||
/// 操作Ip
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OperIp")]
|
||||
public string? OperIp { get; set; }
|
||||
/// <summary>
|
||||
/// 操作地点
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OperLocation")]
|
||||
public string? OperLocation { get; set; }
|
||||
/// <summary>
|
||||
/// 操作方法
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Method")]
|
||||
public string? Method { get; set; }
|
||||
/// <summary>
|
||||
/// 请求参数
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "RequestParam")]
|
||||
public string? RequestParam { get; set; }
|
||||
/// <summary>
|
||||
/// 请求结果
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "RequestResult")]
|
||||
public string? RequestResult { 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>
|
||||
/// 租户Id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "TenantId")]
|
||||
public long? TenantId { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "IsDeleted")]
|
||||
public bool? IsDeleted { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位表
|
||||
///</summary>
|
||||
[SugarTable("Post")]
|
||||
public partial class PostEntity : IBaseModelEntity
|
||||
{
|
||||
public PostEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 岗位编码
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "PostCode")]
|
||||
public string? PostCode { get; set; }
|
||||
/// <summary>
|
||||
/// 岗位名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "PostName")]
|
||||
public string? PostName { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色部门关系表
|
||||
///</summary>
|
||||
[SugarTable("RoleDept")]
|
||||
public partial class RoleDeptEntity : IBaseModelEntity
|
||||
{
|
||||
public RoleDeptEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 角色id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "RoleId")]
|
||||
public long? RoleId { get; set; }
|
||||
/// <summary>
|
||||
/// 部门id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DeptId")]
|
||||
public long? DeptId { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色表
|
||||
///</summary>
|
||||
[SugarTable("Role")]
|
||||
public partial class RoleEntity : IBaseModelEntity
|
||||
{
|
||||
public RoleEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "RoleName")]
|
||||
public string? RoleName { 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 = "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 = "ModifyUser")]
|
||||
public long? ModifyUser { get; set; }
|
||||
/// <summary>
|
||||
/// 角色编码
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "RoleCode")]
|
||||
public string? RoleCode { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 角色数据范围
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DataScope")]
|
||||
public int? DataScope { get; set; }
|
||||
|
||||
|
||||
[Navigate(typeof(RoleMenuEntity), nameof(RoleMenuEntity.RoleId), nameof(RoleMenuEntity.MenuId))]
|
||||
public List<MenuEntity>? Menus { get; set; }
|
||||
|
||||
[Navigate(typeof(RoleDeptEntity), nameof(RoleDeptEntity.RoleId), nameof(RoleDeptEntity.DeptId))]
|
||||
public List<DeptEntity>? Depts { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色菜单关系表
|
||||
///</summary>
|
||||
[SugarTable("RoleMenu")]
|
||||
public partial class RoleMenuEntity : IBaseModelEntity
|
||||
{
|
||||
public RoleMenuEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "RoleId")]
|
||||
public long? RoleId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "MenuId")]
|
||||
public long? MenuId { 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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 租户表
|
||||
///</summary>
|
||||
[SugarTable("Tenant")]
|
||||
public partial class TenantEntity : IBaseModelEntity
|
||||
{
|
||||
public TenantEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "TenantName")]
|
||||
public string? TenantName { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
// //需要在用户表中关联好该租户信息,一个用户关联一个租户
|
||||
// //不同租户下,用户可以相同
|
||||
// //用户登录后,token中可包含租户id,同时缓存一份用户信息(包含租户信息)
|
||||
// [Tenant("0")]
|
||||
// //当然,像用户、角色、菜单、租户为共享库了
|
||||
// [SugarTable("Tenant")]
|
||||
// public class TenantEntity
|
||||
// {
|
||||
// /// <summary>
|
||||
// /// 主键唯一标识
|
||||
// /// </summary>
|
||||
// [SugarColumn(IsPrimaryKey = true)]
|
||||
// public long Id { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 租户id
|
||||
// /// </summary>
|
||||
// public string? TenantId { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 业务库连接字符串
|
||||
// /// </summary>
|
||||
// public string? Connection { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 业务库连接类型
|
||||
// /// </summary>
|
||||
// public string? DbType { get; set; }
|
||||
}
|
||||
}
|
||||
176
Yi.Framework.Net6/Yi.Framework.Model/RABC/Entitys/UserEntity.cs
Normal file
176
Yi.Framework.Net6/Yi.Framework.Model/RABC/Entitys/UserEntity.cs
Normal file
@@ -0,0 +1,176 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Common.Helper;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户表
|
||||
///</summary>
|
||||
[SugarTable("User")]
|
||||
public partial class UserEntity : IBaseModelEntity
|
||||
{
|
||||
public UserEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Name")]
|
||||
public string? Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Age")]
|
||||
public int? Age { 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>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "TenantId")]
|
||||
public long? TenantId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UserName")]
|
||||
public string? UserName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Password")]
|
||||
public string? Password { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Salt")]
|
||||
public string? Salt { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Icon")]
|
||||
public string? Icon { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Nick")]
|
||||
public string? Nick { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Email")]
|
||||
public string? Email { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Ip")]
|
||||
public string? Ip { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Address")]
|
||||
public string? Address { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Phone")]
|
||||
public string? Phone { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Introduction")]
|
||||
public string? Introduction { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 部门id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DeptId")]
|
||||
public long? DeptId { get; set; }
|
||||
/// <summary>
|
||||
/// 性别
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Sex")]
|
||||
public int? Sex { get; set; }
|
||||
/// <summary>
|
||||
/// 看好啦!ORM精髓,导航属性
|
||||
///</summary>
|
||||
[Navigate(typeof(UserRoleEntity), nameof(UserRoleEntity.UserId), nameof(UserRoleEntity.RoleId))]
|
||||
public List<RoleEntity>? Roles { get; set; }
|
||||
|
||||
[Navigate(typeof(UserPostEntity), nameof(UserPostEntity.UserId), nameof(UserPostEntity.PostId))]
|
||||
public List<PostEntity>? Posts { get; set; }
|
||||
|
||||
[Navigate(NavigateType.OneToOne, nameof(DeptId))]
|
||||
public DeptEntity? Dept { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 构建密码,MD5盐值加密
|
||||
/// </summary>
|
||||
public UserEntity BuildPassword(string password = null)
|
||||
{
|
||||
//如果不传值,那就把自己的password当作传进来的password
|
||||
if (password == null)
|
||||
{
|
||||
password = Password;
|
||||
}
|
||||
Salt = MD5Helper.GenerateSalt();
|
||||
Password = MD5Helper.SHA2Encode(password, Salt);
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断密码和加密后的密码是否相同
|
||||
/// </summary>
|
||||
/// <param name="password"></param>
|
||||
/// <returns></returns>
|
||||
public bool JudgePassword(string password)
|
||||
{
|
||||
var p = MD5Helper.SHA2Encode(password, Salt);
|
||||
if (Password == MD5Helper.SHA2Encode(password, Salt))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户岗位表
|
||||
///</summary>
|
||||
[SugarTable("UserPost")]
|
||||
public partial class UserPostEntity : IBaseModelEntity
|
||||
{
|
||||
public UserPostEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 用户id s
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UserId")]
|
||||
public long? UserId { get; set; }
|
||||
/// <summary>
|
||||
/// 岗位id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "PostId")]
|
||||
public long? PostId { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.RABC.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户角色关系表
|
||||
///</summary>
|
||||
[SugarTable("UserRole")]
|
||||
public partial class UserRoleEntity : IBaseModelEntity
|
||||
{
|
||||
public UserRoleEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "RoleId")]
|
||||
public long? RoleId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "UserId")]
|
||||
public long? UserId { 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; }
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public abstract class AbstractSeed<T>
|
||||
{
|
||||
@@ -5,25 +5,25 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public class DeptSeed : AbstractSeed<DeptEntity>
|
||||
public class DeptSeed : AbstractSeed<DeptEntity>
|
||||
{
|
||||
public override List<DeptEntity> GetSeed()
|
||||
{
|
||||
|
||||
|
||||
DeptEntity chengziDept = new DeptEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DeptName = "橙子科技",
|
||||
DeptCode="Yi",
|
||||
OrderNum =100,
|
||||
DeptCode = "Yi",
|
||||
OrderNum = 100,
|
||||
IsDeleted = false,
|
||||
ParentId=0,
|
||||
Leader="橙子",
|
||||
Remark="如名所指"
|
||||
ParentId = 0,
|
||||
Leader = "橙子",
|
||||
Remark = "如名所指"
|
||||
};
|
||||
Entitys.Add(chengziDept);
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Yi.Framework.Model.SeedData
|
||||
DeptName = "深圳总公司",
|
||||
OrderNum = 100,
|
||||
IsDeleted = false,
|
||||
ParentId=chengziDept.Id
|
||||
ParentId = chengziDept.Id
|
||||
};
|
||||
Entitys.Add(shenzhenDept);
|
||||
|
||||
@@ -4,9 +4,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public class DictionaryInfoSeed : AbstractSeed<DictionaryInfoEntity>
|
||||
{
|
||||
@@ -16,7 +16,7 @@ namespace Yi.Framework.Model.SeedData
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "男",
|
||||
DictValue= "0",
|
||||
DictValue = "0",
|
||||
DictType = "sys_user_sex",
|
||||
OrderNum = 100,
|
||||
Remark = "性别男",
|
||||
@@ -76,7 +76,7 @@ namespace Yi.Framework.Model.SeedData
|
||||
|
||||
|
||||
|
||||
DictionaryInfoEntity dictInfo6= new DictionaryInfoEntity()
|
||||
DictionaryInfoEntity dictInfo6 = new DictionaryInfoEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "正常",
|
||||
@@ -96,7 +96,7 @@ namespace Yi.Framework.Model.SeedData
|
||||
OrderNum = 99,
|
||||
Remark = "停用状态",
|
||||
IsDeleted = false,
|
||||
ListClass= "danger"
|
||||
ListClass = "danger"
|
||||
};
|
||||
Entitys.Add(dictInfo7);
|
||||
|
||||
@@ -4,9 +4,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public class DictionarySeed : AbstractSeed<DictionaryEntity>
|
||||
{
|
||||
@@ -4,9 +4,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public class FileSeed : AbstractSeed<FileEntity>
|
||||
{
|
||||
@@ -5,9 +5,9 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public class MenuSeed : AbstractSeed<MenuEntity>
|
||||
{
|
||||
@@ -404,7 +404,7 @@ namespace Yi.Framework.Model.SeedData
|
||||
IsDeleted = false
|
||||
};
|
||||
Entitys.Add(menuRemove);
|
||||
|
||||
|
||||
//部门管理
|
||||
MenuEntity dept = new MenuEntity()
|
||||
{
|
||||
@@ -5,11 +5,11 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public class PostSeed : AbstractSeed<PostEntity>
|
||||
public class PostSeed : AbstractSeed<PostEntity>
|
||||
{
|
||||
public override List<PostEntity> GetSeed()
|
||||
{
|
||||
@@ -18,7 +18,7 @@ namespace Yi.Framework.Model.SeedData
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
PostName = "董事长",
|
||||
PostCode = "ceo",
|
||||
OrderNum =100,
|
||||
OrderNum = 100,
|
||||
IsDeleted = false
|
||||
};
|
||||
Entitys.Add(Post1);
|
||||
@@ -5,11 +5,11 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public class RoleSeed : AbstractSeed<RoleEntity>
|
||||
public class RoleSeed : AbstractSeed<RoleEntity>
|
||||
{
|
||||
public override List<RoleEntity> GetSeed()
|
||||
{
|
||||
@@ -20,7 +20,7 @@ namespace Yi.Framework.Model.SeedData
|
||||
RoleCode = "admin",
|
||||
DataScope = DataScopeEnum.ALL.GetHashCode(),
|
||||
OrderNum = 999,
|
||||
Remark ="管理员",
|
||||
Remark = "管理员",
|
||||
IsDeleted = false
|
||||
};
|
||||
Entitys.Add(role1);
|
||||
@@ -4,9 +4,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public class SeedFactory
|
||||
{
|
||||
@@ -52,7 +52,7 @@ namespace Yi.Framework.Model.SeedData
|
||||
{
|
||||
foreach (var r in roles)
|
||||
{
|
||||
userRoleEntities.Add(new UserRoleEntity() {Id= SnowFlakeSingle.Instance.NextId(),UserId = u.Id, RoleId = r.Id, IsDeleted = false });
|
||||
userRoleEntities.Add(new UserRoleEntity() { Id = SnowFlakeSingle.Instance.NextId(), UserId = u.Id, RoleId = r.Id, IsDeleted = false });
|
||||
}
|
||||
}
|
||||
return userRoleEntities;
|
||||
@@ -4,9 +4,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Model.Models;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.Model.SeedData
|
||||
namespace Yi.Framework.Model.RABC.SeedData
|
||||
{
|
||||
public class UserSeed : AbstractSeed<UserEntity>
|
||||
{
|
||||
@@ -14,20 +14,20 @@ namespace Yi.Framework.Model.SeedData
|
||||
{
|
||||
UserEntity user1 = new UserEntity()
|
||||
{
|
||||
Id =SnowFlakeSingle.Instance.NextId(),
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
Name = "大橙子",
|
||||
UserName = "cc",
|
||||
Nick = "橙子",
|
||||
Password = "123456",
|
||||
Email="454313500@qq.com",
|
||||
Phone="13800000000",
|
||||
Sex=0,
|
||||
Address="深圳",
|
||||
Age=20,
|
||||
Introduction="还有谁?",
|
||||
OrderNum=999,
|
||||
Remark="描述是什么呢?",
|
||||
IsDeleted=false
|
||||
Email = "454313500@qq.com",
|
||||
Phone = "13800000000",
|
||||
Sex = 0,
|
||||
Address = "深圳",
|
||||
Age = 20,
|
||||
Introduction = "还有谁?",
|
||||
OrderNum = 999,
|
||||
Remark = "描述是什么呢?",
|
||||
IsDeleted = false
|
||||
};
|
||||
user1.BuildPassword();
|
||||
Entitys.Add(user1);
|
||||
@@ -39,7 +39,7 @@ namespace Yi.Framework.Model.SeedData
|
||||
UserName = "test",
|
||||
Nick = "测试",
|
||||
Password = "123456",
|
||||
Email = "454313500@qq.com",
|
||||
Email = "454313500@qq.com",
|
||||
Phone = "15900000000",
|
||||
Sex = 0,
|
||||
Address = "深圳",
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
|
||||
public partial class RoleEntity
|
||||
{
|
||||
|
||||
[Navigate(typeof(RoleMenuEntity),nameof(RoleMenuEntity.RoleId),nameof(RoleMenuEntity.MenuId))]
|
||||
public List<MenuEntity>? Menus { get; set; }
|
||||
|
||||
[Navigate(typeof(RoleDeptEntity), nameof(RoleDeptEntity.RoleId), nameof(RoleDeptEntity.DeptId))]
|
||||
public List<DeptEntity>? Depts { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.SHOP.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品分类表
|
||||
///</summary>
|
||||
[SugarTable("Category")]
|
||||
public partial class CategoryEntity : IBaseModelEntity
|
||||
{
|
||||
public CategoryEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 父级id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ParentId")]
|
||||
public long? ParentId { get; set; }
|
||||
/// <summary>
|
||||
/// 分类名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CategoryName")]
|
||||
public string CategoryName { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<CategoryEntity>? Children { get; set; }
|
||||
|
||||
|
||||
[Navigate(NavigateType.OneToMany, nameof(SpecsGroupEntity.CategoryId))]
|
||||
public List<SpecsGroupEntity>? SpecsGroups { get; set; }
|
||||
}
|
||||
}
|
||||
102
Yi.Framework.Net6/Yi.Framework.Model/SHOP/Entitys/SkuEntity.cs
Normal file
102
Yi.Framework.Net6/Yi.Framework.Model/SHOP/Entitys/SkuEntity.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.SHOP.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// Sku表
|
||||
///</summary>
|
||||
[SugarTable("Sku")]
|
||||
public partial class SkuEntity : IBaseModelEntity
|
||||
{
|
||||
public SkuEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// SpuId
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpuId")]
|
||||
public long? SpuId { get; set; }
|
||||
/// <summary>
|
||||
/// 库存
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Stock")]
|
||||
public int? Stock { get; set; }
|
||||
/// <summary>
|
||||
/// 价格
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Price")]
|
||||
public int? Price { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格sku信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsSkuInfo", IsJson = true)]
|
||||
public List<SpecsSkuInfoModel>? SpecsSkuInfo { get; set; }
|
||||
/// <summary>
|
||||
/// 规格sku完整信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsSkuAllInfo", IsJson = true)]
|
||||
public List<SpecsSkuAllInfoModel>? SpecsSkuAllInfo { get; set; }
|
||||
}
|
||||
|
||||
public class SpecsSkuAllInfoModel
|
||||
{
|
||||
public string? SpecsGroupName { get; set; }
|
||||
public string? SpecsName { get; set; }
|
||||
}
|
||||
public class SpecsSkuInfoModel
|
||||
{
|
||||
public long? SpecsGroupId { get; set; }
|
||||
public long? SpecsId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.SHOP.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品规格表
|
||||
///</summary>
|
||||
[SugarTable("Specs")]
|
||||
public partial class SpecsEntity : IBaseModelEntity
|
||||
{
|
||||
public SpecsEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 商品规格组id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsGroupId")]
|
||||
public long? SpecsGroupId { get; set; }
|
||||
/// <summary>
|
||||
/// 商品规格名
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsName")]
|
||||
public string SpecsName { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.SHOP.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品规格组表
|
||||
///</summary>
|
||||
[SugarTable("SpecsGroup")]
|
||||
public partial class SpecsGroupEntity : IBaseModelEntity
|
||||
{
|
||||
public SpecsGroupEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 分类id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CategoryId")]
|
||||
public long? CategoryId { get; set; }
|
||||
/// <summary>
|
||||
/// 商品规格组名
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsGroupName")]
|
||||
public string SpecsGroupName { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
[Navigate(NavigateType.OneToMany, nameof(SpecsEntity.SpecsGroupId))]
|
||||
public List<SpecsEntity>? Specses { get; set; }
|
||||
}
|
||||
}
|
||||
108
Yi.Framework.Net6/Yi.Framework.Model/SHOP/Entitys/SpuEntity.cs
Normal file
108
Yi.Framework.Net6/Yi.Framework.Model/SHOP/Entitys/SpuEntity.cs
Normal file
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.Model.SHOP.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// Spu表
|
||||
///</summary>
|
||||
[SugarTable("Spu")]
|
||||
public partial class SpuEntity : IBaseModelEntity
|
||||
{
|
||||
public SpuEntity()
|
||||
{
|
||||
CreateTime = DateTime.Now;
|
||||
}
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// 商品分类Id
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CategoryId")]
|
||||
public long? CategoryId { get; set; }
|
||||
/// <summary>
|
||||
/// 商品名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpuName")]
|
||||
public string? SpuName { get; set; }
|
||||
/// <summary>
|
||||
/// 商品详情
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Details")]
|
||||
public string? Details { get; set; }
|
||||
/// <summary>
|
||||
/// 商品价格
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Price")]
|
||||
public string? Price { 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 = "OrderNum")]
|
||||
public int? OrderNum { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; } /// <summary>
|
||||
/// 规格Spu完整信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsAllInfo", IsJson = true)]
|
||||
public List<SpecsSpuAllInfoModel>? SpecsSpuAllInfo { get; set; }
|
||||
/// <summary>
|
||||
/// 规格Spu信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsInfo", IsJson = true)]
|
||||
public List<SpecsSpuInfoModel>? SpecsSpuInfo { get; set; }
|
||||
|
||||
[Navigate(NavigateType.OneToMany, nameof(SkuEntity.SpuId))]
|
||||
public List<SkuEntity>? Skus { get; set; }
|
||||
}
|
||||
|
||||
public class SpecsSpuAllInfoModel
|
||||
{
|
||||
public string? SpecsGroupName { get; set; }
|
||||
public List<string>? SpecsNames { get; set; }
|
||||
}
|
||||
public class SpecsSpuInfoModel
|
||||
{
|
||||
public long? SpecsGroupId { get; set; }
|
||||
public List<long>? SpecsIds { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Sku表
|
||||
///</summary>
|
||||
public partial class SkuEntity:IBaseModelEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 规格sku信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsSkuInfo", IsJson = true)]
|
||||
public List<SpecsSkuInfoModel>? SpecsSkuInfo { get; set; }
|
||||
/// <summary>
|
||||
/// 规格sku完整信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsSkuAllInfo", IsJson = true)]
|
||||
public List<SpecsSkuAllInfoModel>? SpecsSkuAllInfo { get; set; }
|
||||
}
|
||||
|
||||
public class SpecsSkuAllInfoModel
|
||||
{
|
||||
public string? SpecsGroupName { get; set; }
|
||||
public string? SpecsName { get; set; }
|
||||
}
|
||||
public class SpecsSkuInfoModel
|
||||
{
|
||||
public long? SpecsGroupId { get; set; }
|
||||
public long? SpecsId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品规格组表
|
||||
///</summary>
|
||||
public partial class SpecsGroupEntity:IBaseModelEntity
|
||||
{
|
||||
[Navigate(NavigateType.OneToMany, nameof(SpecsEntity.SpecsGroupId))]
|
||||
public List<SpecsEntity>? Specses { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using SqlSugar;
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
|
||||
public partial class SpuEntity:IBaseModelEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 规格Spu完整信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsAllInfo", IsJson = true)]
|
||||
public List<SpecsSpuAllInfoModel>? SpecsSpuAllInfo { get; set; }
|
||||
/// <summary>
|
||||
/// 规格Spu信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsInfo", IsJson = true)]
|
||||
public List<SpecsSpuInfoModel>? SpecsSpuInfo { get; set; }
|
||||
|
||||
[Navigate(NavigateType.OneToMany, nameof(SkuEntity.SpuId))]
|
||||
public List<SkuEntity>? Skus { get; set; }
|
||||
}
|
||||
|
||||
public class SpecsSpuAllInfoModel
|
||||
{
|
||||
public string? SpecsGroupName { get; set; }
|
||||
public List<string>? SpecsNames{ get;set;}
|
||||
}
|
||||
public class SpecsSpuInfoModel
|
||||
{
|
||||
public long? SpecsGroupId{ get; set; }
|
||||
public List<long>? SpecsIds { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
//using SqlSugar;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using System.Threading.Tasks;
|
||||
|
||||
//namespace Yi.Framework.Model
|
||||
//{
|
||||
// //需要在用户表中关联好该租户信息,一个用户关联一个租户
|
||||
// //不同租户下,用户可以相同
|
||||
// //用户登录后,token中可包含租户id,同时缓存一份用户信息(包含租户信息)
|
||||
// [Tenant("0")]
|
||||
// //当然,像用户、角色、菜单、租户为共享库了
|
||||
// [SugarTable("Tenant")]
|
||||
// public class TenantEntity
|
||||
// {
|
||||
// /// <summary>
|
||||
// /// 主键唯一标识
|
||||
// /// </summary>
|
||||
// [SugarColumn(IsPrimaryKey = true)]
|
||||
// public long Id { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 租户id
|
||||
// /// </summary>
|
||||
// public string? TenantId { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 业务库连接字符串
|
||||
// /// </summary>
|
||||
// public string? Connection { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 业务库连接类型
|
||||
// /// </summary>
|
||||
// public string? DbType { get; set; }
|
||||
|
||||
|
||||
// }
|
||||
//}
|
||||
@@ -1,53 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Common.Helper;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public partial class UserEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 看好啦!ORM精髓,导航属性
|
||||
///</summary>
|
||||
[Navigate(typeof(UserRoleEntity), nameof(UserRoleEntity.UserId), nameof(UserRoleEntity.RoleId))]
|
||||
public List<RoleEntity>? Roles { get; set; }
|
||||
|
||||
[Navigate(typeof(UserPostEntity), nameof(UserPostEntity.UserId), nameof(UserPostEntity.PostId))]
|
||||
public List<PostEntity>? Posts { get; set; }
|
||||
|
||||
[Navigate( NavigateType.OneToOne,nameof(DeptId))]
|
||||
public DeptEntity? Dept { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 构建密码,MD5盐值加密
|
||||
/// </summary>
|
||||
public UserEntity BuildPassword(string password = null)
|
||||
{
|
||||
//如果不传值,那就把自己的password当作传进来的password
|
||||
if (password == null)
|
||||
{
|
||||
password = this.Password;
|
||||
}
|
||||
this.Salt = Common.Helper.MD5Helper.GenerateSalt();
|
||||
this.Password = Common.Helper.MD5Helper.SHA2Encode(password, this.Salt);
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断密码和加密后的密码是否相同
|
||||
/// </summary>
|
||||
/// <param name="password"></param>
|
||||
/// <returns></returns>
|
||||
public bool JudgePassword(string password)
|
||||
{
|
||||
var p = MD5Helper.SHA2Encode(password, this.Salt);
|
||||
if (this.Password == MD5Helper.SHA2Encode(password, this.Salt))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user