add media entities
This commit is contained in:
+1
-1
@@ -263,7 +263,7 @@ __pycache__/
|
||||
|
||||
# Media folder + app_data
|
||||
App_Data/
|
||||
**/Media/
|
||||
wwwroot/Media/
|
||||
Temp/
|
||||
**/Assets/app.*
|
||||
deps/*.dll
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user