add Data Support ...

This commit is contained in:
2025-12-06 22:23:17 +03:30
parent 15171511f5
commit 3ea6eb2012
13 changed files with 226 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
using System;
using xCommons.Constants;
using xModels.Base;
using xModels.Dtos;
namespace xFileService.Models.Dtos
{
public class XFileDto : XBaseDto
{
public Guid Id { get; set; }
public XFileType Type { get; set; }
public string Name { get; set; }
public string Thumb { get; set; }
public string Path { get; set; }
public string ThumbPath { get; set; }
public DateTime UploadedOn { get; set; }
public string FileName { get; set; }
public string OwnerId { get; set; }
public XPersonDto Owner { get; set; }
}
}
+13
View File
@@ -0,0 +1,13 @@
using System.IO;
using xModels.Base;
namespace xFileService.Models.Dtos
{
public class XFileStreamDescriptorDto : XBaseDto
{
public Stream Stream { get; set; }
public string MIMEType { get; set; }
public string Name { get; set; }
public string Path { get; set; }
}
}
+68
View File
@@ -0,0 +1,68 @@
using System;
using System.ComponentModel.DataAnnotations;
using xCommons.Constants;
using xModels.Base;
namespace xFileService.Models.Entities
{
/// <summary>
/// Specified File in Server ...
/// </summary>
public class XFile : XBaseGuidIDEntity
{
/// <summary>
/// Specified File Type ...
/// </summary>
/// <value></value>
public XFileType Type { get; set; }
/// <summary>
/// User Identifier ...
/// </summary>
/// <value></value>
[Required]
[StringLength(255)]
public string OwnerId { get; set; }
/// <summary>
/// File Name on Server ...
/// </summary>
/// <value></value>
[Required]
[StringLength(255)]
public string Name { get; set; }
/// <summary>
/// File Path On Server ...
/// </summary>
/// <value></value>
[Required]
public string Path { get; set; }
/// <summary>
/// Thumbnail FIle Name ...
/// if File Type Supported Thumbnail ...
/// </summary>
/// <value></value>
public string Thumb { get; set; }
/// <summary>
/// Thumbnail File Path ...
/// if File Type Supported Thumbnail ...
/// </summary>
/// <value></value>
public string ThumbPath { get; set; }
/// <summary>
/// File Uploading Time ...
/// </summary>
/// <value></value>
public DateTime UploadedOn { get; set; }
/// <summary>
/// Request For Upload File Name on Client ...
/// </summary>
/// <value></value>
public string FileName { get; set; }
}
}