reworked Model

This commit is contained in:
t.ruspekhofer 2022-02-22 00:28:48 +01:00
parent 15608f0e31
commit 04049f31f6
12 changed files with 34 additions and 48 deletions

View file

@ -1,11 +1,8 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Lieb.Models;
using Lieb.Models.Raid;
using Lieb.Models.GuildWars2;
using Lieb.Models.GuildWars2.Raid;
using Microsoft.EntityFrameworkCore;
namespace Lieb.Data
{
@ -19,28 +16,24 @@ namespace Lieb.Data
public DbSet<LiebUser> Users { get; set; }
public DbSet<GuildWars2Account> GuildWars2Account { get; set; }
public DbSet<Equipped> Equipped { get; set; }
public DbSet<RaidRole> RaidRoles { get; set; }
public DbSet<PlannedRaid> PlannedRaids { get; set; }
public DbSet<GuildWars2Build> RaidRoles { get; set; }
public DbSet<PlannedRaidRole> PlannedRaidRoles { get; set; }
public DbSet<Raid> Raids { get; set; }
public DbSet<RaidReminder> RaidReminders { get; set; }
public DbSet<RaidSignUp> RaidSignUps { get; set; }
public DbSet<RandomRaid> RandomRaids { get; set; }
public DbSet<SignUpHistory> SignUpHistories { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<LiebUser>().ToTable("User");
modelBuilder.Entity<LiebUser>().ToTable("LiebUser");
modelBuilder.Entity<GuildWars2Account>().ToTable("GuildWars2Account");
modelBuilder.Entity<Equipped>().ToTable("Equipped");
modelBuilder.Entity<RaidRole>().ToTable("RaidRole");
modelBuilder.Entity<PlannedRaid>().ToTable("PlannedRaid");
modelBuilder.Entity<GuildWars2Build>().ToTable("GuildWars2Build");
modelBuilder.Entity<PlannedRaidRole>().ToTable("PlannedRaidRole");
modelBuilder.Entity<Raid>().ToTable("Raid");
modelBuilder.Entity<RaidReminder>().ToTable("RaidReminder");
modelBuilder.Entity<RaidSignUp>().ToTable("RaidSignUp");
modelBuilder.Entity<RandomRaid>().ToTable("RandomRaid");
modelBuilder.Entity<SignUpHistory>().ToTable("SignUpHistory");
}
}