Files
T120B165/T120B165-ImgBoard/Models/File.cs
2025-10-04 13:27:29 +03:00

25 lines
944 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace T120B165_ImgBoard.Models;
public class File
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
// The physical path where the file is stored
public required string FilePath { get; set; }
// Original file name uploaded by the user
public required string OriginalFileName { get; set; }
// The size of the file in bytes
public required long Size { get; set; }
// The MIME type, will be validated at the end of the upload
public required string ContentType { get; set; }
// Tracks when the file metadata was created/upload process started
public required DateTime CreatedDate { get; set; }
// Tracks when the file was successfully finalized
// Null until the final PATCH request completes
public DateTime? FinishedDate { get; set; }
}