version 3

This commit is contained in:
2025-12-17 00:34:41 +03:30
parent 139924db94
commit 74e8480a68
38 changed files with 5399 additions and 70 deletions

View File

@@ -0,0 +1,46 @@
namespace GreenHome.Application;
public sealed class DevicePostDto
{
public int Id { get; set; }
public int DeviceId { get; set; }
public int AuthorUserId { get; set; }
public string AuthorName { get; set; } = string.Empty;
public string AuthorFamily { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public List<DevicePostImageDto> Images { get; set; } = new();
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
}
public sealed class DevicePostImageDto
{
public int Id { get; set; }
public string FileName { get; set; } = string.Empty;
public string FilePath { get; set; } = string.Empty;
public string ContentType { get; set; } = string.Empty;
public long FileSize { get; set; }
public DateTime UploadedAt { get; set; }
}
public sealed class CreateDevicePostRequest
{
public required int DeviceId { get; set; }
public required int AuthorUserId { get; set; }
public required string Content { get; set; }
}
public sealed class UpdateDevicePostRequest
{
public required int Id { get; set; }
public required string Content { get; set; }
}
public sealed class DevicePostFilter
{
public required int DeviceId { get; set; }
public int? AuthorUserId { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}