修复codefirst
This commit is contained in:
@@ -159,9 +159,6 @@ ServiceLocator.Instance = app.Services;
|
||||
//<2F><><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>ע<EFBFBD><D7A2>
|
||||
#endregion
|
||||
app.UseDeveloperExceptionPage();
|
||||
#region
|
||||
//Swagger<65><72><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>
|
||||
#endregion
|
||||
app.UseSwaggerService();
|
||||
}
|
||||
#region
|
||||
|
||||
Binary file not shown.
@@ -8,6 +8,6 @@ namespace Yi.Framework.Model.Models
|
||||
public partial class ArticleEntity:IBaseModelEntity
|
||||
{
|
||||
[Navigate(NavigateType.OneToOne,nameof(UserId))]
|
||||
public UserEntity User { get; set; }
|
||||
public UserEntity? User { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ namespace Yi.Framework.Model.Models
|
||||
public partial class CategoryEntity:IBaseModelEntity
|
||||
{
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<CategoryEntity> Children { get; set; }
|
||||
public List<CategoryEntity>? Children { get; set; }
|
||||
|
||||
|
||||
[Navigate(NavigateType.OneToMany,nameof(SpecsGroupEntity.CategoryId))]
|
||||
public List<SpecsGroupEntity> SpecsGroups { get; set; }
|
||||
public List<SpecsGroupEntity>? SpecsGroups { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -25,14 +25,14 @@ namespace Yi.Framework.Model.Models
|
||||
|
||||
var r = new VueRouterModel();
|
||||
r.OrderNum = m.OrderNum ?? 0;
|
||||
var routerName = m.Router.Split("/").LastOrDefault();
|
||||
var routerName = m.Router?.Split("/").LastOrDefault();
|
||||
r.Id = m.Id;
|
||||
r.ParentId = (long)m.ParentId;
|
||||
r.ParentId = m.ParentId??-1;
|
||||
|
||||
//开头大写
|
||||
r.Name = routerName.First().ToString().ToUpper() + routerName.Substring(1);
|
||||
r.Name = routerName?.First().ToString().ToUpper() + routerName?.Substring(1);
|
||||
r.Path = m.Router;
|
||||
r.Hidden = (bool)!m.IsShow;
|
||||
r.Hidden =!m.IsShow??false;
|
||||
|
||||
|
||||
if (m.MenuType == MenuTypeEnum.Catalogue.GetHashCode())
|
||||
@@ -62,9 +62,9 @@ namespace Yi.Framework.Model.Models
|
||||
{
|
||||
Title = m.MenuName,
|
||||
Icon = m.MenuIcon,
|
||||
NoCache = (bool)!m.IsCache
|
||||
NoCache = !m.IsCache??true
|
||||
};
|
||||
if ((bool)m.IsLink)
|
||||
if (m.IsLink??false)
|
||||
{
|
||||
r.Meta.link = m.Router;
|
||||
r.AlwaysShow = false;
|
||||
|
||||
@@ -77,6 +77,6 @@ namespace Yi.Framework.Model.Models
|
||||
/// 图片列表
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName="Images",IsJson = true)]
|
||||
public List<string> Images { get; set; }
|
||||
public List<string>? Images { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace Yi.Framework.Model.Models
|
||||
{
|
||||
|
||||
[Navigate(typeof(RoleMenuEntity),nameof(RoleMenuEntity.RoleId),nameof(RoleMenuEntity.MenuId))]
|
||||
public List<MenuEntity> Menus { get; set; }
|
||||
public List<MenuEntity>? Menus { get; set; }
|
||||
|
||||
[Navigate(typeof(RoleDeptEntity), nameof(RoleDeptEntity.RoleId), nameof(RoleDeptEntity.DeptId))]
|
||||
public List<DeptEntity> Depts { get; set; }
|
||||
public List<DeptEntity>? Depts { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ namespace Yi.Framework.Model.Models
|
||||
/// 规格sku信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsSkuInfo", IsJson = true)]
|
||||
public List<SpecsSkuInfoModel> SpecsSkuInfo { get; set; }
|
||||
public List<SpecsSkuInfoModel>? SpecsSkuInfo { get; set; }
|
||||
/// <summary>
|
||||
/// 规格sku完整信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsSkuAllInfo", IsJson = true)]
|
||||
public List<SpecsSkuAllInfoModel> SpecsSkuAllInfo { get; set; }
|
||||
public List<SpecsSkuAllInfoModel>? SpecsSkuAllInfo { get; set; }
|
||||
}
|
||||
|
||||
public class SpecsSkuAllInfoModel
|
||||
|
||||
@@ -11,6 +11,6 @@ namespace Yi.Framework.Model.Models
|
||||
public partial class SpecsGroupEntity:IBaseModelEntity
|
||||
{
|
||||
[Navigate(NavigateType.OneToMany, nameof(SpecsEntity.SpecsGroupId))]
|
||||
public List<SpecsEntity> Specses { get; set; }
|
||||
public List<SpecsEntity>? Specses { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,15 +12,15 @@ namespace Yi.Framework.Model.Models
|
||||
/// 规格Spu完整信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsAllInfo", IsJson = true)]
|
||||
public List<SpecsSpuAllInfoModel> SpecsSpuAllInfo { get; set; }
|
||||
public List<SpecsSpuAllInfoModel>? SpecsSpuAllInfo { get; set; }
|
||||
/// <summary>
|
||||
/// 规格Spu信息
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "SpecsInfo", IsJson = true)]
|
||||
public List<SpecsSpuInfoModel> SpecsSpuInfo { get; set; }
|
||||
public List<SpecsSpuInfoModel>? SpecsSpuInfo { get; set; }
|
||||
|
||||
[Navigate(NavigateType.OneToMany, nameof(SkuEntity.SpuId))]
|
||||
public List<SpuEntity> Spus { get; set; }
|
||||
public List<SpuEntity>? Spus { get; set; }
|
||||
}
|
||||
|
||||
public class SpecsSpuAllInfoModel
|
||||
|
||||
@@ -12,13 +12,13 @@ namespace Yi.Framework.Model.Models
|
||||
/// 看好啦!ORM精髓,导航属性
|
||||
///</summary>
|
||||
[Navigate(typeof(UserRoleEntity), nameof(UserRoleEntity.UserId), nameof(UserRoleEntity.RoleId))]
|
||||
public List<RoleEntity> Roles { get; set; }
|
||||
public List<RoleEntity>? Roles { get; set; }
|
||||
|
||||
[Navigate(typeof(UserPostEntity), nameof(UserPostEntity.UserId), nameof(UserPostEntity.PostId))]
|
||||
public List<PostEntity> Posts { get; set; }
|
||||
public List<PostEntity>? Posts { get; set; }
|
||||
|
||||
[Navigate( NavigateType.OneToOne,nameof(DeptId))]
|
||||
public DeptEntity Dept { get; set; }
|
||||
public DeptEntity? Dept { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 构建密码,MD5盐值加密
|
||||
|
||||
Reference in New Issue
Block a user