generated from admin/template
23 lines
639 B
C#
23 lines
639 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace PokedexApi.Data.Models;
|
|
[Table("ability")]
|
|
[Index(nameof(Name), IsUnique = true)]
|
|
public class Ability
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
[Column("ability_id")]
|
|
public int AbilityId { get; set; }
|
|
[Column("ability_name")]
|
|
[Required]
|
|
[MaxLength(100)]
|
|
public string Name { get; set; }
|
|
[Column("ability_description")]
|
|
[Required]
|
|
public string Description { get; set; }
|
|
|
|
}
|