文章增加设置IP访问限制
This commit is contained in:
@@ -12,11 +12,7 @@
|
||||
|
||||
// 加载模型文件,得到数据表
|
||||
var option = new BuilderOption();
|
||||
<<<<<<< HEAD
|
||||
var tables = ClassBuilder.LoadModels("data.project.xml", option, out var atts);
|
||||
=======
|
||||
var tables = ClassBuilder.LoadModels("comcmsdata.xml", option, out var atts);
|
||||
>>>>>>> ae6ede6fa215b541779198620dc477049eff7172
|
||||
EntityBuilder.FixModelFile(null, option, atts, tables);
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,14 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="comcms\*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Entity\Membership\*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Model.log">
|
||||
<DesignTime>True</DesignTime>
|
||||
|
||||
@@ -273,6 +273,14 @@ namespace COMCMS.Core
|
||||
[DataObjectField(false, false, true, 100)]
|
||||
[BindColumn("FilePath", "目录路径", "")]
|
||||
public String FilePath { get => _FilePath; set { if (OnPropertyChanging("FilePath", value)) { _FilePath = value; OnPropertyChanged("FilePath"); } } }
|
||||
|
||||
private String _AllowIp;
|
||||
/// <summary>IP地址限制。每一行一条记录,可以用“-”分割</summary>
|
||||
[DisplayName("IP地址限制")]
|
||||
[Description("IP地址限制。每一行一条记录,可以用“-”分割")]
|
||||
[DataObjectField(false, false, true, -1)]
|
||||
[BindColumn("AllowIp", "IP地址限制。每一行一条记录,可以用“-”分割", "")]
|
||||
public String AllowIp { get => _AllowIp; set { if (OnPropertyChanging("AllowIp", value)) { _AllowIp = value; OnPropertyChanged("AllowIp"); } } }
|
||||
#endregion
|
||||
|
||||
#region 获取/设置 字段值
|
||||
@@ -317,6 +325,7 @@ namespace COMCMS.Core
|
||||
case "Pic": return _Pic;
|
||||
case "AdsId": return _AdsId;
|
||||
case "FilePath": return _FilePath;
|
||||
case "AllowIp": return _AllowIp;
|
||||
default: return base[name];
|
||||
}
|
||||
}
|
||||
@@ -356,6 +365,7 @@ namespace COMCMS.Core
|
||||
case "Pic": _Pic = Convert.ToString(value); break;
|
||||
case "AdsId": _AdsId = value.ToInt(); break;
|
||||
case "FilePath": _FilePath = Convert.ToString(value); break;
|
||||
case "AllowIp": _AllowIp = Convert.ToString(value); break;
|
||||
default: base[name] = value; break;
|
||||
}
|
||||
}
|
||||
@@ -462,6 +472,9 @@ namespace COMCMS.Core
|
||||
/// <summary>目录路径</summary>
|
||||
public static readonly Field FilePath = FindByName("FilePath");
|
||||
|
||||
/// <summary>IP地址限制。每一行一条记录,可以用“-”分割</summary>
|
||||
public static readonly Field AllowIp = FindByName("AllowIp");
|
||||
|
||||
static Field FindByName(String name) => Meta.Table.FindByName(name);
|
||||
}
|
||||
|
||||
@@ -563,6 +576,9 @@ namespace COMCMS.Core
|
||||
|
||||
/// <summary>目录路径</summary>
|
||||
public const String FilePath = "FilePath";
|
||||
|
||||
/// <summary>IP地址限制。每一行一条记录,可以用“-”分割</summary>
|
||||
public const String AllowIp = "AllowIp";
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -208,6 +208,7 @@
|
||||
<Column Name="Pic" DataType="String" Length="250" Description="图片" />
|
||||
<Column Name="AdsId" DataType="Int32" Description="广告ID" />
|
||||
<Column Name="FilePath" DataType="String" Length="100" Description="目录路径" />
|
||||
<Column Name="AllowIp" DataType="String" Length="-1" Description="IP地址限制。每一行一条记录,可以用“-”分割" />
|
||||
</Columns>
|
||||
</Table>
|
||||
<Table Name="Article" Description="文章" DbType="SqlServer">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user