Files
GreenHomeBack/src/GreenHome.Application/DevicePostDtos.cs
2025-12-17 00:34:41 +03:30

47 lines
1.4 KiB
C#

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