mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
调整T4模板,领域模型增加注释
This commit is contained in:
parent
885d444761
commit
4e7f9ad0b3
@ -52,10 +52,6 @@
|
||||
<Project>{6108da8e-92a1-4abe-b9f5-26d64d55ca2c}</Project>
|
||||
<Name>OpenAuth.Domain</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenAuth.Repository\OpenAuth.Repository.csproj">
|
||||
<Project>{e8df8dea-e2cf-4bdb-8f4f-3f8205b0e03a}</Project>
|
||||
<Name>OpenAuth.Repository</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
@ -1,22 +1,142 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class Module
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string CascadeId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string HotKey { get; set; }
|
||||
public int ParentId { get; set; }
|
||||
public bool IsLeaf { get; set; }
|
||||
public bool IsAutoExpand { get; set; }
|
||||
public string IconName { get; set; }
|
||||
public int Status { get; set; }
|
||||
public string ParentName { get; set; }
|
||||
public string Vector { get; set; }
|
||||
public int SortNo { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class Module
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 节点语义ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CascadeId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 主页面URL
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Url { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 热键
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string HotKey { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 父节点流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ParentId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否叶子节点
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsLeaf { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否自动展开
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsAutoExpand { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 节点图标文件名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string IconName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 当前状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 父节点名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ParentName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 矢量图标
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Vector { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int SortNo { get; set; }
|
||||
|
||||
|
||||
|
||||
public Module()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.CascadeId= string.Empty;
|
||||
|
||||
this.Name= string.Empty;
|
||||
|
||||
this.Url= string.Empty;
|
||||
|
||||
this.HotKey= string.Empty;
|
||||
|
||||
this.ParentId= 0;
|
||||
|
||||
this.IsLeaf= false;
|
||||
|
||||
this.IsAutoExpand= false;
|
||||
|
||||
this.IconName= string.Empty;
|
||||
|
||||
this.Status= 0;
|
||||
|
||||
this.ParentName= string.Empty;
|
||||
|
||||
this.Vector= string.Empty;
|
||||
|
||||
this.SortNo= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,15 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class ModuleRole
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int RoleId { get; set; }
|
||||
public int ModuleId { get; set; }
|
||||
public int Type { get; set; }
|
||||
public System.DateTime OperateTime { get; set; }
|
||||
public int OperatorId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class ModuleRole
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 角色流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int RoleId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所属功能模块流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ModuleId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public System.DateTime OperateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权人流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int OperatorId { get; set; }
|
||||
|
||||
|
||||
|
||||
public ModuleRole()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.RoleId= 0;
|
||||
|
||||
this.ModuleId= 0;
|
||||
|
||||
this.Type= 0;
|
||||
|
||||
this.OperateTime= DateTime.Now;
|
||||
|
||||
this.OperatorId= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,33 +1,169 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class Org
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string CascadeId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string HotKey { get; set; }
|
||||
public int ParentId { get; set; }
|
||||
public string ParentName { get; set; }
|
||||
public bool IsLeaf { get; set; }
|
||||
public bool IsAutoExpand { get; set; }
|
||||
public string IconName { get; set; }
|
||||
public int Status { get; set; }
|
||||
public int Type { get; set; }
|
||||
public string BizCode { get; set; }
|
||||
public string CustomCode { get; set; }
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
public int CreateId { get; set; }
|
||||
public int SortNo { get; set; }
|
||||
|
||||
public Org()
|
||||
{
|
||||
HotKey = "";
|
||||
IconName = "";
|
||||
BizCode = "";
|
||||
CustomCode = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class Org
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 节点语义ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CascadeId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 热键
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string HotKey { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 父节点流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ParentId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 父节点名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ParentName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否叶子节点
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsLeaf { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否自动展开
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsAutoExpand { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 节点图标文件名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string IconName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 当前状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 业务对照码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string BizCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自定义扩展码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CustomCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建人ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int CreateId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int SortNo { get; set; }
|
||||
|
||||
|
||||
|
||||
public Org()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.CascadeId= string.Empty;
|
||||
|
||||
this.Name= string.Empty;
|
||||
|
||||
this.HotKey= string.Empty;
|
||||
|
||||
this.ParentId= 0;
|
||||
|
||||
this.ParentName= string.Empty;
|
||||
|
||||
this.IsLeaf= false;
|
||||
|
||||
this.IsAutoExpand= false;
|
||||
|
||||
this.IconName= string.Empty;
|
||||
|
||||
this.Status= 0;
|
||||
|
||||
this.Type= 0;
|
||||
|
||||
this.BizCode= string.Empty;
|
||||
|
||||
this.CustomCode= string.Empty;
|
||||
|
||||
this.CreateTime= DateTime.Now;
|
||||
|
||||
this.CreateId= 0;
|
||||
|
||||
this.SortNo= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,20 +1,124 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class Page
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ModuleId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Url { get; set; }
|
||||
public int Type { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public bool IsDefault { get; set; }
|
||||
public string Icon { get; set; }
|
||||
public string IconBig { get; set; }
|
||||
public string Vector { get; set; }
|
||||
public int SortNo { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class Page
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所属功能模块流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ModuleId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 主页面URL
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Url { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 使能状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否缺省子页面
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 小图标
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Icon { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 大图标
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string IconBig { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 矢量图标
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Vector { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int SortNo { get; set; }
|
||||
|
||||
|
||||
|
||||
public Page()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.ModuleId= 0;
|
||||
|
||||
this.Name= string.Empty;
|
||||
|
||||
this.Url= string.Empty;
|
||||
|
||||
this.Type= 0;
|
||||
|
||||
this.Enabled= false;
|
||||
|
||||
this.IsDefault= false;
|
||||
|
||||
this.Icon= string.Empty;
|
||||
|
||||
this.IconBig= string.Empty;
|
||||
|
||||
this.Vector= string.Empty;
|
||||
|
||||
this.SortNo= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,15 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class PageElement
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string DomId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int Type { get; set; }
|
||||
public int ModuleId { get; set; }
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class PageElement
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// DOM ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string DomId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所属功能模块流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ModuleId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Remark { get; set; }
|
||||
|
||||
|
||||
|
||||
public PageElement()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.DomId= string.Empty;
|
||||
|
||||
this.Name= string.Empty;
|
||||
|
||||
this.Type= 0;
|
||||
|
||||
this.ModuleId= 0;
|
||||
|
||||
this.Remark= string.Empty;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,15 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class PageElementGrant
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ElementId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public int RoleId { get; set; }
|
||||
public int PostId { get; set; }
|
||||
public int GrantType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class PageElementGrant
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 页面元素流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ElementId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int UserId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 角色流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int RoleId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 岗位流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int PostId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 权限类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int GrantType { get; set; }
|
||||
|
||||
|
||||
|
||||
public PageElementGrant()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.ElementId= 0;
|
||||
|
||||
this.UserId= 0;
|
||||
|
||||
this.RoleId= 0;
|
||||
|
||||
this.PostId= 0;
|
||||
|
||||
this.GrantType= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,17 +1,97 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class Role
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int Status { get; set; }
|
||||
public int Type { get; set; }
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
public string CreateId { get; set; }
|
||||
public int CreateOrgId { get; set; }
|
||||
public string CreateOrgCascadeId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class Role
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 当前状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建人ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CreateId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建人所属部门流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int CreateOrgId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建人所属部门节点语义ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string CreateOrgCascadeId { get; set; }
|
||||
|
||||
|
||||
|
||||
public Role()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.Name= string.Empty;
|
||||
|
||||
this.Status= 0;
|
||||
|
||||
this.Type= 0;
|
||||
|
||||
this.CreateTime= DateTime.Now;
|
||||
|
||||
this.CreateId= string.Empty;
|
||||
|
||||
this.CreateOrgId= 0;
|
||||
|
||||
this.CreateOrgCascadeId= string.Empty;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,19 +1,115 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class User
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Account { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int Sex { get; set; }
|
||||
public int Status { get; set; }
|
||||
public int Type { get; set; }
|
||||
public string BizCode { get; set; }
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
public int CreateId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class User
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Account { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Password { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Sex { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 当前状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 业务对照码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string BizCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建人ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int CreateId { get; set; }
|
||||
|
||||
|
||||
|
||||
public User()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.Account= string.Empty;
|
||||
|
||||
this.Password= string.Empty;
|
||||
|
||||
this.Name= string.Empty;
|
||||
|
||||
this.Sex= 0;
|
||||
|
||||
this.Status= 0;
|
||||
|
||||
this.Type= 0;
|
||||
|
||||
this.BizCode= string.Empty;
|
||||
|
||||
this.CreateTime= DateTime.Now;
|
||||
|
||||
this.CreateId= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,15 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class UserCfg
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Theme { get; set; }
|
||||
public string Skin { get; set; }
|
||||
public string NavBarStyle { get; set; }
|
||||
public string TabFocusColor { get; set; }
|
||||
public int NavTabIndex { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class UserCfg
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户界面主题
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Theme { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户界面皮肤
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Skin { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导航条按钮风格
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string NavBarStyle { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Tab高亮颜色
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string TabFocusColor { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导航缺省活动页
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int NavTabIndex { get; set; }
|
||||
|
||||
|
||||
|
||||
public UserCfg()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.Theme= string.Empty;
|
||||
|
||||
this.Skin= string.Empty;
|
||||
|
||||
this.NavBarStyle= string.Empty;
|
||||
|
||||
this.TabFocusColor= string.Empty;
|
||||
|
||||
this.NavTabIndex= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,24 +1,160 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class UserExt
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Phone_ { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string Zip { get; set; }
|
||||
public string Birthday { get; set; }
|
||||
public string IdCard { get; set; }
|
||||
public string QQ { get; set; }
|
||||
public string DynamicField { get; set; }
|
||||
public int ByteArrayId { get; set; }
|
||||
public string Remark { get; set; }
|
||||
public string Field1 { get; set; }
|
||||
public string Field2 { get; set; }
|
||||
public string Field3 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class UserExt
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 电子邮件
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Email { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 固定电话
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Phone_ { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 移动电话
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Mobile { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 联系地址
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Address { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 邮编
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Zip { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生日
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Birthday { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 身份证号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string IdCard { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// QQ
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string QQ { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 动态扩展字段
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string DynamicField { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户头像流文件ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ByteArrayId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Remark { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 静态扩展字段1
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Field1 { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 静态扩展字段2
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Field2 { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 静态扩展字段3
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Field3 { get; set; }
|
||||
|
||||
|
||||
|
||||
public UserExt()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.Email= string.Empty;
|
||||
|
||||
this.Phone_= string.Empty;
|
||||
|
||||
this.Mobile= string.Empty;
|
||||
|
||||
this.Address= string.Empty;
|
||||
|
||||
this.Zip= string.Empty;
|
||||
|
||||
this.Birthday= string.Empty;
|
||||
|
||||
this.IdCard= string.Empty;
|
||||
|
||||
this.QQ= string.Empty;
|
||||
|
||||
this.DynamicField= string.Empty;
|
||||
|
||||
this.ByteArrayId= 0;
|
||||
|
||||
this.Remark= string.Empty;
|
||||
|
||||
this.Field1= string.Empty;
|
||||
|
||||
this.Field2= string.Empty;
|
||||
|
||||
this.Field3= string.Empty;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,15 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class UserModule
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public int ModuleId { get; set; }
|
||||
public int Type { get; set; }
|
||||
public System.DateTime OperateTime { get; set; }
|
||||
public int OperatorId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class UserModule
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int UserId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所属功能模块流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ModuleId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组织类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public System.DateTime OperateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权人流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int OperatorId { get; set; }
|
||||
|
||||
|
||||
|
||||
public UserModule()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.UserId= 0;
|
||||
|
||||
this.ModuleId= 0;
|
||||
|
||||
this.Type= 0;
|
||||
|
||||
this.OperateTime= DateTime.Now;
|
||||
|
||||
this.OperatorId= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,14 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class UserOrg
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int OrgId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public System.DateTime OperateTime { get; set; }
|
||||
public int OperatorId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class UserOrg
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int OrgId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int UserId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public System.DateTime OperateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权人流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int OperatorId { get; set; }
|
||||
|
||||
|
||||
|
||||
public UserOrg()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.OrgId= 0;
|
||||
|
||||
this.UserId= 0;
|
||||
|
||||
this.OperateTime= DateTime.Now;
|
||||
|
||||
this.OperatorId= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,14 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class UserRole
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int RoleId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public System.DateTime OperateTime { get; set; }
|
||||
public int OperatorId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
public partial class UserRole
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 角色流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int RoleId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int UserId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public System.DateTime OperateTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权人流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int OperatorId { get; set; }
|
||||
|
||||
|
||||
|
||||
public UserRole()
|
||||
{
|
||||
|
||||
this.Id= 0;
|
||||
|
||||
this.RoleId= 0;
|
||||
|
||||
this.UserId= 0;
|
||||
|
||||
this.OperateTime= DateTime.Now;
|
||||
|
||||
this.OperatorId= 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,73 +1,130 @@
|
||||
<#@ template hostspecific="true" language="C#" #>
|
||||
<#@ include file="EF.Utility.CS.ttinclude" #><#@
|
||||
output extension=".cs" #><#
|
||||
|
||||
var efHost = (EfTextTemplateHost)Host;
|
||||
var code = new CodeGenerationTools(this);
|
||||
#>
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
public partial class <#= efHost.EntityType.Name #>
|
||||
{
|
||||
<#
|
||||
var collectionNavigations = efHost.EntityType.NavigationProperties.Where(
|
||||
np => np.DeclaringType == efHost.EntityType
|
||||
&& np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
|
||||
|
||||
// Add a ctor to initialize any collections
|
||||
if (collectionNavigations.Any())
|
||||
{
|
||||
#>
|
||||
public <#= code.Escape(efHost.EntityType) #>()
|
||||
{
|
||||
<#
|
||||
foreach (var navProperty in collectionNavigations)
|
||||
{
|
||||
#>
|
||||
this.<#= code.Escape(navProperty) #> = new List<<#= code.Escape(navProperty.ToEndMember.GetEntityType()) #>>();
|
||||
<#
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var property in efHost.EntityType.Properties)
|
||||
{
|
||||
var typeUsage = code.Escape(property.TypeUsage);
|
||||
|
||||
// Fix-up spatial types for EF6
|
||||
if (efHost.EntityFrameworkVersion >= new Version(6, 0)
|
||||
&& typeUsage.StartsWith("System.Data.Spatial."))
|
||||
{
|
||||
typeUsage = typeUsage.Replace(
|
||||
"System.Data.Spatial.",
|
||||
"System.Data.Entity.Spatial.");
|
||||
}
|
||||
#>
|
||||
<#= Accessibility.ForProperty(property) #> <#= typeUsage #> <#= code.Escape(property) #> { get; set; }
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var navProperty in efHost.EntityType.NavigationProperties.Where(np => np.DeclaringType == efHost.EntityType))
|
||||
{
|
||||
if (navProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
|
||||
{
|
||||
#>
|
||||
public virtual ICollection<<#= code.Escape(navProperty.ToEndMember.GetEntityType()) #>> <#= code.Escape(navProperty) #> { get; set; }
|
||||
<#
|
||||
}
|
||||
else
|
||||
{
|
||||
#>
|
||||
public virtual <#= code.Escape(navProperty.ToEndMember.GetEntityType()) #> <#= code.Escape(navProperty) #> { get; set; }
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
}
|
||||
<#@ template hostspecific="true" language="C#" #>
|
||||
<#@ include file="EF.Utility.CS.ttinclude" #><#@
|
||||
output extension=".cs" #><#
|
||||
|
||||
var efHost = (EfTextTemplateHost)Host;
|
||||
var code = new CodeGenerationTools(this);
|
||||
code.GetSummryDictionary(".",efHost.EntityContainer.Name,efHost.EntityType.Name,"sa","000000");
|
||||
|
||||
#>
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// <#= code.GetSummry(code.Escape(efHost.EntityType.Properties[0])) #>
|
||||
/// </summary>
|
||||
public partial class <#= efHost.EntityType.Name #>
|
||||
{
|
||||
<#
|
||||
var collectionNavigations = efHost.EntityType.NavigationProperties.Where(np => np.DeclaringType == efHost.EntityType && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
|
||||
|
||||
foreach (var property in efHost.EntityType.Properties)
|
||||
{
|
||||
var typeUsage = code.Escape(property.TypeUsage);
|
||||
|
||||
// Fix-up spatial types for EF6
|
||||
if (efHost.EntityFrameworkVersion >= new Version(6, 0)
|
||||
&& typeUsage.StartsWith("System.Data.Spatial."))
|
||||
{
|
||||
typeUsage = typeUsage.Replace(
|
||||
"System.Data.Spatial.",
|
||||
"System.Data.Entity.Spatial.");
|
||||
}
|
||||
#>
|
||||
/// <summary>
|
||||
/// <#= code.GetSummry(code.Escape(property)) #>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
<#= Accessibility.ForProperty(property) #> <#= typeUsage #> <#= code.Escape(property) #> { get; set; }
|
||||
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var navProperty in efHost.EntityType.NavigationProperties.Where(np => np.DeclaringType == efHost.EntityType))
|
||||
{
|
||||
if (navProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
|
||||
{
|
||||
#>
|
||||
public virtual ICollection<<#= code.Escape(navProperty.ToEndMember.GetEntityType()) #>> <#= code.Escape(navProperty) #> { get; set; }
|
||||
<#
|
||||
}
|
||||
else
|
||||
{
|
||||
#>
|
||||
public virtual <#= code.Escape(navProperty.ToEndMember.GetEntityType()) #> <#= code.Escape(navProperty) #> { get; set; }
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
|
||||
public <#= code.Escape(efHost.EntityType) #>()
|
||||
{
|
||||
<# foreach (var property in efHost.EntityType.Properties)
|
||||
{
|
||||
var typeUsage = code.Escape(property.TypeUsage);
|
||||
|
||||
// Fix-up spatial types for EF6
|
||||
if (efHost.EntityFrameworkVersion >= new Version(6, 0)
|
||||
&& typeUsage.StartsWith("System.Data.Spatial."))
|
||||
{
|
||||
typeUsage = typeUsage.Replace(
|
||||
"System.Data.Spatial.",
|
||||
"System.Data.Entity.Spatial.");
|
||||
}
|
||||
if(typeUsage=="System.Guid")
|
||||
{
|
||||
#>
|
||||
this.<#= code.Escape(property) #>= Guid.NewGuid();
|
||||
<#}
|
||||
else if(typeUsage=="System.DateTime")
|
||||
{
|
||||
#>
|
||||
this.<#= code.Escape(property) #>= DateTime.Now;
|
||||
<#}
|
||||
else if(typeUsage=="bool")
|
||||
{
|
||||
#>
|
||||
this.<#= code.Escape(property) #>= false;
|
||||
<# }
|
||||
else if(typeUsage=="int"||typeUsage=="double")
|
||||
{
|
||||
#>
|
||||
this.<#= code.Escape(property) #>= 0;
|
||||
<# }
|
||||
else if(typeUsage=="byte[]")
|
||||
{
|
||||
#>
|
||||
this.<#= code.Escape(property) #>= new byte[0];
|
||||
<# }
|
||||
else if(typeUsage=="decimal")
|
||||
{
|
||||
#>
|
||||
this.<#= code.Escape(property) #>= 0M;
|
||||
<# }
|
||||
else if(typeUsage=="string")
|
||||
{
|
||||
#>
|
||||
this.<#= code.Escape(property) #>= string.Empty;
|
||||
<#}
|
||||
else{ }
|
||||
}
|
||||
if (collectionNavigations.Any())
|
||||
{
|
||||
foreach (var navProperty in collectionNavigations)
|
||||
{
|
||||
#>
|
||||
this.<#= code.Escape(navProperty) #> = new List<<#= code.Escape(navProperty.ToEndMember.GetEntityType()) #>>();
|
||||
<#
|
||||
}
|
||||
|
||||
}#>
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -12,8 +12,6 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Id);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("ModuleRole");
|
||||
this.Property(t => t.Id).HasColumnName("Id");
|
||||
|
@ -12,8 +12,6 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Id);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("PageElementGrant");
|
||||
this.Property(t => t.Id).HasColumnName("Id");
|
||||
|
@ -11,7 +11,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Primary Key
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.DomId)
|
||||
.IsRequired()
|
||||
.HasMaxLength(255);
|
||||
|
@ -11,7 +11,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Primary Key
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Theme)
|
||||
.IsRequired()
|
||||
.HasMaxLength(255);
|
||||
|
@ -11,7 +11,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Primary Key
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Email)
|
||||
.IsRequired()
|
||||
.HasMaxLength(255);
|
||||
|
@ -11,7 +11,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Primary Key
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Account)
|
||||
.IsRequired()
|
||||
.HasMaxLength(255);
|
||||
|
@ -11,6 +11,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Primary Key
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
// Table & Column Mappings
|
||||
this.ToTable("UserModule");
|
||||
this.Property(t => t.Id).HasColumnName("Id");
|
||||
|
@ -12,8 +12,6 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Id);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("UserOrg");
|
||||
this.Property(t => t.Id).HasColumnName("Id");
|
||||
|
@ -12,8 +12,6 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Id);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("UserRole");
|
||||
this.Property(t => t.Id).HasColumnName("Id");
|
||||
|
@ -79,6 +79,7 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user