OpenAuth.Net/OpenAuth.Repository/Mapping/ApplicationMap.cs
2018-04-14 15:21:09 +08:00

62 lines
2.0 KiB
C#

//------------------------------------------------------------------------------
// <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.Mapping
{
public partial class ApplicationMap
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Repository.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.AppSecret)
.HasColumnName("AppSecret")
.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")
.IsRequired();
Property(t => t.CreateUser)
.HasColumnName("CreateUser")
.HasMaxLength(50)
.IsOptional();
// Relationships
}
}
}