using Hncore.Infrastructure.EF;
using Hncore.Pass.Manage.Domain;
using Hncore.Pass.Manage.Request;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Hncore.Pass.Manage.Repository.Map
{
    /// <summary>
    /// 管理员项目映射实体表映射类
    /// </summary>
    ///
    public class ManagerMap : EntityMapBase<Manager>
    {
        /// <summary>
        /// 映射方法
        /// </summary>
        /// <param name="builder">实体模型构建器</param>
        ///
        public override void Map(EntityTypeBuilder<Manager> builder)
        {
            builder.ToTable("manager");//指定表名

            builder.HasKey(t => t.Id); //指定主键
            builder.Property(t => t.Id).HasColumnName("id").ValueGeneratedOnAdd(); //指定主键在创建的时候自动生成    
        }
    }
}
