Files
mapo-core/MP.FileData/DatabaseModels/FileModel.cs
T
2021-09-06 15:40:58 +02:00

59 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace MP.FileData.DatabaseModels
{
/// <summary>
/// Tabella archivio dei File Programma
/// </summary>
[Table("Files")]
public partial class FileModel
{
#region Public Properties
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int FileId { get; set; }
public bool Active { get; set; } = true;
public string CodArticolo { get; set; }
public string IdxMacchina { get; set; } = "";
public string Name { get; set; } = "";
public int Rev { get; set; } = 0;
public DateTime LastMod { get; set; }
public long Size { get; set; } = 0;
public string Path { get; set; } = "";
public string MimeType { get; set; } = "";
public bool Changed { get; set; } = false;
public DateTime LastCheck { get; set; } = DateTime.Now.AddYears(-1);
public byte[] FileContent { get; set; }
[NotMapped]
public string FileStringContent
{
get
{
return Encoding.UTF8.GetString(FileContent);
}
set
{
// serializzo a byte
FileContent = Encoding.ASCII.GetBytes(value);
}
}
[ForeignKey("CodArticolo")]
public virtual ArticoloModel Articolo { get; set; }
[ForeignKey("IdxMacchina")]
public virtual MacchinaModel Macchina { get; set; }
#endregion Public Properties
}
}