Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

63 lines
1.8 KiB

// ==========================================================================
// AppDto.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==========================================================================
using System;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using NodaTime;
using Squidex.Domain.Apps.Core.Apps;
namespace Squidex.Areas.Api.Controllers.Apps.Models
{
public sealed class AppDto
{
/// <summary>
/// The name of the app.
/// </summary>
[Required]
[RegularExpression("^[a-z0-9]+(\\-[a-z0-9]+)*$")]
public string Name { get; set; }
/// <summary>
/// The version of the app.
/// </summary>
public long Version { get; set; }
/// <summary>
/// The id of the app.
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// The timestamp when the app has been created.
/// </summary>
public Instant Created { get; set; }
/// <summary>
/// The timestamp when the app has been modified last.
/// </summary>
public Instant LastModified { get; set; }
/// <summary>
/// The permission level of the user.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public AppContributorPermission Permission { get; set; }
/// <summary>
/// Gets the current plan name.
/// </summary>
public string PlanName { get; set; }
/// <summary>
/// Gets the next plan name.
/// </summary>
public string PlanUpgrade { get; set; }
}
}