OpenAuth.Net/OpenAuth.Repository/Mapping/CategoryMap.cs

58 lines
1.8 KiB
C#
Raw Normal View History

//------------------------------------------------------------------------------
// <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>
//------------------------------------------------------------------------------
2017-10-11 16:19:34 +08:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
2015-12-14 21:39:39 +08:00
2017-11-29 20:49:14 +08:00
namespace OpenAuth.Repository.Mapping
2015-12-14 21:39:39 +08:00
{
public partial class CategoryMap
2017-11-29 20:49:14 +08:00
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Repository.Domain.Category>
2015-12-14 21:39:39 +08:00
{
public CategoryMap()
{
// table
ToTable("Category", "dbo");
2015-12-14 21:39:39 +08:00
// keys
HasKey(t => t.Id);
2015-12-14 21:39:39 +08:00
// Properties
Property(t => t.Id)
.HasColumnName("Id")
2017-10-11 16:19:34 +08:00
.HasMaxLength(50)
.IsRequired();
Property(t => t.Name)
.HasColumnName("Name")
.HasMaxLength(255)
.IsRequired();
2017-11-29 20:49:14 +08:00
Property(t => t.Disabled)
.HasColumnName("Disabled")
.IsRequired();
Property(t => t.SortNo)
.HasColumnName("SortNo")
.IsRequired();
2017-11-29 20:49:14 +08:00
Property(t => t.Icon)
.HasColumnName("Icon")
.HasMaxLength(255)
.IsOptional();
Property(t => t.Description)
.HasColumnName("Description")
.HasMaxLength(500)
.IsOptional();
2017-10-11 16:19:34 +08:00
Property(t => t.TypeId)
.HasColumnName("TypeId")
.HasMaxLength(50)
.IsOptional();
2015-12-14 21:39:39 +08:00
// Relationships
2015-12-14 21:39:39 +08:00
}
}
}