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 : 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!; }