Add project files
This commit is contained in:
24
T120B165-ImgBoard/Models/File.cs
Normal file
24
T120B165-ImgBoard/Models/File.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user