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.
Connected.Common/src/Connected.Common.Workspace/WorkspaceArgs.cs

68 lines
2.6 KiB

using System.ComponentModel.DataAnnotations;
using Connected.ServiceModel;
namespace Connected.Common.Workspace;
/// <summary>
/// The base class for the arguments used when inserting one of the
/// implementations of the <see cref="IWorkspaceEntity"/> entity.
/// </summary>
public abstract class InsertWorkspaceArgs : Dto
{
/// <inheritdoc cref="IWorkspaceEntity.IdentityEntity"/>
[Required, MaxLength(128)]
public string IdentityEntity { get; set; } = default!;
/// <inheritdoc cref="IWorkspaceEntity.IdentityId"/>
[Required, MaxLength(128)]
public string IdentityId { get; set; } = default!;
/// <inheritdoc cref="IWorkspaceEntity.Created"/>
public DateTimeOffset? Created { get; set; }
/// <inheritdoc cref="IWorkspaceEntity.Expires"/>
public DateTimeOffset? Expires { get; set; }
/// <inheritdoc cref="IWorkspaceEntity.Title"/>
[Required, MaxLength(128)]
public string Title { get; set; } = default!;
/// <inheritdoc cref="IWorkspaceEntity.Description"/>
[MaxLength(256)]
public string? Description { get; set; }
/// <inheritdoc cref="IWorkspaceEntity.Status"/>
public ReadStatus? Status { get; set; }
/// <inheritdoc cref="IWorkspaceEntity.Domain"/>
[Required, MaxLength(128)]
public string Domain { get; init; } = default!;
/// <inheritdoc cref="IWorkspaceEntity.Tags"/>
[MaxLength(256)]
public string? Tags { get; init; }
/// <inheritdoc cref="IWorkspaceEntity.AuthorEntity"/>
[MaxLength(128)]
public string? AuthorEntity { get; init; }
/// <inheritdoc cref="IWorkspaceEntity.AuthorId"/>
[MaxLength(128)]
public string? AuthorId { get; init; }
/// <inheritdoc cref="IWorkspaceEntity.Verbs"/>
public IdentityVerbs? Verbs { get; init; }
}
/// <summary>
/// The base class used when updating one of the
/// implementations of the <see cref="IWorkspaceEntity"/> entity.
/// </summary>
public abstract class UpdateWorkspaceArgs : PrimaryKeyArgs<long>
{
/// <inheritdoc cref="IWorkspaceEntity.Created"/>
public DateTimeOffset? Created { get; set; }
/// <inheritdoc cref="IWorkspaceEntity.Expires"/>
public DateTimeOffset? Expires { get; set; }
/// <inheritdoc cref="IWorkspaceEntity.Title"/>
[Required, MaxLength(128)]
public string Title { get; set; } = default!;
/// <inheritdoc cref="IWorkspaceEntity.Description"/>
[MaxLength(256)]
public string? Description { get; set; }
/// <inheritdoc cref="IWorkspaceEntity.Status"/>
public ReadStatus? Status { get; set; }
/// <inheritdoc cref="IWorkspaceEntity.Tags"/>
[MaxLength(256)]
public string? Tags { get; init; }
/// <inheritdoc cref="IWorkspaceEntity.Verbs"/>
public IdentityVerbs? Verbs { get; init; }
}