using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DiplomovaPrace.Model.Products
{
	public class Product
	{
		public int ID { get; set; }

		[Required]
		[MaxLength(200)]
		public string Name { get; set; }

		public int AvailableQuantity { get; set; }

		[Column(TypeName = "decimal(18,2)")]
		public decimal Price { get; set; }

		[Column(TypeName = "decimal(18,2)")]
		public decimal? ReducedPrice { get; set; }

		[MaxLength(5000)]
		public string Description { get; set; }

		// Předělat (produkt může mít více kategorií)
		public ProductCategory ProductCategory { get; set; }

		public int? ProductCategoryID { get; set; }

		public List<ProductImage> ProductImages { get; } = new	List<ProductImage>();

		public DateTime Created { get; set; }

		public DateTime? Deleted { get; set; }
	}
}
