mirror of
https://github.com/jcreek/Creek.FileRepository.git
synced 2026-07-13 02:43:43 +00:00
feat(*): Add File model
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FileRepository.Models
|
||||||
|
{
|
||||||
|
public class File
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
public string FileName { get; set; }
|
||||||
|
public Stream Content { get; set; }
|
||||||
|
public DateTime Created { get; set; }
|
||||||
|
|
||||||
|
public File GenerateFile(string id, string fileName, Stream content)
|
||||||
|
{
|
||||||
|
File newFile = new File()
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
FileName = fileName,
|
||||||
|
Content = content,
|
||||||
|
Created = DateTime.Now
|
||||||
|
};
|
||||||
|
|
||||||
|
return newFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user