2021-11-20 13:52:28 +01:00
|
|
|
namespace zero.Media;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A media file (can contain an image or other media like videos and documents)
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RavenCollection("Media")]
|
2021-12-01 15:54:11 +01:00
|
|
|
public class Media : ZeroEntity, ISupportsTrees
|
2021-11-20 13:52:28 +01:00
|
|
|
{
|
2021-11-25 16:01:38 +01:00
|
|
|
public Media()
|
|
|
|
|
{
|
|
|
|
|
IsActive = true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-20 13:52:28 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Id/name of the phyiscal folder which is stored on disk/cloud
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FileId { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-11-25 15:38:36 +01:00
|
|
|
/// Id of the parent folder
|
2021-11-20 13:52:28 +01:00
|
|
|
/// </summary>
|
2021-11-25 15:38:36 +01:00
|
|
|
public string ParentId { get; set; }
|
2021-11-20 13:52:28 +01:00
|
|
|
|
|
|
|
|
/// <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>
|
2021-11-25 15:38:36 +01:00
|
|
|
public string Path { get; set; }
|
2021-11-20 13:52:28 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
2021-11-25 15:38:36 +01:00
|
|
|
/// Define custom thumbnails which are generated on upload
|
2021-12-09 16:02:39 +01:00
|
|
|
/// (see IZeroOptions.For<MediaOptions>().Thumbnails)
|
2021-11-20 13:52:28 +01:00
|
|
|
/// </summary>
|
2021-11-25 15:38:36 +01:00
|
|
|
public Dictionary<string, string> Thumbnails { get; set; } = new();
|
2021-11-20 13:52:28 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Filesize in bytes
|
|
|
|
|
/// </summary>
|
|
|
|
|
public long Size { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Meta data for images
|
|
|
|
|
/// </summary>
|
2021-11-25 15:38:36 +01:00
|
|
|
public MediaImageMetadata ImageMeta { get; set; }
|
2021-11-20 13:52:28 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Optional focal point for an image
|
|
|
|
|
/// </summary>
|
|
|
|
|
public MediaFocalPoint FocalPoint { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Type of the media
|
|
|
|
|
/// </summary>
|
|
|
|
|
public MediaType Type { get; set; }
|
|
|
|
|
}
|