﻿//------------------------------------------------------------------------------
// <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 Microsoft.EntityFrameworkCore;


namespace Petshop.Data.Mapping
{
    public partial class ProfileMap
        : Microsoft.EntityFrameworkCore.IEntityTypeConfiguration<Petshop.Data.Entities.Profile>
    {
        public void Configure(Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<Petshop.Data.Entities.Profile> builder)
        {
            // table
            builder.ToTable("Profile", "dbo");

            // keys
            builder.HasKey(t => t.UserId);

            // Properties
            builder.Property(t => t.UserId)
                .IsRequired()
                .HasColumnName("UserId")
                .HasColumnType("varchar")
                .HasMaxLength(20)
                .ValueGeneratedNever();
            builder.Property(t => t.LangPref)
                .IsRequired()
                .HasColumnName("LangPref")
                .HasColumnType("varchar")
                .HasMaxLength(80);
            builder.Property(t => t.FavCategory)
                .HasColumnName("FavCategory")
                .HasColumnType("varchar")
                .HasMaxLength(30);
            builder.Property(t => t.MyListOpt)
                .HasColumnName("MyListOpt")
                .HasColumnType("int");
            builder.Property(t => t.BannerOpt)
                .HasColumnName("BannerOpt")
                .HasColumnType("int");

            // Relationships

            InitializeMapping(builder);
        }

        partial void InitializeMapping(Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<Petshop.Data.Entities.Profile> builder);

    }
}
