generated from admin/template
22 lines
628 B
C#
22 lines
628 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace PokedexApi.Data.Models;
|
|
[Table("pokemonAbility")]
|
|
[Index(nameof(Name), IsUnique = true)]
|
|
public class PokemonAbility
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
[Column("pokemon_ability_id")]
|
|
public int AbilityId { get; set; }
|
|
[Column("pokemon_ability_name")]
|
|
[Required]
|
|
public string Name { get; set; }
|
|
[Column("IsHidden")]
|
|
[Required]
|
|
public bool IsHidden { get; set; }
|
|
|
|
}
|