diff --git a/MP.FileData/DatabaseModels/AnagArticoli.cs b/MP.FileData/DatabaseModels/ArticoloModel.cs
similarity index 60%
rename from MP.FileData/DatabaseModels/AnagArticoli.cs
rename to MP.FileData/DatabaseModels/ArticoloModel.cs
index 526e4bf5..c1e6e739 100644
--- a/MP.FileData/DatabaseModels/AnagArticoli.cs
+++ b/MP.FileData/DatabaseModels/ArticoloModel.cs
@@ -1,15 +1,22 @@
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;
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.FileData.DatabaseModels
{
- public partial class AnagArticoli
+ [Table("Articoli")]
+ public partial class ArticoloModel
{
#region Public Properties
+ [Key]
public string CodArticolo { get; set; }
public string DescArticolo { get; set; }
public string Disegno { get; set; }
diff --git a/MP.FileData/DatabaseModels/FileModel.cs b/MP.FileData/DatabaseModels/FileModel.cs
new file mode 100644
index 00000000..65891d6d
--- /dev/null
+++ b/MP.FileData/DatabaseModels/FileModel.cs
@@ -0,0 +1,44 @@
+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;
+
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
+namespace MP.FileData.DatabaseModels
+{
+ ///
+ /// Tabella archivio dei File Programma
+ ///
+ [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 int 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[] Content { get; set; }
+
+ [ForeignKey("CodArticolo")]
+ public virtual ArticoloModel Articolo { get; set; }
+ [ForeignKey("IdxMacchina")]
+ public virtual MacchinaModel Macchina { get; set; }
+
+ #endregion Public Properties
+ }
+}
diff --git a/MP.FileData/DatabaseModels/Macchine.cs b/MP.FileData/DatabaseModels/MacchinaModel.cs
similarity index 81%
rename from MP.FileData/DatabaseModels/Macchine.cs
rename to MP.FileData/DatabaseModels/MacchinaModel.cs
index 75db8b5e..ae226130 100644
--- a/MP.FileData/DatabaseModels/Macchine.cs
+++ b/MP.FileData/DatabaseModels/MacchinaModel.cs
@@ -1,5 +1,7 @@
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;
@@ -9,10 +11,12 @@ using System.Threading.Tasks;
//
namespace MP.FileData.DatabaseModels
{
- public partial class Macchine
+ [Table("Macchine")]
+ public partial class MacchinaModel
{
#region Public Properties
+ [Key]
public string IdxMacchina { get; set; } = "";
public string CodMacchina { get; set; } = "";
public string Nome { get; set; } = "";