mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-08 18:34:44 +08:00
1 完成用户部门权限分配处理,可以为用户分配可见部门,如果没有任何可见部门,则只能查看自己有关的数据;
2 完善进出库实例; 3 添加CodeSmith生成EF DbContext Entity Mapping;
This commit is contained in:
55
OpenAuth.Repository/Models/Mapping/StockMap.cs
Normal file
55
OpenAuth.Repository/Models/Mapping/StockMap.cs
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user