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 ManagerTagMap : EntityMapBase<ManagerTag>
    {
        /// <summary>
        /// 映射方法
        /// </summary>
        /// <param name="builder">实体模型构建器</param>
        ///
        public override void Map(EntityTypeBuilder<ManagerTag> builder)
        {
            builder.ToTable("etor_authority_managertag");//指定表名

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

            builder.Property(t => t.OwnerId).HasColumnName("owner_id");//所属物业ID
            builder.Property(t => t.CreateTime).HasColumnName("createtime");//创建时间
            builder.Property(t => t.UpdateTime).HasColumnName("updatetime");//更新时间
            builder.Property(t => t.CreatorId).HasColumnName("creatorid");//创建人ID
            builder.Property(t => t.UpdatorId).HasColumnName("updatorid");//更新人ID
            builder.Property(t => t.DeleteTag).HasColumnName("deletetag");//软删除标记

            builder.Property(t => t.ManagerId).HasColumnName("managerid");//管理员id
            builder.Property(t => t.Tag).HasColumnName("tag");//管理员标签
            builder.Property(t => t.TagType).HasColumnName("tagtype");//管理员标签
          

        }
    }
}
