//
using System;
using Aeldria.Api.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Aeldria.Api.Migrations
{
[DbContext(typeof(AeldriaDbContext))]
[Migration("20260623072757_InitialCreate")]
partial class InitialCreate
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.6")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Aeldria.Api.Models.Account", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("Email")
.IsRequired()
.HasColumnType("text");
b.Property("PasswordHash")
.IsRequired()
.HasColumnType("text");
b.Property("Username")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Accounts");
});
modelBuilder.Entity("Aeldria.Api.Models.Character", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("AccountId")
.HasColumnType("integer");
b.Property("Experience")
.HasColumnType("integer");
b.Property("Level")
.HasColumnType("integer");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Characters");
});
#pragma warning restore 612, 618
}
}
}