using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using Wierszowki.Core.Linq; namespace Wierszowki.Core.Validation { public class MagazineItemValidation { [Required(ErrorMessage = "Proszę wybrać autora")] public int AuthorId { get; set; } [Required(ErrorMessage = "Proszę wybrać numer wydania")] public int IssueId { get; set; } [Required(ErrorMessage = "Proszę wybrać typ wierszówki")] public int ItemTypeId { get; set; } [Required(ErrorMessage = "Proszę wybrać datę")] [DataType(DataType.Date)] public DateTime Date { get; set; } [Required(ErrorMessage = "Proszę podać tytuł wierszówki")] [StringLength(255)] public string Caption { get; set; } [Required(ErrorMessage = "Proszę podać wycenę")] public decimal Price { get; set; } [Required(ErrorMessage = "Proszę podać bonus")] public decimal Bonus { get; set; } } }