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.
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using Connected.Annotations;
|
|
|
|
|
using Connected.ServiceModel;
|
|
|
|
|
|
|
|
|
|
namespace Connected.Common.Documents;
|
|
|
|
|
|
|
|
|
|
public class DocumentArgs : Dto
|
|
|
|
|
{
|
|
|
|
|
[MaxLength(32)]
|
|
|
|
|
public string? Code { get; set; } = default!;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public abstract class InsertDocumentArgs : DocumentArgs
|
|
|
|
|
{
|
|
|
|
|
public int? Author { get; set; } = default!;
|
|
|
|
|
|
|
|
|
|
public DateTimeOffset? Created { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public abstract class UpdateDocumentArgs<TPrimaryKey> : DocumentArgs
|
|
|
|
|
where TPrimaryKey : notnull
|
|
|
|
|
{
|
|
|
|
|
[MinValue(1)]
|
|
|
|
|
public TPrimaryKey Id { get; set; } = default!;
|
|
|
|
|
|
|
|
|
|
public DateTimeOffset? Modified { get; set; }
|
|
|
|
|
|
|
|
|
|
public int? Owner { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class SelectDocumentArgs : Dto
|
|
|
|
|
{
|
|
|
|
|
[Required, MaxLength(32)]
|
|
|
|
|
public string Domain { get; set; } = default!;
|
|
|
|
|
|
|
|
|
|
[Required, MaxLength(32)]
|
|
|
|
|
public string Type { get; set; } = default!;
|
|
|
|
|
|
|
|
|
|
[Required, MaxLength(32)]
|
|
|
|
|
public string Code { set; get; } = default!;
|
|
|
|
|
}
|