//
using System;
using DamageAssesment.Api.UsersAccess.Db;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace DamageAssesment.Api.UsersAccess.Migrations
{
[DbContext(typeof(UsersAccessDbContext))]
[Migration("20230929161148_AzureUserAccess")]
partial class AzureUserAccess
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("DamageAssesment.Api.UsersAccess.Db.Role", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Description")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.HasKey("Id");
b.ToTable("Roles");
});
modelBuilder.Entity("DamageAssesment.Api.UsersAccess.Db.Token", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("IsActive")
.HasColumnType("bit");
b.Property("RefreshToken")
.HasColumnType("nvarchar(max)");
b.Property("UserId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("Tokens");
});
modelBuilder.Entity("DamageAssesment.Api.UsersAccess.Db.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CreateDate")
.HasColumnType("datetime2");
b.Property("EmployeeCode")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("EmployeeId")
.HasColumnType("int");
b.Property("IsActive")
.HasColumnType("bit");
b.Property("RoleId")
.HasColumnType("int");
b.Property("UpdateDate")
.HasColumnType("datetime2");
b.HasKey("Id");
b.ToTable("Users");
});
#pragma warning restore 612, 618
}
}
}