add media entities

This commit is contained in:
2020-03-23 19:14:46 +01:00
parent 482fa6754c
commit 5dfbb9a7c9
3 changed files with 53 additions and 1 deletions
+1 -1
View File
@@ -263,7 +263,7 @@ __pycache__/
# Media folder + app_data
App_Data/
**/Media/
wwwroot/Media/
Temp/
**/Assets/app.*
deps/*.dll
+40
View File
@@ -0,0 +1,40 @@
using System;
namespace unjo.Core.Entities
{
/// <summary>
/// A media file (can contain an image or other media like videos and documents)
/// </summary>
public class Media : DatabaseEntity
{
/// <summary>
/// Alternative text which is used when the image can't be loaded
/// </summary>
public string AlternativeText { get; set; }
/// <summary>
/// Additional caption text
/// </summary>
public string Caption { get; set; }
/// <summary>
/// Path of the media item
/// </summary>
public string Source { get; set; }
/// <summary>
/// Filesize in bytes
/// </summary>
public int Size { get; set; }
/// <summary>
/// Time the file has last changed
/// </summary>
public DateTimeOffset LastModifiedDate { get; set; }
/// <summary>
/// Optional focal point for an image
/// </summary>
public MediaFocalPoint FocalPoint { get; set; }
}
}
@@ -0,0 +1,12 @@
namespace unjo.Core.Entities
{
/// <summary>
/// The focal point sets the point of interest in an image with x/y coordinates from 0-1
/// </summary>
public class MediaFocalPoint
{
public decimal Left { get; set; }
public decimal Top { get; set; }
}
}