generated from admin/template
92 lines
2.8 KiB
C#
92 lines
2.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace PokedexApp.Models;
|
|
|
|
[Table("pokemon")]
|
|
[Index("PokemonName", Name = "pokemon_pokemon_name_key", IsUnique = true)]
|
|
[Index("PokemonNationalDexNumber", Name = "pokemon_pokemon_national_dex_number_key", IsUnique = true)]
|
|
public partial class Pokemon
|
|
{
|
|
[Key]
|
|
[Column("pokemon_id")]
|
|
public int PokemonId { get; set; }
|
|
|
|
[Column("pokemon_national_dex_number")]
|
|
public int PokemonNationalDexNumber { get; set; }
|
|
|
|
[Column("pokemon_name")]
|
|
[StringLength(50)]
|
|
public string PokemonName { get; set; } = null!;
|
|
|
|
[Column("pokemon_species")]
|
|
[StringLength(50)]
|
|
public string? PokemonSpecies { get; set; }
|
|
|
|
[Column("pokemon_height")]
|
|
[Precision(4, 2)]
|
|
public decimal? PokemonHeight { get; set; }
|
|
|
|
[Column("pokemon_weight")]
|
|
[Precision(5, 2)]
|
|
public decimal? PokemonWeight { get; set; }
|
|
|
|
[Column("pokemon_base_hp")]
|
|
public short PokemonBaseHp { get; set; }
|
|
|
|
[Column("pokemon_base_attack")]
|
|
public short PokemonBaseAttack { get; set; }
|
|
|
|
[Column("pokemon_base_defense")]
|
|
public short PokemonBaseDefense { get; set; }
|
|
|
|
[Column("pokemon_base_sp_attack")]
|
|
public short PokemonBaseSpAttack { get; set; }
|
|
|
|
[Column("pokemon_base_sp_defense")]
|
|
public short PokemonBaseSpDefense { get; set; }
|
|
|
|
[Column("pokemon_base_speed")]
|
|
public short PokemonBaseSpeed { get; set; }
|
|
|
|
[Column("pokemon_is_legendary")]
|
|
public bool PokemonIsLegendary { get; set; }
|
|
|
|
[Column("pokemon_is_mythical")]
|
|
public bool PokemonIsMythical { get; set; }
|
|
|
|
[Column("region_id")]
|
|
public int? RegionId { get; set; }
|
|
|
|
[Column("pokemon_description")]
|
|
public string? PokemonDescription { get; set; }
|
|
|
|
[Column("pokemon_created_at")]
|
|
public DateTime PokemonCreatedAt { get; set; }
|
|
|
|
[InverseProperty("Pokemon")]
|
|
public virtual ICollection<CaughtPokemon> CaughtPokemons { get; set; } = new List<CaughtPokemon>();
|
|
|
|
[InverseProperty("FromPokemon")]
|
|
public virtual ICollection<Evolution> EvolutionFromPokemons { get; set; } = new List<Evolution>();
|
|
|
|
[InverseProperty("ToPokemon")]
|
|
public virtual ICollection<Evolution> EvolutionToPokemons { get; set; } = new List<Evolution>();
|
|
|
|
[InverseProperty("Pokemon")]
|
|
public virtual ICollection<PokemonAbility> PokemonAbilities { get; set; } = new List<PokemonAbility>();
|
|
|
|
[InverseProperty("Pokemon")]
|
|
public virtual ICollection<PokemonMove> PokemonMoves { get; set; } = new List<PokemonMove>();
|
|
|
|
[InverseProperty("Pokemon")]
|
|
public virtual ICollection<PokemonType> PokemonTypes { get; set; } = new List<PokemonType>();
|
|
|
|
[ForeignKey("RegionId")]
|
|
[InverseProperty("Pokemons")]
|
|
public virtual Region? Region { get; set; }
|
|
}
|