// ==========================================================================
// SchemaDetailsDto.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==========================================================================
using Squidex.Infrastructure;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Squidex.Controllers.Api.Schemas.Models
{
public sealed class SchemaDetailsDto
{
///
/// The id of the schema.
///
public Guid Id { get; set; }
///
/// The name of the schema. Unique within the app.
///
[Required]
[RegularExpression("^[a-z0-9]+(\\-[a-z0-9]+)*$")]
public string Name { get; set; }
///
/// The list of fields.
///
[Required]
public List Fields { get; set; }
///
/// Optional label for the editor.
///
[StringLength(100)]
public string Label { get; set; }
///
/// Hints to describe the schema.
///
[StringLength(1000)]
public string Hints { get; set; }
///
/// The user that has created the schema.
///
[Required]
public RefToken CreatedBy { get; set; }
///
/// The user that has updated the schema.
///
[Required]
public RefToken LastModifiedBy { get; set; }
///
/// The date and time when the schema has been creaed.
///
public DateTime Created { get; set; }
///
/// The date and time when the schema has been modified last.
///
public DateTime LastModified { get; set; }
}
}