Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
prepare for localized texts
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatNovaDragon committed Mar 8, 2024
1 parent 6ccd5cb commit 9d36e77
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions Data/ApplicationDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ namespace pkmnWildLife.Data;
public class ApplicationDbContext : DbContext
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options) { }
: base(options)
{
}

public DbSet<Ability> AbilityDex { get; set; }
public DbSet<Move> MoveDex { get; set; }

public DbSet<Item> Items { get; set; }
public DbSet<Type> Types { get; set; }
public DbSet<MoveClass> MoveClasses { get; set; }
Expand Down Expand Up @@ -43,6 +46,29 @@ protected override void OnModelCreating(ModelBuilder builder)
}
}

public class Localized_Text
{
public string ID { get; set; }
public Language lang { get; set; }
public string text { get; set; }
}

public class Language
{
public string ID { get; set; }
public string localized_Name { get; set; }
}

public class Move_Effect
{
public string ID { get; set; }

public Localized_Text[] Effect { get; set; }

public Localized_Text[]
Short_Effect { get; set; }
}

public class Ability
{
public string ID { get; set; }
Expand All @@ -68,10 +94,9 @@ public class Move
public virtual Type type { get; set; }
public string? DamageDice { get; set; }
public virtual MoveClass MoveClass { get; set; }
public int Accuracy { get; set; }
public string Target { get; set; }
public string? Effect { get; set; }

public string? ShortEffect { get; set; }
public Move_Effect? Effect { get; set; }
}

public class Type
Expand Down Expand Up @@ -112,11 +137,9 @@ public class Item

public class Pokemon
{
[Column(Order = 2)]
public string ID { get; set; }
[Column(Order = 2)] public string ID { get; set; }

[Column(Order = 1)]
public int Dex { get; set; }
[Column(Order = 1)] public int Dex { get; set; }
public string? ImageLink { get; set; }

public string Name { get; set; }
Expand Down Expand Up @@ -199,4 +222,4 @@ public class AttackMod
public string? Name_DE { get; set; }

public string Effect { get; set; }

Check warning on line 224 in Data/ApplicationDbContext.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'Effect' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
}
}

0 comments on commit 9d36e77

Please sign in to comment.