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/Common.Notes.Model/NoteArgs.cs

44 lines
1.0 KiB

using System.ComponentModel.DataAnnotations;
using Connected.ServiceModel;
namespace Common.Notes;
public class NoteArgs : Dto
{
[Required, MaxLength(128)]
public string Entity { get; set; } = default!;
[Required, MaxLength(128)]
public string PrimaryKey { get; set; } = default!;
}
public class InsertNoteArgs : NoteArgs
{
[Range(1, int.MaxValue)]
public int Author { get; set; }
public DateTimeOffset? Created { get; set; }
[Required, MaxLength(1024 * 1024)]
public string Text { get; set; } = default!;
}
public sealed class UpdateNoteArgs : PrimaryKeyArgs<long>
{
[Required, MaxLength(Units.MB)]
public string Text { get; set; } = default!;
}
public sealed class QueryNoteTextArgs : PrimaryKeyListArgs<long>
{
[Required, MaxLength(128)]
public string Entity { get; set; } = default!;
}
public sealed class SelectNoteTextArgs : PrimaryKeyArgs<long>
{
[Required, MaxLength(128)]
public string Entity { get; set; } = default!;
[Required, MaxLength(128)]
public string EntityId { get; set; } = default!;
}