Files
mixtape/zero.Core/Entities/Applications/Application.cs
T

74 lines
1.8 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2020-05-22 21:19:49 +02:00
using zero.Core.Attributes;
namespace zero.Core.Entities
2020-03-23 11:57:07 +01:00
{
/// <summary>
2020-03-24 23:09:29 +01:00
/// An application is a website. zero can host multiple websites at once which share common assets
2020-03-23 11:57:07 +01:00
/// </summary>
2020-05-21 13:41:09 +02:00
public class Application : ZeroEntity, IApplication
{
/// <inheritdoc />
public string Database { get; set; }
2020-05-21 13:41:09 +02:00
/// <inheritdoc />
public string FullName { get; set; }
/// <inheritdoc />
public string Email { get; set; }
/// <inheritdoc />
2020-11-24 12:02:11 +01:00
public string ImageId { get; set; }
2020-05-21 13:41:09 +02:00
/// <inheritdoc />
2020-11-24 12:02:11 +01:00
public string IconId { get; set; }
2020-05-21 13:41:09 +02:00
/// <inheritdoc />
public Uri[] Domains { get; set; } = new Uri[] { };
2020-05-21 13:41:09 +02:00
/// <inheritdoc />
public List<string> Features { get; set; } = new List<string>();
}
2020-06-23 12:23:23 +02:00
[Collection("Applications")]
2020-05-21 13:41:09 +02:00
public interface IApplication : IZeroEntity, IZeroDbConventions
2020-03-23 11:57:07 +01:00
{
/// <summary>
/// Raven database name for application data
/// </summary>
string Database { get; set; }
/// <summary>
/// Full company or product name
/// </summary>
2020-05-21 13:41:09 +02:00
string FullName { get; set; }
/// <summary>
/// Generic contact email. Can be used in various locations
/// </summary>
2020-05-21 13:41:09 +02:00
string Email { get; set; }
2020-03-23 11:57:07 +01:00
/// <summary>
/// Image of the application
/// </summary>
2020-11-24 12:02:11 +01:00
string ImageId { get; set; }
2020-03-23 11:57:07 +01:00
/// <summary>
2020-11-15 16:29:22 +01:00
/// Simple image of the application (can be used as favicon)
2020-03-23 11:57:07 +01:00
/// </summary>
2020-11-24 12:02:11 +01:00
string IconId { get; set; }
2020-03-23 11:57:07 +01:00
/// <summary>
/// All assigned domains for this application
/// </summary>
Uri[] Domains { get; set; }
/// <summary>
/// Features which are enabled for this application.
/// Can be user-defined and affect both backoffice and frontend
/// </summary>
2020-05-21 13:41:09 +02:00
List<string> Features { get; set; }
2020-03-23 11:57:07 +01:00
}
}