2024-06-20 22:32:22 +04:00
|
|
|
|
using Contracts.BindingModels;
|
|
|
|
|
using DataModels.Models;
|
|
|
|
|
using System;
|
2024-06-17 14:32:12 +04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
2024-06-25 20:26:34 +04:00
|
|
|
|
using static System.Net.Mime.MediaTypeNames;
|
2024-06-17 14:32:12 +04:00
|
|
|
|
|
|
|
|
|
namespace Contracts.ViewModels
|
|
|
|
|
{
|
|
|
|
|
public class MediaFileViewModel
|
|
|
|
|
{
|
|
|
|
|
public Guid Id { get; set; }
|
2024-06-25 20:26:34 +04:00
|
|
|
|
public required byte[] Image { get; set; }
|
2024-06-20 22:32:22 +04:00
|
|
|
|
public Guid ProductId { get; set; }
|
2024-06-24 15:08:29 +04:00
|
|
|
|
public string ProductName { get; set; } = string.Empty;
|
2024-06-20 22:32:22 +04:00
|
|
|
|
public MediaFileBindingModel GetBindingModel()
|
|
|
|
|
{
|
|
|
|
|
return new MediaFileBindingModel
|
|
|
|
|
{
|
|
|
|
|
Id = Id,
|
2024-06-25 20:26:34 +04:00
|
|
|
|
Image = Image,
|
2024-06-20 22:32:22 +04:00
|
|
|
|
ProductId = ProductId
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2024-06-17 14:32:12 +04:00
|
|
|
|
}
|