31 lines
734 B
C#
31 lines
734 B
C#
using Microsoft.AspNetCore.Http;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using UTB.Eshop.Web.Models.Validations;
|
|
|
|
namespace UTB.Eshop.Web.Models.Entity
|
|
{
|
|
[Table(nameof(CarouselItem))]
|
|
public class CarouselItem
|
|
{
|
|
[Key]
|
|
[Required]
|
|
public int ID { get; set; }
|
|
|
|
[NotMapped]
|
|
[FileContentValidation("image")]
|
|
public IFormFile Image { get; set; }
|
|
|
|
[StringLength(255)]
|
|
[Required]
|
|
public string ImageSource { get; set; }
|
|
|
|
[StringLength(50)]
|
|
public string ImageAlt { get; set; }
|
|
}
|
|
}
|