Reorganize root folder structure: Remove apps layer layer
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record AdminUserDetailsDto(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Bio,
|
||||
string? Avatar,
|
||||
DateTime CreatedAt,
|
||||
bool IsOnline,
|
||||
DateTime LastOnlineAt,
|
||||
AdminUserStatsDto Stats
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record AdminUserDto(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Email,
|
||||
string? Avatar,
|
||||
DateTime CreatedAt,
|
||||
bool IsOnline,
|
||||
DateTime LastOnlineAt
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Host.Models;
|
||||
|
||||
public record AdminUserStatsDto(
|
||||
int MessagesCount,
|
||||
int MediaCount,
|
||||
int FilesCount,
|
||||
int LinksCount,
|
||||
long StorageUsedBytes
|
||||
);
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Host.Models;
|
||||
|
||||
public class CleanupDryRunResultDto
|
||||
{
|
||||
public int OrphanedMessagesCount { get; set; }
|
||||
public long OrphanedMediaBytes { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record AuthResponseDto(
|
||||
string Token,
|
||||
AuthUserDto User
|
||||
);
|
||||
|
||||
public record AuthUserDto(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Email,
|
||||
string? Bio,
|
||||
string? Avatar,
|
||||
DateTime? Birthday,
|
||||
bool IsOnline,
|
||||
DateTime CreatedAt
|
||||
);
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Host.Models;
|
||||
|
||||
public class ResetPasswordDto
|
||||
{
|
||||
public string NewPassword { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using Knot.Shared.Kernel.Configuration;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record PublicConfigDto
|
||||
{
|
||||
public bool EnableCalls { get; init; }
|
||||
public bool EnableKlipy { get; init; }
|
||||
public int MaxFileSizeMb { get; init; }
|
||||
public int MaxGroupMembers { get; init; }
|
||||
public bool EnableConfederation { get; init; }
|
||||
public bool EnableRegistration { get; init; }
|
||||
|
||||
public static PublicConfigDto FromSettings(SystemSettingsDto settings)
|
||||
{
|
||||
return new PublicConfigDto
|
||||
{
|
||||
EnableCalls = settings.EnableCalls,
|
||||
EnableKlipy = settings.EnableKlipy,
|
||||
MaxFileSizeMb = settings.MaxFileSizeMb,
|
||||
MaxGroupMembers = settings.MaxGroupMembers,
|
||||
EnableConfederation = settings.EnableConfederation,
|
||||
EnableRegistration = settings.EnableRegistration
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record FriendDto(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Avatar,
|
||||
bool IsOnline,
|
||||
DateTime LastSeen,
|
||||
Guid FriendshipId
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record FriendRequestDto(
|
||||
Guid Id,
|
||||
FriendUserDto User,
|
||||
DateTime CreatedAt
|
||||
);
|
||||
|
||||
public record FriendUserDto(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Avatar
|
||||
);
|
||||
@@ -0,0 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record SendFriendRequest(Guid FriendId);
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record AnalyzeImportResponseDto(
|
||||
Guid Token,
|
||||
List<string> Names
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record ExecuteImportRequest(
|
||||
Guid Token,
|
||||
Dictionary<string, Guid> Mapping,
|
||||
string? GroupName
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record ExecuteImportResponseDto(
|
||||
bool Success,
|
||||
int MessagesImported,
|
||||
Guid ChatId
|
||||
);
|
||||
@@ -0,0 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record AddStoryReactionRequest(string Emoji);
|
||||
@@ -0,0 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record AddStoryReplyRequest(string Content);
|
||||
@@ -0,0 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record CreateStoryRequest(string Type, string? MediaUrl, string? Content, string? BgColor);
|
||||
@@ -0,0 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record RemoveStoryReactionRequest(string Emoji);
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record StoryGroupDto(
|
||||
StoryUserDto User,
|
||||
List<StoryDto> Stories,
|
||||
bool HasUnviewed
|
||||
);
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record StoryDto(
|
||||
Guid Id,
|
||||
string Type,
|
||||
string? MediaUrl,
|
||||
string? Content,
|
||||
string? BgColor,
|
||||
DateTime CreatedAt,
|
||||
DateTime ExpiresAt,
|
||||
int ViewCount,
|
||||
bool Viewed,
|
||||
List<StoryReactionDto> Reactions,
|
||||
int ReplyCount
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record StoryReactionDto(
|
||||
Guid Id,
|
||||
Guid UserId,
|
||||
string Emoji,
|
||||
DateTime CreatedAt
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record StoryReplyDto(
|
||||
Guid Id,
|
||||
Guid UserId,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Avatar,
|
||||
string Content,
|
||||
DateTime CreatedAt
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record StoryUserDto(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Avatar
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record StoryViewerDto(
|
||||
Guid UserId,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Avatar,
|
||||
DateTime ViewedAt
|
||||
);
|
||||
@@ -0,0 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public sealed record UpdateProfileRequest(string? DisplayName, string? Bio, DateTime? Birthday);
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Host.Models;
|
||||
|
||||
public sealed record UpdateSettingsRequest(bool? HideStoryViews);
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record UserDto(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Avatar,
|
||||
bool IsOnline,
|
||||
DateTime LastSeen
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace Host.Models;
|
||||
|
||||
public record UserProfileDto(
|
||||
Guid Id,
|
||||
string Username,
|
||||
string DisplayName,
|
||||
string? Avatar,
|
||||
string? Bio,
|
||||
DateTime? Birthday,
|
||||
DateTime CreatedAt,
|
||||
bool? HideStoryViews = null,
|
||||
bool IsOnline = false,
|
||||
DateTime? LastSeen = null
|
||||
);
|
||||
Reference in New Issue
Block a user