2022-05-23 08:53:44 +02:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace Aps_Single_Page_Anwendung.Models
|
2022-05-17 12:26:45 +02:00
|
|
|
|
{
|
|
|
|
|
public class Speise
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; set; }
|
2022-05-27 07:44:42 +02:00
|
|
|
|
|
2022-05-23 08:53:44 +02:00
|
|
|
|
[Required] // Leere Felder sind damit nicht möglich
|
2022-05-17 12:26:45 +02:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string Beschreibung { get; set; }
|
2022-05-27 07:44:42 +02:00
|
|
|
|
|
|
|
|
|
[Range(0,25)] // Preis darf nur zwischen 0 und 25 Euro sein
|
2022-05-17 12:26:45 +02:00
|
|
|
|
public double Preis { get; set; }
|
2022-05-27 07:44:42 +02:00
|
|
|
|
|
2022-05-17 12:26:45 +02:00
|
|
|
|
public int KategorieId { get; set; }
|
|
|
|
|
public Kategorie Kategorie { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|