mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-02-15 21:06:32 +08:00
全面修改Id为Guid类型,为2.0版做准备
This commit is contained in:
@@ -1,45 +1,66 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity.ModelConfiguration;
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 OpenAuth.Domain;
|
||||
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public class UserMap : EntityTypeConfiguration<User>
|
||||
public partial class UserMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<User>
|
||||
{
|
||||
public UserMap()
|
||||
{
|
||||
// Primary Key
|
||||
this.HasKey(t => t.Id);
|
||||
// table
|
||||
ToTable("User", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey<Guid>(t => t.Id);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Account)
|
||||
.IsRequired()
|
||||
.HasMaxLength(255);
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.IsRequired();
|
||||
Property(t => t.Account)
|
||||
.HasColumnName("Account")
|
||||
.HasMaxLength(255)
|
||||
.IsRequired();
|
||||
Property(t => t.Password)
|
||||
.HasColumnName("Password")
|
||||
.HasMaxLength(255)
|
||||
.IsRequired();
|
||||
Property(t => t.Name)
|
||||
.HasColumnName("Name")
|
||||
.HasMaxLength(255)
|
||||
.IsRequired();
|
||||
Property(t => t.Sex)
|
||||
.HasColumnName("Sex")
|
||||
.IsRequired();
|
||||
Property(t => t.Status)
|
||||
.HasColumnName("Status")
|
||||
.IsRequired();
|
||||
Property(t => t.Type)
|
||||
.HasColumnName("Type")
|
||||
.IsRequired();
|
||||
Property(t => t.BizCode)
|
||||
.HasColumnName("BizCode")
|
||||
.HasMaxLength(255)
|
||||
.IsRequired();
|
||||
Property(t => t.CreateTime)
|
||||
.HasColumnName("CreateTime")
|
||||
.IsRequired();
|
||||
Property(t => t.CrateId)
|
||||
.HasColumnName("CrateId")
|
||||
.IsOptional();
|
||||
|
||||
this.Property(t => t.Password)
|
||||
.IsRequired()
|
||||
.HasMaxLength(255);
|
||||
|
||||
this.Property(t => t.Name)
|
||||
.IsRequired()
|
||||
.HasMaxLength(255);
|
||||
|
||||
this.Property(t => t.BizCode)
|
||||
.IsRequired()
|
||||
.HasMaxLength(255);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("User");
|
||||
this.Property(t => t.Id).HasColumnName("Id");
|
||||
this.Property(t => t.Account).HasColumnName("Account");
|
||||
this.Property(t => t.Password).HasColumnName("Password");
|
||||
this.Property(t => t.Name).HasColumnName("Name");
|
||||
this.Property(t => t.Sex).HasColumnName("Sex");
|
||||
this.Property(t => t.Status).HasColumnName("Status");
|
||||
this.Property(t => t.Type).HasColumnName("Type");
|
||||
this.Property(t => t.BizCode).HasColumnName("BizCode");
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime");
|
||||
this.Property(t => t.CreateId).HasColumnName("CreateId");
|
||||
// Relationships
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user