2020-05-22 15:06:17 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2020-05-22 21:19:49 +02:00
|
|
|
using zero.Core.Attributes;
|
2020-05-05 13:13:19 +02:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
{
|
2020-11-15 20:11:27 +01:00
|
|
|
/// <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 />
|
2020-05-22 15:06:17 +02:00
|
|
|
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
|
|
|
{
|
2020-11-15 20:11:27 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raven database name for application data
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Database { get; set; }
|
|
|
|
|
|
2020-05-05 13:13:19 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Full company or product name
|
|
|
|
|
/// </summary>
|
2020-05-21 13:41:09 +02:00
|
|
|
string FullName { get; set; }
|
2020-05-05 13:13:19 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Generic contact email. Can be used in various locations
|
|
|
|
|
/// </summary>
|
2020-05-21 13:41:09 +02:00
|
|
|
string Email { get; set; }
|
2020-05-05 13:13:19 +02:00
|
|
|
|
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>
|
2020-05-22 15:06:17 +02:00
|
|
|
Uri[] Domains { get; set; }
|
2020-05-05 13:13:19 +02:00
|
|
|
|
|
|
|
|
/// <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
|
|
|
}
|
|
|
|
|
}
|