﻿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ę")]
        public DateTime Date { get; set; }

        [Required(ErrorMessage = "Proszę podać tytuł wierszówki")]
        public string Caption { get; set; }

        [Required(ErrorMessage = "Proszę podać wycenę")]
        [Range(0, 1000)]
        public decimal Price { get; set; }

        [Required(ErrorMessage = "Proszę podać bonus")]
        [Range(0, 1000)]
        public decimal Bonus { get; set; }
    }
}
