erp-platform/api/src/Kurs.Platform.Application.Contracts/FileManagement/FileManagementDtos.cs

48 lines
946 B
C#
Raw Normal View History

#nullable enable
using System.ComponentModel.DataAnnotations;
using System.IO;
namespace Kurs.Platform.FileManagement;
public class CreateFolderDto
{
[Required]
[StringLength(255)]
public string Name { get; set; } = string.Empty;
public string? ParentId { get; set; }
}
public class RenameItemDto
{
[Required]
[StringLength(255)]
public string Name { get; set; } = string.Empty;
}
public class MoveItemDto
{
public string? TargetFolderId { get; set; }
}
public class UploadFileDto
{
[Required]
public string FileName { get; set; } = string.Empty;
// Either FileStream or FileContent can be used
public Stream? FileStream { get; set; }
public byte[]? FileContent { get; set; }
public string? ParentId { get; set; }
}
public class SearchFilesDto
{
[Required]
public string Query { get; set; } = string.Empty;
public string? ParentId { get; set; }
}