Refactoring, database structure changed
This commit is contained in:
19
WatchIt.DTO/Models/Generics/Image/ImageBase.cs
Normal file
19
WatchIt.DTO/Models/Generics/Image/ImageBase.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace WatchIt.DTO.Models.Generics.Image;
|
||||
|
||||
public abstract class ImageBase
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public byte[] Image { get; set; } = default!;
|
||||
public string MimeType { get; set; } = default!;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region PUBLIC METHODS
|
||||
|
||||
public override string ToString() => $"data:{MimeType};base64,{Convert.ToBase64String(Image)}";
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user