1 完成用户部门权限分配处理,可以为用户分配可见部门,如果没有任何可见部门,则只能查看自己有关的数据;

2 完善进出库实例;
3 添加CodeSmith生成EF DbContext Entity Mapping;
This commit is contained in:
yubaolee
2016-01-07 11:47:43 +08:00
parent c2099cd337
commit f0b42e83d4
62 changed files with 5687 additions and 1592 deletions

View File

@@ -0,0 +1,55 @@
//------------------------------------------------------------------------------
// <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")
.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.User)
.HasColumnName("User")
.HasMaxLength(50)
.IsRequired();
Property(t => t.Time)
.HasColumnName("Time")
.IsRequired();
// Relationships
}
}
}

View File

@@ -16,7 +16,7 @@ namespace OpenAuth.Repository.Models.Mapping
.IsRequired()
.HasMaxLength(255);
this.Property(t => t.Phone_)
this.Property(t => t.Phone)
.IsRequired()
.HasMaxLength(255);
@@ -40,7 +40,7 @@ namespace OpenAuth.Repository.Models.Mapping
.IsRequired()
.HasMaxLength(255);
this.Property(t => t.QQ)
this.Property(t => t.Qq)
.IsRequired()
.HasMaxLength(255);
@@ -68,13 +68,13 @@ namespace OpenAuth.Repository.Models.Mapping
this.ToTable("UserExt");
this.Property(t => t.Id).HasColumnName("Id");
this.Property(t => t.Email).HasColumnName("Email");
this.Property(t => t.Phone_).HasColumnName("Phone_");
this.Property(t => t.Phone).HasColumnName("Phone_");
this.Property(t => t.Mobile).HasColumnName("Mobile");
this.Property(t => t.Address).HasColumnName("Address");
this.Property(t => t.Zip).HasColumnName("Zip");
this.Property(t => t.Birthday).HasColumnName("Birthday");
this.Property(t => t.IdCard).HasColumnName("IdCard");
this.Property(t => t.QQ).HasColumnName("QQ");
this.Property(t => t.Qq).HasColumnName("QQ");
this.Property(t => t.DynamicField).HasColumnName("DynamicField");
this.Property(t => t.ByteArrayId).HasColumnName("ByteArrayId");
this.Property(t => t.Remark).HasColumnName("Remark");

View File

@@ -31,6 +31,8 @@ namespace OpenAuth.Repository.Models
public DbSet<UserCfg> UserCfgs { get; set; }
public DbSet<UserExt> UserExts { get; set; }
public DbSet<Stock> Stocks { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Configurations.Add(new CategoryMap());
@@ -46,6 +48,8 @@ namespace OpenAuth.Repository.Models
modelBuilder.Configurations.Add(new UserMap());
modelBuilder.Configurations.Add(new UserCfgMap());
modelBuilder.Configurations.Add(new UserExtMap());
modelBuilder.Configurations.Add(new StockMap());
}
}
}