sqlsugar/Src/Asp.Net/SqlSugar/Json2Sql/Utils/Json2SqlConfig.cs

36 lines
1.0 KiB
C#
Raw Normal View History

2025-05-11 16:20:50 +08:00
using System;
using System.Collections.Generic;
using System.Text;
namespace SqlSugar
{
public static class JsonProviderConfig
{
public const string KeyInsertable = "Insertable";
public const string KeyUpdateable = "Updateable";
public const string KeyQueryable = "Queryable";
public const string KeyDeleteable = "Deleteable";
private static Dictionary<string, string> words = new Dictionary<string, string>()
{
{ KeyInsertable,"Table"},
{ KeyUpdateable,"Table"},
{ KeyQueryable,"Table"},
{ KeyDeleteable,"Table"}
};
public static string Rename(string key,string name)
{
return words[key]=name;
}
internal static string Get(this string value)
{
return words[value];
}
internal static string GetWord(string key)
{
Check.ExceptionEasy(words.ContainsKey(key) == false, $"{key} is error", $"{key} 不存在 ");
return words[key];
}
}
}