提交.Net6版本

This commit is contained in:
橙子
2021-12-25 14:50:54 +08:00
parent aebf12a7ca
commit 6503ad905b
443 changed files with 17839 additions and 712 deletions

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Common.Models
{
public class AxiosUrlsModel
{
public string get { get; set; }
public string update { get; set; }
public string del { get; set; }
public string add { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Yi.Framework.Common.Enum
{
public enum AgrFlagEnum
{
wait = 0,
Agree = 1
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Yi.Framework.Common.Enum
{
public enum DelFlagEnum
{
Normal=0,
Deleted=1
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Common.Enum
{
public enum ShowFlagEnum
{
NoShow=0,
Show=1
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Common.Enum
{
public enum TopFlagEnum
{
Children=0,
Top=1
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Yi.Framework.Common.Enum
{
public enum WriteAndReadEnum
{
Write, //主库操作
Read //从库操作
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Common.Models
{
public class JobModel
{
public static int visitNum { get; set; } = 0;
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Common.Models
{
/// <summary>
/// 写入分布式日志需要的字段
/// </summary>
public class LogModel
{
public string OriginalClassName { get; set; }
public string OriginalMethodName { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Common.Models
{
public class PageModel
{
}
}

View File

@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Yi.Framework.Common.Models
{
/// <summary>
/// 结果数据
/// </summary>
public class Result
{
public bool status { get; set; }
public int code { get; set; }
public string msg { get; set; }
public object data { get; set; }
public static Result Instance(bool status, string msg)
{
return new Result() { status = status, code = 500, msg = msg };
}
public static Result Error(string msg = "fail")
{
return new Result() { status = false, code = 500, msg = msg };
}
public static Result Success(string msg = "succeed")
{
return new Result() { status = true, code = 200, msg = msg };
}
public static Result UnAuthorize(string msg = "unAuthorize")
{
return new Result() { status = false, code = 401, msg = msg };
}
public Result SetData(object obj)
{
this.data = obj;
return this;
}
public Result SetCode(int Code)
{
this.code = Code;
return this;
}
}
public class Result<T>
{
public bool status { get; set; }
public int code { get; set; }
public string msg { get; set; }
public T data { get; set; }
public static Result<T> Instance(bool status, string msg)
{
return new Result<T>() { status = status, code = 500, msg = msg };
}
public static Result<T> Error(string msg = "fail")
{
return new Result<T> { status = false, code = 500, msg = msg };
}
public static Result<T> Success(string msg = "succeed")
{
return new Result<T> { status = true, code = 200, msg = msg };
}
public static Result<T> UnAuthorize(string msg = "unAuthorize")
{
return new Result<T>{ status = false, code = 401, msg = msg };
}
public Result<T> SetData(T TValue)
{
this.data = TValue;
return this;
}
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Common.Models
{
public class SwaggerModel
{
public SwaggerModel(string url, string name)
{
this.url = url;
this.name = name;
}
public string url { get; set; }
public string name { get; set; }
}
}