//
using System;
using FindAndDrive.Persistence;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace FindAndDrive.Persistence.Migrations
{
[DbContext(typeof(DefaultContext))]
[Migration("20230206200652_InitialMigration")]
partial class InitialMigration
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.13")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("FindAndDrive.Domain.Models.Entities.ApiKey", b =>
{
b.Property("ApiKeyId")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ClientId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedAt")
.HasColumnType("datetime2");
b.Property("KeySecretHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("ModifiedAt")
.HasColumnType("datetime2");
b.Property("Revoked")
.HasColumnType("bit");
b.Property("RoleId")
.HasColumnType("uniqueidentifier");
b.HasKey("ApiKeyId");
b.ToTable("ApiKeys");
});
modelBuilder.Entity("FindAndDrive.Domain.Models.Entities.Client", b =>
{
b.Property("ClientId")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Active")
.HasColumnType("bit");
b.Property("ClientName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CreatedAt")
.HasColumnType("datetime2");
b.Property("ModifiedAt")
.HasColumnType("datetime2");
b.HasKey("ClientId");
b.ToTable("Clients");
});
modelBuilder.Entity("FindAndDrive.Domain.Models.Entities.Role", b =>
{
b.Property("RoleId")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreatedAt")
.HasColumnType("datetime2");
b.Property("ModifiedAt")
.HasColumnType("datetime2");
b.Property("Permissions")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("RoleName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("RoleId");
b.ToTable("Roles");
});
#pragma warning restore 612, 618
}
}
}