using System;
using System.Collections.Generic;
using System.ComponentModel; //DefaultValue
using System.ComponentModel.DataAnnotations; //*[key]
using System.Linq;
using System.Threading.Tasks;
namespace ArtikelWeb.Models
{
public class Artikel
{
[Key]
public int IDArtikel { get; set; }
[StringLength(50)]
//[StringLength(50, ErrorMessage =
"First name cannot be longer than 50 characters.")]
[Display(Name = "Artikel Bezeichnung")]
public string Title { get; set; }
public string Text_Content { get; set; }
public Produktgruppen Produktgruppe { get; set; }
public int IDProduktgruppe { get; set; }
[DefaultValue(true)]
public bool IsReduced { get; set; }
[DefaultValue(false)]
public bool istOK { get; set; }
[DefaultValue(1234567890)]
public int Zahl_int { get; set; } //int32 min=-2.147.483.648
max=2.147.483.647
[DefaultValue(12345678901234567890)]
public long Zahl_long { get; set; } //int64 max=9.223.372.036.854.775.807;
[DefaultValue(0.001f)]
public Single Zahl_single { get; set; }
//32bit-float
min -3.402823 E38 max=3.402823 E38, Eingabe 0.0001f
[DefaultValue(0.000001f)]
public double Preis_double { get; set; }
[Required] //not null
[DefaultValue(11.22)]
public decimal Preis_decimal { get; set; } //Euro Dollar usw
[DefaultValue(0.55)]
public float Zahl_float { get; set; }
//Datum
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime EnrollmentDate { get; set; }
}
}
|