模板重新生成可空类型
This commit is contained in:
@@ -9,10 +9,10 @@ namespace Yi.Framework.Common.Helper
|
||||
{
|
||||
public class EmailHelper
|
||||
{
|
||||
public static string fromMail { get; set; }
|
||||
public static string pwdMail { get; set; }
|
||||
public static string senderMail { get; set; }
|
||||
public static string subjectMail { get; set; }
|
||||
public static string fromMail { get; set; } = string.Empty;
|
||||
public static string pwdMail { get; set; } = string.Empty;
|
||||
public static string senderMail { get; set; } = string.Empty;
|
||||
public static string subjectMail { get; set; } = string.Empty;
|
||||
public static void Init(string fromMail,string pwdMail,string senderMail, string subjectMail)
|
||||
{
|
||||
EmailHelper.fromMail = fromMail;
|
||||
|
||||
@@ -12,6 +12,6 @@ namespace Yi.Framework.Common.Models
|
||||
public long ParentId { get; set; }
|
||||
public int OrderNum { get; set; }
|
||||
|
||||
public List<T> Children { get; set; }
|
||||
public List<T>? Children { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace Yi.Framework.Common.Models
|
||||
/// </summary>
|
||||
public class LogModel
|
||||
{
|
||||
public string OriginalClassName { get; set; }
|
||||
public string OriginalMethodName { get; set; }
|
||||
public string Remark { get; set; }
|
||||
public string OriginalClassName { get; set; } = string.Empty;
|
||||
public string OriginalMethodName { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Yi.Framework.Common.Models
|
||||
Total = total;
|
||||
}
|
||||
public int Total { get; set; }
|
||||
public T Data { get; set; }
|
||||
public T Data { get; set; } = default(T)!;
|
||||
}
|
||||
|
||||
public class PageModel : PageModel<object>
|
||||
|
||||
@@ -12,22 +12,22 @@ namespace Yi.Framework.Common.Models
|
||||
public long ParentId { get; set; }
|
||||
public int OrderNum { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Path { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Path { get; set; } = string.Empty;
|
||||
public bool Hidden { get; set; }
|
||||
public string Redirect { get; set; }
|
||||
public string Component { get; set; }
|
||||
public string Redirect { get; set; } = string.Empty;
|
||||
public string Component { get; set; } = string.Empty;
|
||||
public bool AlwaysShow { get; set; }
|
||||
public Meta Meta { get; set; } = new Meta();
|
||||
public List<VueRouterModel> Children { get; set; }
|
||||
public List<VueRouterModel>? Children { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class Meta
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Icon { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Icon { get; set; } = string.Empty;
|
||||
public bool NoCache { get; set; }
|
||||
public string link { get; set; }
|
||||
public string link { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Yi.Framework.Common.IOCOptions
|
||||
{
|
||||
public class SqlConnOptions
|
||||
{
|
||||
public string WriteUrl { get; set; }
|
||||
public List<string> ReadUrl { get; set; }
|
||||
public string WriteUrl { get; set; } = string.Empty;
|
||||
public List<string>? ReadUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Yi.Framework.Common.QueueModel
|
||||
/// <summary>
|
||||
/// sku ID 集合
|
||||
/// </summary>
|
||||
public List<long> SkuIdList { get; set; }
|
||||
public List<long>? SkuIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 尝试次数
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Yi.Framework.Common.QueueModel
|
||||
{
|
||||
public class SMSQueueModel
|
||||
{
|
||||
public string code { get; set; }
|
||||
public string phone { get; set; }
|
||||
public string? code { get; set; }
|
||||
public string? phone { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<NoWarn>1701;1702;CS8618</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<NoWarn>1701;1702;CS8618</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
|
||||
<PackageReference Include="EPPlus" Version="5.8.4" />
|
||||
|
||||
Reference in New Issue
Block a user