mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-08 02:14:44 +08:00
调整结构
This commit is contained in:
@@ -64,7 +64,7 @@ namespace OpenAuth.Repository
|
||||
|
||||
public void Add(T entity)
|
||||
{
|
||||
entity.Id = Guid.NewGuid();
|
||||
entity.Id = Guid.NewGuid().ToString();
|
||||
Context.Set<T>().Add(entity);
|
||||
Save();
|
||||
}
|
||||
@@ -77,7 +77,7 @@ namespace OpenAuth.Repository
|
||||
{
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
entity.Id = Guid.NewGuid();
|
||||
entity.Id = Guid.NewGuid().ToString();
|
||||
}
|
||||
Context.Set<T>().AddRange(entities);
|
||||
Save();
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace OpenAuth.Repository
|
||||
return Context.Categories.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public IEnumerable<Category> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Category> LoadInOrgs(params string[] orgId)
|
||||
{
|
||||
var result = from category in Context.Categories where orgId.Contains(category.Id)
|
||||
select category;
|
||||
@@ -22,17 +22,17 @@ namespace OpenAuth.Repository
|
||||
|
||||
}
|
||||
|
||||
public int GetCategoryCntInOrgs(params Guid[] orgIds)
|
||||
public int GetCategoryCntInOrgs(params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).Count();
|
||||
}
|
||||
|
||||
public IEnumerable<Category> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Category> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).OrderBy(u =>u.Id).Skip((pageindex -1)*pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public void Delete(Guid id)
|
||||
public void Delete(string id)
|
||||
{
|
||||
Delete(u =>u.Id == id);
|
||||
}
|
||||
@@ -40,9 +40,9 @@ namespace OpenAuth.Repository
|
||||
/// <summary>
|
||||
/// 获取当前节点的所有下级节点
|
||||
/// </summary>
|
||||
public Guid[] GetSubIds(Guid orgId)
|
||||
public string[] GetSubIds(string orgId)
|
||||
{
|
||||
if (orgId == Guid.Empty)
|
||||
if (orgId == string.Empty)
|
||||
{
|
||||
return Find(null).Select(u => u.Id).ToArray();
|
||||
}
|
||||
|
||||
65
OpenAuth.Repository/Models/Mapping/ApplicationMap.cs
Normal file
65
OpenAuth.Repository/Models/Mapping/ApplicationMap.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class ApplicationMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Application>
|
||||
{
|
||||
public ApplicationMap()
|
||||
{
|
||||
// table
|
||||
ToTable("Application", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Name)
|
||||
.HasColumnName("Name")
|
||||
.HasMaxLength(255)
|
||||
.IsRequired();
|
||||
Property(t => t.AppId)
|
||||
.HasColumnName("AppId")
|
||||
.HasMaxLength(255)
|
||||
.IsOptional();
|
||||
Property(t => t.AppKey)
|
||||
.HasColumnName("AppKey")
|
||||
.HasMaxLength(255)
|
||||
.IsOptional();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(255)
|
||||
.IsOptional();
|
||||
Property(t => t.Icon)
|
||||
.HasColumnName("Icon")
|
||||
.HasMaxLength(255)
|
||||
.IsOptional();
|
||||
Property(t => t.Disable)
|
||||
.HasColumnName("Disable")
|
||||
.IsRequired();
|
||||
Property(t => t.CreateTime)
|
||||
.HasColumnName("CreateTime")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUser)
|
||||
.HasColumnName("CreateUser")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class CategoryMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Category>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Category>
|
||||
{
|
||||
public CategoryMap()
|
||||
{
|
||||
@@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.CascadeId)
|
||||
.HasColumnName("CascadeId")
|
||||
@@ -34,22 +36,23 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.HasColumnName("Name")
|
||||
.HasMaxLength(255)
|
||||
.IsRequired();
|
||||
Property(t => t.Code)
|
||||
.HasColumnName("Code")
|
||||
.HasMaxLength(255)
|
||||
.IsOptional();
|
||||
Property(t => t.Status)
|
||||
.HasColumnName("Status")
|
||||
.IsRequired();
|
||||
Property(t => t.SortNo)
|
||||
.HasColumnName("SortNo")
|
||||
.IsRequired();
|
||||
Property(t => t.RootKey)
|
||||
.HasColumnName("RootKey")
|
||||
.HasMaxLength(100)
|
||||
.IsRequired();
|
||||
Property(t => t.RootName)
|
||||
.HasColumnName("RootName")
|
||||
.HasMaxLength(200)
|
||||
.IsRequired();
|
||||
Property(t => t.TypeId)
|
||||
.HasColumnName("TypeId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ParentId)
|
||||
.HasColumnName("ParentId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
|
||||
@@ -6,18 +6,19 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class DicIndexMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<DicIndex>
|
||||
public partial class CategoryTypeMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.CategoryType>
|
||||
{
|
||||
public DicIndexMap()
|
||||
public CategoryTypeMap()
|
||||
{
|
||||
// table
|
||||
ToTable("DicIndex", "dbo");
|
||||
ToTable("CategoryType", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
@@ -25,24 +26,22 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Name)
|
||||
.HasColumnName("Name")
|
||||
.HasMaxLength(255)
|
||||
.IsRequired();
|
||||
Property(t => t.Key)
|
||||
.HasColumnName("Key")
|
||||
.HasMaxLength(100)
|
||||
.IsRequired();
|
||||
Property(t => t.SortNo)
|
||||
.HasColumnName("SortNo")
|
||||
.IsRequired();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(200)
|
||||
.IsRequired();
|
||||
Property(t => t.CategoryId)
|
||||
.HasColumnName("CategoryId")
|
||||
Property(t => t.Code)
|
||||
.HasColumnName("Code")
|
||||
.HasMaxLength(255)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateTime)
|
||||
.HasColumnName("CreateTime")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUser)
|
||||
.HasColumnName("CreateUser")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
@@ -1,54 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class DicDetailMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<DicDetail>
|
||||
{
|
||||
public DicDetailMap()
|
||||
{
|
||||
// table
|
||||
ToTable("DicDetail", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.Value)
|
||||
.HasColumnName("Value")
|
||||
.HasMaxLength(100)
|
||||
.IsRequired();
|
||||
Property(t => t.Text)
|
||||
.HasColumnName("Text")
|
||||
.HasMaxLength(100)
|
||||
.IsRequired();
|
||||
Property(t => t.SortNo)
|
||||
.HasColumnName("SortNo")
|
||||
.IsRequired();
|
||||
Property(t => t.Status)
|
||||
.HasColumnName("Status")
|
||||
.IsRequired();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(100)
|
||||
.IsRequired();
|
||||
Property(t => t.DicId)
|
||||
.HasColumnName("DicId")
|
||||
.IsRequired();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class ModuleElementMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<ModuleElement>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.ModuleElement>
|
||||
{
|
||||
public ModuleElementMap()
|
||||
{
|
||||
@@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.DomId)
|
||||
.HasColumnName("DomId")
|
||||
@@ -63,6 +65,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.IsRequired();
|
||||
Property(t => t.ModuleId)
|
||||
.HasColumnName("ModuleId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
|
||||
// Relationships
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class ModuleMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Module>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Module>
|
||||
{
|
||||
public ModuleMap()
|
||||
{
|
||||
@@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.CascadeId)
|
||||
.HasColumnName("CascadeId")
|
||||
@@ -42,8 +44,6 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.HasColumnName("HotKey")
|
||||
.HasMaxLength(255)
|
||||
.IsRequired();
|
||||
Property(t => t.ParentId)
|
||||
.HasColumnName("ParentId");
|
||||
Property(t => t.IsLeaf)
|
||||
.HasColumnName("IsLeaf")
|
||||
.IsRequired();
|
||||
@@ -68,6 +68,10 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
Property(t => t.SortNo)
|
||||
.HasColumnName("SortNo")
|
||||
.IsRequired();
|
||||
Property(t => t.ParentId)
|
||||
.HasColumnName("ParentId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class OrgMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Org>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Org>
|
||||
{
|
||||
public OrgMap()
|
||||
{
|
||||
@@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.CascadeId)
|
||||
.HasColumnName("CascadeId")
|
||||
@@ -77,6 +79,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.IsRequired();
|
||||
Property(t => t.ParentId)
|
||||
.HasColumnName("ParentId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class RelevanceMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Relevance>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Relevance>
|
||||
{
|
||||
public RelevanceMap()
|
||||
{
|
||||
@@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
@@ -42,12 +44,15 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.IsRequired();
|
||||
Property(t => t.OperatorId)
|
||||
.HasColumnName("OperatorId")
|
||||
.IsRequired();
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FirstId)
|
||||
.HasColumnName("FirstId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SecondId)
|
||||
.HasColumnName("SecondId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
|
||||
// Relationships
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class ResourceMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Resource>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Resource>
|
||||
{
|
||||
public ResourceMap()
|
||||
{
|
||||
@@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.CascadeId)
|
||||
.HasColumnName("CascadeId")
|
||||
@@ -44,15 +46,21 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
Property(t => t.SortNo)
|
||||
.HasColumnName("SortNo")
|
||||
.IsRequired();
|
||||
Property(t => t.CategoryId)
|
||||
.HasColumnName("CategoryId")
|
||||
.IsRequired();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(500)
|
||||
.IsRequired();
|
||||
Property(t => t.ParentId)
|
||||
.HasColumnName("ParentId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.CategoryId)
|
||||
.HasColumnName("CategoryId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.AppId)
|
||||
.HasColumnName("AppId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class RoleMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Role>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Role>
|
||||
{
|
||||
public RoleMap()
|
||||
{
|
||||
@@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Name)
|
||||
.HasColumnName("Name")
|
||||
@@ -41,8 +43,9 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.IsRequired();
|
||||
Property(t => t.CreateId)
|
||||
.HasColumnName("CreateId")
|
||||
.HasMaxLength(64)
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,57 +1,64 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class StockMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Stock>
|
||||
{
|
||||
public StockMap()
|
||||
{
|
||||
// table
|
||||
ToTable("Stock", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.Name)
|
||||
.HasColumnName("Name")
|
||||
.HasMaxLength(500)
|
||||
.IsRequired();
|
||||
Property(t => t.Number)
|
||||
.HasColumnName("Number")
|
||||
.IsRequired();
|
||||
Property(t => t.Price)
|
||||
.HasColumnName("Price")
|
||||
.HasPrecision(10, 1)
|
||||
.IsRequired();
|
||||
Property(t => t.Status)
|
||||
.HasColumnName("Status")
|
||||
.IsRequired();
|
||||
Property(t => t.Viewable)
|
||||
.HasColumnName("Viewable")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Time)
|
||||
.HasColumnName("Time")
|
||||
.IsRequired();
|
||||
Property(t => t.OrgId)
|
||||
.HasColumnName("OrgId")
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class StockMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Stock>
|
||||
{
|
||||
public StockMap()
|
||||
{
|
||||
// table
|
||||
ToTable("Stock", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Name)
|
||||
.HasColumnName("Name")
|
||||
.HasMaxLength(500)
|
||||
.IsRequired();
|
||||
Property(t => t.Number)
|
||||
.HasColumnName("Number")
|
||||
.IsRequired();
|
||||
Property(t => t.Price)
|
||||
.HasColumnName("Price")
|
||||
.HasPrecision(10, 1)
|
||||
.IsRequired();
|
||||
Property(t => t.Status)
|
||||
.HasColumnName("Status")
|
||||
.IsRequired();
|
||||
Property(t => t.Viewable)
|
||||
.HasColumnName("Viewable")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.User)
|
||||
.HasColumnName("User")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Time)
|
||||
.HasColumnName("Time")
|
||||
.IsRequired();
|
||||
Property(t => t.OrgId)
|
||||
.HasColumnName("OrgId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,15 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class UserMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<User>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.User>
|
||||
{
|
||||
public UserMap()
|
||||
{
|
||||
@@ -22,11 +21,12 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
ToTable("User", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey<Guid>(t => t.Id);
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Account)
|
||||
.HasColumnName("Account")
|
||||
@@ -58,6 +58,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.IsRequired();
|
||||
Property(t => t.CrateId)
|
||||
.HasColumnName("CrateId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
|
||||
@@ -1,96 +1,101 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFFrmMainMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFFrmMain>
|
||||
{
|
||||
public WFFrmMainMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_FrmMain", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.FrmCode)
|
||||
.HasColumnName("FrmCode")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmName)
|
||||
.HasColumnName("FrmName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmType)
|
||||
.HasColumnName("FrmType")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmDbId)
|
||||
.HasColumnName("FrmDbId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmTable)
|
||||
.HasColumnName("FrmTable")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.IsSystemTable)
|
||||
.HasColumnName("isSystemTable")
|
||||
.IsOptional();
|
||||
Property(t => t.FrmTableId)
|
||||
.HasColumnName("FrmTableId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmContent)
|
||||
.HasColumnName("FrmContent")
|
||||
.IsOptional();
|
||||
Property(t => t.SortCode)
|
||||
.HasColumnName("SortCode")
|
||||
.IsOptional();
|
||||
Property(t => t.DeleteMark)
|
||||
.HasColumnName("DeleteMark")
|
||||
.IsOptional();
|
||||
Property(t => t.EnabledMark)
|
||||
.HasColumnName("EnabledMark")
|
||||
.IsOptional();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyDate)
|
||||
.HasColumnName("ModifyDate")
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyUserId)
|
||||
.HasColumnName("ModifyUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyUserName)
|
||||
.HasColumnName("ModifyUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFFrmMainMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFFrmMain>
|
||||
{
|
||||
public WFFrmMainMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_FrmMain", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.FrmCode)
|
||||
.HasColumnName("FrmCode")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmName)
|
||||
.HasColumnName("FrmName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmType)
|
||||
.HasColumnName("FrmType")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmTable)
|
||||
.HasColumnName("FrmTable")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmTableId)
|
||||
.HasColumnName("FrmTableId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.IsSystemTable)
|
||||
.HasColumnName("isSystemTable")
|
||||
.IsOptional();
|
||||
Property(t => t.FrmContent)
|
||||
.HasColumnName("FrmContent")
|
||||
.HasMaxLength(16)
|
||||
.IsOptional();
|
||||
Property(t => t.SortCode)
|
||||
.HasColumnName("SortCode")
|
||||
.IsOptional();
|
||||
Property(t => t.DeleteMark)
|
||||
.HasColumnName("DeleteMark")
|
||||
.IsOptional();
|
||||
Property(t => t.FrmDbId)
|
||||
.HasColumnName("FrmDbId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.EnabledMark)
|
||||
.HasColumnName("EnabledMark")
|
||||
.IsOptional();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyDate)
|
||||
.HasColumnName("ModifyDate")
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyUserId)
|
||||
.HasColumnName("ModifyUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyUserName)
|
||||
.HasColumnName("ModifyUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,92 +1,97 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFProcessInstanceMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFProcessInstance>
|
||||
{
|
||||
public WFProcessInstanceMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_ProcessInstance", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.Code)
|
||||
.HasColumnName("Code")
|
||||
.HasMaxLength(200)
|
||||
.IsRequired();
|
||||
Property(t => t.CustomName)
|
||||
.HasColumnName("CustomName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.ActivityId)
|
||||
.HasColumnName("ActivityId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.ActivityType)
|
||||
.HasColumnName("ActivityType")
|
||||
.IsRequired();
|
||||
Property(t => t.ActivityName)
|
||||
.HasColumnName("ActivityName")
|
||||
.HasMaxLength(200)
|
||||
.IsRequired();
|
||||
Property(t => t.PreviousId)
|
||||
.HasColumnName("PreviousId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ProcessSchemeId)
|
||||
.HasColumnName("ProcessSchemeId")
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeType)
|
||||
.HasColumnName("SchemeType")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.FrmType)
|
||||
.HasColumnName("FrmType")
|
||||
.IsOptional();
|
||||
Property(t => t.EnabledMark)
|
||||
.HasColumnName("EnabledMark")
|
||||
.IsRequired();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.WfLevel)
|
||||
.HasColumnName("wfLevel")
|
||||
.IsOptional();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.IsFinish)
|
||||
.HasColumnName("isFinish")
|
||||
.IsOptional();
|
||||
Property(t => t.MakerList)
|
||||
.HasColumnName("MakerList")
|
||||
.HasMaxLength(1000)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFProcessInstanceMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFProcessInstance>
|
||||
{
|
||||
public WFProcessInstanceMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_ProcessInstance", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Code)
|
||||
.HasColumnName("Code")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.CustomName)
|
||||
.HasColumnName("CustomName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.ActivityId)
|
||||
.HasColumnName("ActivityId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ActivityType)
|
||||
.HasColumnName("ActivityType")
|
||||
.IsOptional();
|
||||
Property(t => t.ActivityName)
|
||||
.HasColumnName("ActivityName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.ProcessSchemeId)
|
||||
.HasColumnName("ProcessSchemeId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.PreviousId)
|
||||
.HasColumnName("PreviousId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FrmType)
|
||||
.HasColumnName("FrmType")
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeType)
|
||||
.HasColumnName("SchemeType")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.EnabledMark)
|
||||
.HasColumnName("EnabledMark")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.WfLevel)
|
||||
.HasColumnName("wfLevel")
|
||||
.IsOptional();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.IsFinish)
|
||||
.HasColumnName("isFinish")
|
||||
.IsOptional();
|
||||
Property(t => t.MakerList)
|
||||
.HasColumnName("MakerList")
|
||||
.HasMaxLength(1000)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +1,54 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFProcessOperationHistoryMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFProcessOperationHistory>
|
||||
{
|
||||
public WFProcessOperationHistoryMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_ProcessOperationHistory", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.ProcessId)
|
||||
.HasColumnName("ProcessId")
|
||||
.IsRequired();
|
||||
Property(t => t.Content)
|
||||
.HasColumnName("Content")
|
||||
.HasMaxLength(200)
|
||||
.IsRequired();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFProcessOperationHistoryMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFProcessOperationHistory>
|
||||
{
|
||||
public WFProcessOperationHistoryMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_ProcessOperationHistory", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.ProcessId)
|
||||
.HasColumnName("ProcessId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Content)
|
||||
.HasColumnName("Content")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,44 +1,49 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFProcessSchemeMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFProcessScheme>
|
||||
{
|
||||
public WFProcessSchemeMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_ProcessScheme", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeContent)
|
||||
.HasColumnName("SchemeContent")
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeInfoId)
|
||||
.HasColumnName("SchemeInfoId")
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeVersion)
|
||||
.HasColumnName("SchemeVersion")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.ProcessType)
|
||||
.HasColumnName("ProcessType")
|
||||
.IsRequired();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFProcessSchemeMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFProcessScheme>
|
||||
{
|
||||
public WFProcessSchemeMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_ProcessScheme", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeContent)
|
||||
.HasColumnName("SchemeContent")
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeInfoId)
|
||||
.HasColumnName("SchemeInfoId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeVersion)
|
||||
.HasColumnName("SchemeVersion")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ProcessType)
|
||||
.HasColumnName("ProcessType")
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,73 +1,78 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFProcessTransitionHistoryMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFProcessTransitionHistory>
|
||||
{
|
||||
public WFProcessTransitionHistoryMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_ProcessTransitionHistory", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.ProcessId)
|
||||
.HasColumnName("ProcessId")
|
||||
.IsRequired();
|
||||
Property(t => t.FromNodeId)
|
||||
.HasColumnName("fromNodeId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.FromNodeType)
|
||||
.HasColumnName("fromNodeType")
|
||||
.IsOptional();
|
||||
Property(t => t.FromNodeName)
|
||||
.HasColumnName("fromNodeName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.ToNodeId)
|
||||
.HasColumnName("toNodeId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.ToNodeType)
|
||||
.HasColumnName("toNodeType")
|
||||
.IsOptional();
|
||||
Property(t => t.ToNodeName)
|
||||
.HasColumnName("toNodeName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.TransitionSate)
|
||||
.HasColumnName("TransitionSate")
|
||||
.IsRequired();
|
||||
Property(t => t.IsFinish)
|
||||
.HasColumnName("isFinish")
|
||||
.IsRequired();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFProcessTransitionHistoryMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFProcessTransitionHistory>
|
||||
{
|
||||
public WFProcessTransitionHistoryMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_ProcessTransitionHistory", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.ProcessId)
|
||||
.HasColumnName("ProcessId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.FromNodeId)
|
||||
.HasColumnName("fromNodeId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.FromNodeType)
|
||||
.HasColumnName("fromNodeType")
|
||||
.IsOptional();
|
||||
Property(t => t.FromNodeName)
|
||||
.HasColumnName("fromNodeName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.ToNodeId)
|
||||
.HasColumnName("toNodeId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ToNodeType)
|
||||
.HasColumnName("toNodeType")
|
||||
.IsOptional();
|
||||
Property(t => t.ToNodeName)
|
||||
.HasColumnName("toNodeName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.TransitionSate)
|
||||
.HasColumnName("TransitionSate")
|
||||
.IsOptional();
|
||||
Property(t => t.IsFinish)
|
||||
.HasColumnName("isFinish")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,52 +1,57 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFSchemeContentMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFSchemeContent>
|
||||
{
|
||||
public WFSchemeContentMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_SchemeContent", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeInfoId)
|
||||
.HasColumnName("SchemeInfoId")
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeVersion)
|
||||
.HasColumnName("SchemeVersion")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeContent)
|
||||
.HasColumnName("SchemeContent")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFSchemeContentMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFSchemeContent>
|
||||
{
|
||||
public WFSchemeContentMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_SchemeContent", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeInfoId)
|
||||
.HasColumnName("SchemeInfoId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeVersion)
|
||||
.HasColumnName("SchemeVersion")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeContent)
|
||||
.HasColumnName("SchemeContent")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,91 +1,95 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFSchemeInfoMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFSchemeInfo>
|
||||
{
|
||||
public WFSchemeInfoMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_SchemeInfo", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeCode)
|
||||
.HasColumnName("SchemeCode")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeName)
|
||||
.HasColumnName("SchemeName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeType)
|
||||
.HasColumnName("SchemeType")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeVersion)
|
||||
.HasColumnName("SchemeVersion")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeCanUser)
|
||||
.HasColumnName("SchemeCanUser")
|
||||
.IsOptional();
|
||||
Property(t => t.FrmType)
|
||||
.HasColumnName("FrmType")
|
||||
.IsOptional();
|
||||
Property(t => t.AuthorizeType)
|
||||
.HasColumnName("AuthorizeType")
|
||||
.IsOptional();
|
||||
Property(t => t.SortCode)
|
||||
.HasColumnName("SortCode")
|
||||
.IsOptional();
|
||||
Property(t => t.DeleteMark)
|
||||
.HasColumnName("DeleteMark")
|
||||
.IsRequired();
|
||||
Property(t => t.EnabledMark)
|
||||
.HasColumnName("EnabledMark")
|
||||
.IsRequired();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.ModifyDate)
|
||||
.HasColumnName("ModifyDate")
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyUserId)
|
||||
.HasColumnName("ModifyUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyUserName)
|
||||
.HasColumnName("ModifyUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class WFSchemeInfoMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.WFSchemeInfo>
|
||||
{
|
||||
public WFSchemeInfoMap()
|
||||
{
|
||||
// table
|
||||
ToTable("WF_SchemeInfo", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeCode)
|
||||
.HasColumnName("SchemeCode")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeName)
|
||||
.HasColumnName("SchemeName")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeType)
|
||||
.HasColumnName("SchemeType")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeVersion)
|
||||
.HasColumnName("SchemeVersion")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeCanUser)
|
||||
.HasColumnName("SchemeCanUser")
|
||||
.IsOptional();
|
||||
Property(t => t.FrmType)
|
||||
.HasColumnName("FrmType")
|
||||
.IsOptional();
|
||||
Property(t => t.AuthorizeType)
|
||||
.HasColumnName("AuthorizeType")
|
||||
.IsOptional();
|
||||
Property(t => t.SortCode)
|
||||
.HasColumnName("SortCode")
|
||||
.IsOptional();
|
||||
Property(t => t.DeleteMark)
|
||||
.HasColumnName("DeleteMark")
|
||||
.IsOptional();
|
||||
Property(t => t.EnabledMark)
|
||||
.HasColumnName("EnabledMark")
|
||||
.IsOptional();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyDate)
|
||||
.HasColumnName("ModifyDate")
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyUserId)
|
||||
.HasColumnName("ModifyUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyUserName)
|
||||
.HasColumnName("ModifyUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Collections.Generic;
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Repository.Models.Mapping;
|
||||
|
||||
@@ -27,9 +28,9 @@ namespace OpenAuth.Repository.Models
|
||||
: base(nameOrConnectionString)
|
||||
{ }
|
||||
|
||||
public System.Data.Entity.DbSet<Application> Applications { get; set; }
|
||||
public System.Data.Entity.DbSet<Category> Categories { get; set; }
|
||||
public System.Data.Entity.DbSet<DicDetail> DicDetails { get; set; }
|
||||
public System.Data.Entity.DbSet<DicIndex> DicIndices { get; set; }
|
||||
public System.Data.Entity.DbSet<CategoryType> CategoryTypes { get; set; }
|
||||
public System.Data.Entity.DbSet<Module> Modules { get; set; }
|
||||
public System.Data.Entity.DbSet<ModuleElement> ModuleElements { get; set; }
|
||||
public System.Data.Entity.DbSet<Org> Orgs { get; set; }
|
||||
@@ -48,9 +49,9 @@ namespace OpenAuth.Repository.Models
|
||||
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Configurations.Add(new ApplicationMap());
|
||||
modelBuilder.Configurations.Add(new CategoryMap());
|
||||
modelBuilder.Configurations.Add(new DicDetailMap());
|
||||
modelBuilder.Configurations.Add(new DicIndexMap());
|
||||
modelBuilder.Configurations.Add(new CategoryTypeMap());
|
||||
modelBuilder.Configurations.Add(new ModuleMap());
|
||||
modelBuilder.Configurations.Add(new ModuleElementMap());
|
||||
modelBuilder.Configurations.Add(new OrgMap());
|
||||
@@ -66,6 +67,7 @@ namespace OpenAuth.Repository.Models
|
||||
modelBuilder.Configurations.Add(new WFProcessTransitionHistoryMap());
|
||||
modelBuilder.Configurations.Add(new WFSchemeContentMap());
|
||||
modelBuilder.Configurations.Add(new WFSchemeInfoMap());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,30 +13,30 @@ namespace OpenAuth.Repository
|
||||
return Context.Modules.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public int GetRoleCntInOrgs(params Guid[] orgIds)
|
||||
public int GetRoleCntInOrgs(params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).Count();
|
||||
}
|
||||
|
||||
public int GetModuleCntInOrgs(params Guid[] orgIds)
|
||||
public int GetModuleCntInOrgs(params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).Count();
|
||||
}
|
||||
|
||||
|
||||
public IEnumerable<Module> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Module> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public void Delete(Guid id)
|
||||
public void Delete(string id)
|
||||
{
|
||||
Delete(u =>u.Id == id);
|
||||
}
|
||||
|
||||
public IEnumerable<Module> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Module> LoadInOrgs(params string[] orgId)
|
||||
{
|
||||
var result = from role in Context.Modules.Where(u =>u.ParentId != null && orgId.Contains(u.ParentId.Value)) select role;
|
||||
var result = from role in Context.Modules.Where(u =>u.ParentId != null && orgId.Contains(u.ParentId)) select role;
|
||||
|
||||
return result;
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Models\Mapping\ApplicationMap.cs" />
|
||||
<Compile Include="Models\Mapping\CategoryTypeMap.cs" />
|
||||
<Compile Include="Models\Mapping\WFFrmMainMap.cs" />
|
||||
<Compile Include="Models\Mapping\WFProcessInstanceMap.cs" />
|
||||
<Compile Include="Models\Mapping\WFProcessOperationHistoryMap.cs" />
|
||||
@@ -65,8 +67,6 @@
|
||||
<Compile Include="UnitWork.cs" />
|
||||
<Compile Include="BaseRepository.cs" />
|
||||
<Compile Include="Models\Mapping\CategoryMap.cs" />
|
||||
<Compile Include="Models\Mapping\DicDetailMap.cs" />
|
||||
<Compile Include="Models\Mapping\DicIndexMap.cs" />
|
||||
<Compile Include="Models\Mapping\ModuleElementMap.cs" />
|
||||
<Compile Include="Models\Mapping\ModuleMap.cs" />
|
||||
<Compile Include="Models\Mapping\OrgMap.cs" />
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenAuth.Repository
|
||||
/// <summary>
|
||||
/// 加载用户的所有机构
|
||||
/// </summary>
|
||||
public IEnumerable<Org> LoadByUser(Guid userId)
|
||||
public IEnumerable<Org> LoadByUser(string userId)
|
||||
{
|
||||
var result = from userorg in Context.Relevances
|
||||
join org in Context.Orgs on userorg.SecondId equals org.Id
|
||||
@@ -31,7 +31,7 @@ namespace OpenAuth.Repository
|
||||
/// <summary>
|
||||
/// 加载角色的所有机构
|
||||
/// </summary>
|
||||
public IEnumerable<Org> LoadByRole(Guid roleId)
|
||||
public IEnumerable<Org> LoadByRole(string roleId)
|
||||
{
|
||||
var result = from userorg in Context.Relevances
|
||||
join org in Context.Orgs on userorg.SecondId equals org.Id
|
||||
@@ -41,10 +41,10 @@ namespace OpenAuth.Repository
|
||||
|
||||
}
|
||||
|
||||
public IEnumerable<Org> GetSubOrgs(Guid orgId)
|
||||
public IEnumerable<Org> GetSubOrgs(string orgId)
|
||||
{
|
||||
string cascadeId = "0.";
|
||||
if (orgId != Guid.Empty)
|
||||
if (orgId != string.Empty)
|
||||
{
|
||||
var org = FindSingle(u => u.Id == orgId);
|
||||
if (org == null)
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace OpenAuth.Repository
|
||||
{
|
||||
public class RelevanceRepository : BaseRepository<Relevance>, IRelevanceRepository
|
||||
{
|
||||
public void DeleteBy(string key, params Guid[] firstIds)
|
||||
public void DeleteBy(string key, params string[] firstIds)
|
||||
{
|
||||
Delete(u => firstIds.Contains(u.FirstId) && u.Key == key);
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace OpenAuth.Repository
|
||||
/// </summary>
|
||||
/// <param name="key">关联标识</param>
|
||||
/// <param name="idMaps">关联的<firstId, secondId>数组</param>
|
||||
public void DeleteBy(string key, ILookup<Guid, Guid> idMaps)
|
||||
public void DeleteBy(string key, ILookup<string, string> idMaps)
|
||||
{
|
||||
foreach (var sameVals in idMaps)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ namespace OpenAuth.Repository
|
||||
/// </summary>
|
||||
/// <param name="key">关联标识</param>
|
||||
/// <param name="idMaps">关联的<firstId, secondId>数组</param>
|
||||
public void AddRelevance(string key, ILookup<Guid, Guid> idMaps)
|
||||
public void AddRelevance(string key, ILookup<string, string> idMaps)
|
||||
{
|
||||
DeleteBy(key, idMaps);
|
||||
BatchAdd((from sameVals in idMaps
|
||||
|
||||
@@ -8,21 +8,21 @@ namespace OpenAuth.Repository
|
||||
{
|
||||
public class ResourceRepository : BaseRepository<Resource>, IResourceRepository
|
||||
{
|
||||
public IEnumerable<Resource> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Resource> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public void Delete(Guid id)
|
||||
public void Delete(string id)
|
||||
{
|
||||
Delete(u => u.Id == id);
|
||||
}
|
||||
|
||||
public IEnumerable<Resource> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Resource> LoadInOrgs(params string[] orgId)
|
||||
{
|
||||
bool isZero = orgId.Length == 1 && orgId[0] == Guid.Empty; //判断传进来的是否为0
|
||||
bool isZero = orgId.Length == 1 && orgId[0] == string.Empty; //判断传进来的是否为0
|
||||
var result = from resource in Context.Resources.Where(u =>isZero
|
||||
|| u.CascadeId != null &&orgId.Contains(u.CategoryId.Value)) select resource;
|
||||
|| u.CascadeId != null &&orgId.Contains(u.CategoryId)) select resource;
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -32,7 +32,7 @@ namespace OpenAuth.Repository
|
||||
return Context.Resources.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public int GetResourceCntInOrgs(params Guid[] orgIds)
|
||||
public int GetResourceCntInOrgs(params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).Count();
|
||||
}
|
||||
|
||||
@@ -15,22 +15,22 @@ namespace OpenAuth.Repository
|
||||
return Context.Roles.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public int GetRoleCntInOrgs(params Guid[] orgIds)
|
||||
public int GetRoleCntInOrgs(params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).Count();
|
||||
}
|
||||
|
||||
public IEnumerable<Role> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Role> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public void Delete(Guid id)
|
||||
public void Delete(string id)
|
||||
{
|
||||
Delete(u =>u.Id == id);
|
||||
}
|
||||
|
||||
public IEnumerable<Role> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Role> LoadInOrgs(params string[] orgId)
|
||||
{
|
||||
var roles = Context.Relevances.Where(u => u.Key == "RoleOrg"
|
||||
&& orgId.Contains(u.SecondId)).Select(u => u.FirstId); //机构关联的角色
|
||||
@@ -41,10 +41,10 @@ namespace OpenAuth.Repository
|
||||
|
||||
}
|
||||
|
||||
public IEnumerable<Role> LoadForUser(Guid userId)
|
||||
public IEnumerable<Role> LoadForUser(string userId)
|
||||
{
|
||||
|
||||
if (userId == Guid.Empty)
|
||||
if (userId == string.Empty)
|
||||
return Find(null);
|
||||
|
||||
var userRoleIds =
|
||||
|
||||
@@ -14,25 +14,25 @@ namespace OpenAuth.Repository
|
||||
return Context.Stocks.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public IEnumerable<Stock> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Stock> LoadInOrgs(params string[] orgId)
|
||||
{
|
||||
var result = from stock in Context.Stocks where stock.OrgId != null && orgId.Contains(stock.OrgId.Value)
|
||||
var result = from stock in Context.Stocks where stock.OrgId != null && orgId.Contains(stock.OrgId)
|
||||
select stock;
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
public int GetStockCntInOrgs(params Guid[] orgIds)
|
||||
public int GetStockCntInOrgs(params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).Count();
|
||||
}
|
||||
|
||||
public IEnumerable<Stock> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Stock> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).OrderBy(u =>u.Id).Skip((pageindex -1)*pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public void Delete(Guid id)
|
||||
public void Delete(string id)
|
||||
{
|
||||
Delete(u =>u.Id == id);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace OpenAuth.Repository
|
||||
|
||||
public void Add<T>(T entity) where T : Domain.Entity
|
||||
{
|
||||
entity.Id = Guid.NewGuid();
|
||||
entity.Id = Guid.NewGuid().ToString();
|
||||
Context.Set<T>().Add(entity);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace OpenAuth.Repository
|
||||
{
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
entity.Id = Guid.NewGuid();
|
||||
entity.Id = Guid.NewGuid().ToString();
|
||||
}
|
||||
Context.Set<T>().AddRange(entities);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenAuth.Repository
|
||||
return Context.Users.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public IEnumerable<User> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<User> LoadInOrgs(params string[] orgId)
|
||||
{
|
||||
var result = from user in Context.Users
|
||||
where (
|
||||
@@ -32,12 +32,12 @@ namespace OpenAuth.Repository
|
||||
|
||||
}
|
||||
|
||||
public int GetUserCntInOrgs(params Guid[] orgIds)
|
||||
public int GetUserCntInOrgs(params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).Count();
|
||||
}
|
||||
|
||||
public IEnumerable<User> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<User> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).OrderBy(u =>u.Id).Skip((pageindex -1)*pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user