Adeed base database build

This commit is contained in:
Samuele Lorefice
2023-11-07 01:47:56 +01:00
parent 1fe234914d
commit 57ddbbf115
13 changed files with 532 additions and 121 deletions

11
Card.cs
View File

@@ -1,12 +1,17 @@
namespace IsleBot;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
public class Card
{
namespace IsleBot;
public class Card {
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public string Name { get; set; }
public int Attack { get; set; }
public int Defense { get; set; }
public int MaxHealth { get; set; }
public int CurrentHealth { get; set; }
public User Owner { get; set; }
public override string ToString() {
return $"{Name} ATK: {Attack} DEF: {Defense} HP: {CurrentHealth}/{MaxHealth}";