sos
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
|
||||
namespace ConsoleApp1.data.model;
|
||||
[Table(name:"pokemon")]
|
||||
[Index (nameof(name), IsUnique = true)]
|
||||
public class Pokemon
|
||||
|
||||
{
|
||||
[Key]
|
||||
[Column(name:"pokemon_id")]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
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; }
|
||||
[Column("pokemon_base_experience")]
|
||||
[Required]
|
||||
public double base_experience { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user