You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
315 lines
10 KiB
315 lines
10 KiB
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using PeacePDS.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace PeacePDS.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
[Migration("20241007071344_fix-createdat")]
|
|
partial class fixcreatedat
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.7")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|
|
|
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.Affirmation", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("AffirmationWord")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<DateTime>("Month")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Affirmations");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.DailyEntry", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Compliment")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<DateTime>("EntryDate")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("Gratitude")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Journal")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Reflection")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("DailyEntries");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.DailyTask", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<DateTime>("Date")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<bool>("IsCompleted")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("TaskName")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("DailyTasks");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.HabitCheck", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("CheckDate")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<int>("HabitTrackerId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("IsCompleted")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("HabitTrackerId");
|
|
|
|
b.ToTable("HabitChecks");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.HabitTracker", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("HabitName")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<DateTime>("Month")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("HabitTrackers");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("HashedPassword")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("varchar(100)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.UserPolicy", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<bool>("IsEnable")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("Policy")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("UserPolicies");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.Affirmation", b =>
|
|
{
|
|
b.HasOne("PeacePDS.Models.Entities.User", "User")
|
|
.WithMany("Affirmations")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.DailyEntry", b =>
|
|
{
|
|
b.HasOne("PeacePDS.Models.Entities.User", "User")
|
|
.WithMany("DailyEntries")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.DailyTask", b =>
|
|
{
|
|
b.HasOne("PeacePDS.Models.Entities.User", "User")
|
|
.WithMany("DailyTasks")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.HabitCheck", b =>
|
|
{
|
|
b.HasOne("PeacePDS.Models.Entities.HabitTracker", "HabitTracker")
|
|
.WithMany("HabitChecks")
|
|
.HasForeignKey("HabitTrackerId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("HabitTracker");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.HabitTracker", b =>
|
|
{
|
|
b.HasOne("PeacePDS.Models.Entities.User", "User")
|
|
.WithMany("HabitTrackers")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.UserPolicy", b =>
|
|
{
|
|
b.HasOne("PeacePDS.Models.Entities.User", "User")
|
|
.WithMany("UserPolicies")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.HabitTracker", b =>
|
|
{
|
|
b.Navigation("HabitChecks");
|
|
});
|
|
|
|
modelBuilder.Entity("PeacePDS.Models.Entities.User", b =>
|
|
{
|
|
b.Navigation("Affirmations");
|
|
|
|
b.Navigation("DailyEntries");
|
|
|
|
b.Navigation("DailyTasks");
|
|
|
|
b.Navigation("HabitTrackers");
|
|
|
|
b.Navigation("UserPolicies");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|
|
|