Initial Commit
This commit is contained in:
commit
86fc06b877
37 changed files with 3424 additions and 0 deletions
104
src/Decky.Core/Api/Models/DeckDtos.cs
Normal file
104
src/Decky.Core/Api/Models/DeckDtos.cs
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Decky.Core.Api.Models;
|
||||
|
||||
public sealed record DeckUserDto
|
||||
{
|
||||
[JsonPropertyName("primaryKey")]
|
||||
public string PrimaryKey { get; init; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("uid")]
|
||||
public string UserId { get; init; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("displayname")]
|
||||
public string DisplayName { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed record BoardPermissionsDto
|
||||
{
|
||||
[JsonPropertyName("PERMISSION_READ")]
|
||||
public bool CanRead { get; init; }
|
||||
|
||||
[JsonPropertyName("PERMISSION_EDIT")]
|
||||
public bool CanEdit { get; init; }
|
||||
|
||||
[JsonPropertyName("PERMISSION_MANAGE")]
|
||||
public bool CanManage { get; init; }
|
||||
|
||||
[JsonPropertyName("PERMISSION_SHARE")]
|
||||
public bool CanShare { get; init; }
|
||||
}
|
||||
|
||||
public sealed record BoardDto
|
||||
{
|
||||
public int Id { get; init; }
|
||||
|
||||
public string Title { get; init; } = string.Empty;
|
||||
|
||||
public DeckUserDto? Owner { get; init; }
|
||||
|
||||
public string? Color { get; init; }
|
||||
|
||||
public bool Archived { get; init; }
|
||||
|
||||
public long LastModified { get; init; }
|
||||
|
||||
public BoardPermissionsDto? Permissions { get; init; }
|
||||
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement>? AdditionalData { get; init; }
|
||||
}
|
||||
|
||||
public sealed record StackDto
|
||||
{
|
||||
public int Id { get; init; }
|
||||
|
||||
public int BoardId { get; init; }
|
||||
|
||||
public string Title { get; init; } = string.Empty;
|
||||
|
||||
public int Order { get; init; }
|
||||
|
||||
public long LastModified { get; init; }
|
||||
|
||||
public IReadOnlyList<CardDto> Cards { get; init; } = [];
|
||||
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement>? AdditionalData { get; init; }
|
||||
}
|
||||
|
||||
public sealed record CardDto
|
||||
{
|
||||
public int Id { get; init; }
|
||||
|
||||
public int StackId { get; init; }
|
||||
|
||||
public string Title { get; init; } = string.Empty;
|
||||
|
||||
public string? Description { get; init; }
|
||||
|
||||
public string Type { get; init; } = "plain";
|
||||
|
||||
public string Owner { get; init; } = string.Empty;
|
||||
|
||||
public int Order { get; init; }
|
||||
|
||||
public bool Archived { get; init; }
|
||||
|
||||
public DateTimeOffset? Done { get; init; }
|
||||
|
||||
[JsonPropertyName("duedate")]
|
||||
public DateTimeOffset? DueDate { get; init; }
|
||||
|
||||
[JsonPropertyName("startdate")]
|
||||
public DateTimeOffset? StartDate { get; init; }
|
||||
|
||||
public string? Color { get; init; }
|
||||
|
||||
public long LastModified { get; init; }
|
||||
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement>? AdditionalData { get; init; }
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue