21 lines
642 B
C#
21 lines
642 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace ConsoleApp1.data.model;
|
|
[Table("PokemonStats")]
|
|
[PrimaryKey(nameof(IdStat), nameof(PokemonId))]
|
|
public class PokemonStat
|
|
{
|
|
[Column("stat_id")]
|
|
public int IdStat { get; set; }
|
|
[Column("pokemon_id")]
|
|
public int PokemonId { get; set; }
|
|
[Column("pokemon_stat_base_stat")]
|
|
public string statBase { get; set; }
|
|
|
|
[ForeignKey(nameof(IdStat))]
|
|
public virtual Stat Stat { get; set; }
|
|
[ForeignKey(nameof(PokemonId))]
|
|
public virtual Pokemon Pokemon { get; set; }
|
|
} |