ApiManutenzioni/ApiPolo/Models/Siet_dbcontext/SIET_COMMESSE_DESC_DbContext.cs
2025-02-10 17:36:15 +01:00

46 lines
1.3 KiB
C#

using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace ApiPolo.Models.Siet_dbcontext
{
/// <summary></summary>
public class SIET_COMMESSE_DESC_DbContext : DbContext
{
/// <summary></summary>
public DbSet<CommessaDescSiet>? Commdesc { get; set; }
/// <summary></summary>
public SIET_COMMESSE_DESC_DbContext(DbContextOptions<SIET_COMMESSE_DESC_DbContext> options) : base(options)
{
}
/// <summary></summary>
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<CommessaDescSiet>().ToTable("SIET2LAV_MAST");
modelBuilder.Entity<CommessaDescSiet>().HasKey(table => new {
table.laserial,
table.latiplav
});
}
}
/// <summary>Descrizione commessa per SIET</summary>
public class CommessaDescSiet
{
/// <summary>seriale Commessa</summary>
[Key]
public string? laserial { get; set; }
/// <summary>tipo lavorazione</summary>
public string? latiplav { get; set; }
/// <summary>centro di costo - ticket</summary>
public string? lacodcen { get; set; }
/// <summary>Codice commessa</summary>
public string? lacodcom { get; set; }
}
}