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