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

44 lines
1.0 KiB

2 years ago
using System.ComponentModel.DataAnnotations;
using Connected.ServiceModel;
2 years ago
namespace Connected.Common.Notes;
2 years ago
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!;
}