68 lines
1.8 KiB
C#
68 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;
|
|
|
|
namespace CMS_CORE_Application.ToolDatabase
|
|
{
|
|
public class ToolModels
|
|
{
|
|
[Table("tool")]
|
|
|
|
public class ToolModel
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public int ToolId { get; set; }
|
|
[Column("broken")]
|
|
public bool Broken { get; set; }
|
|
[Column("shank")]
|
|
public int ShankId { get; set; }
|
|
[ForeignKey("ShankId")]
|
|
public DbShankModel Shank { get; set; }
|
|
[Column("family")]
|
|
public int FamilyId { get; set; }
|
|
[ForeignKey("FamilyId")]
|
|
public DbFamilyModel Family { get; set; }
|
|
}
|
|
|
|
[Table("shank")]
|
|
public class DbShankModel
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public int ShankId { get; set; }
|
|
[Column("manina")]
|
|
public int? ManinaId { get; set; }
|
|
[ForeignKey("ManinaId")]
|
|
public DbFamilyModel Manina { get; set; }
|
|
[Column("tablet_id")]
|
|
public int TabletId { get; set; }
|
|
}
|
|
|
|
[Table("family")]
|
|
public class DbFamilyModel
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public int FamilyId { get; set; }
|
|
[Column("gamma")]
|
|
public int Gamma { get; set; }
|
|
}
|
|
|
|
[Table("manina")]
|
|
public class ManinaModello
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public int IdManina { get; set; }
|
|
[Column("store")]
|
|
public int Store { get; set; }
|
|
|
|
}
|
|
}
|
|
}
|