generated from admin/template
начал
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PokedexApi.Data.Models;
|
||||
[Table("pokemon")]
|
||||
[Index(nameof(Name), IsUnique = true)]
|
||||
public class Pokemon
|
||||
{
|
||||
[Key]
|
||||
[Column("pokemon_id")]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public int Id { get; set; }
|
||||
[Column("pokemon_name")]
|
||||
[Required]
|
||||
[MaxLength(30)]
|
||||
public string Name { get; set; }
|
||||
[Column("pokemon_height_m")]
|
||||
[Required]
|
||||
public double Height { get; set; }
|
||||
[Column("pokemon_weight_kg")]
|
||||
[Required]
|
||||
public double Weight { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user