1515 lines
56 KiB
C#
1515 lines
56 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using MP.MONO.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace MP.MONO.Data.Migrations
|
|
{
|
|
[DbContext(typeof(MapoMonoContext))]
|
|
[Migration("20220611160829_AddNumCountSMTask")]
|
|
partial class AddNumCountSMTask
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "6.0.2")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.AlarmLogModel", b =>
|
|
{
|
|
b.Property<int>("AlarmLogId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("DtRif")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<int>("Index")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("MachineId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("MemAddress")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<uint>("Status")
|
|
.HasColumnType("int unsigned");
|
|
|
|
b.Property<string>("ValDecoded")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("AlarmLogId");
|
|
|
|
b.HasIndex("MachineId");
|
|
|
|
b.ToTable("AlarmLog");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.AnKeyValModel", b =>
|
|
{
|
|
b.Property<string>("KeyName")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<string>("Descript")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<int>("ValFloat")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("ValInt")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ValString")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("KeyName");
|
|
|
|
b.ToTable("AnKeyVal");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.ConfigModel", b =>
|
|
{
|
|
b.Property<string>("KeyName")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<string>("Note")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("varchar(500)");
|
|
|
|
b.Property<string>("Val")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("ValStd")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("KeyName");
|
|
|
|
b.ToTable("Config");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.CounterModel", b =>
|
|
{
|
|
b.Property<string>("CCode")
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<double>("ActualVal")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("varchar(500)");
|
|
|
|
b.Property<DateTime>("LastReset")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.HasKey("CCode");
|
|
|
|
b.ToTable("Counter");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
CCode = "MacPowerOn",
|
|
ActualVal = 0.0,
|
|
Description = "Machine Power On",
|
|
LastReset = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
|
|
},
|
|
new
|
|
{
|
|
CCode = "CycleProc01",
|
|
ActualVal = 0.0,
|
|
Description = "Process 1 on Cycle state",
|
|
LastReset = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
|
|
},
|
|
new
|
|
{
|
|
CCode = "SpindleTorque01",
|
|
ActualVal = 0.0,
|
|
Description = "Spindle 01 Torque % > 0",
|
|
LastReset = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
|
|
},
|
|
new
|
|
{
|
|
CCode = "SpindleTorque02",
|
|
ActualVal = 0.0,
|
|
Description = "Spindle 02 Torque % > 0",
|
|
LastReset = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
|
|
},
|
|
new
|
|
{
|
|
CCode = "SpindleTorque03",
|
|
ActualVal = 0.0,
|
|
Description = "Spindle 03 Torque % > 0",
|
|
LastReset = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
|
|
},
|
|
new
|
|
{
|
|
CCode = "SpindleTorque04",
|
|
ActualVal = 0.0,
|
|
Description = "Spindle 04 Torque % > 0",
|
|
LastReset = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
|
|
},
|
|
new
|
|
{
|
|
CCode = "LMCheckElapsed",
|
|
ActualVal = 0.0,
|
|
Description = "Time Elapsed from last full Manufacturer Check",
|
|
LastReset = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.DataLogModel", b =>
|
|
{
|
|
b.Property<int>("DataLogId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("DtRif")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("FluxType")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<int>("MachineId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<double>("ValNum")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<string>("ValStr")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("DataLogId");
|
|
|
|
b.HasIndex("MachineId");
|
|
|
|
b.ToTable("DataLog");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.DataStAgModel", b =>
|
|
{
|
|
b.Property<int>("DataStAgId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("DtRif")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("FluxType")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<int>("MachineId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<double>("NumRec")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<double>("ValNumAvg")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<double>("ValNumMax")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<double>("ValNumMin")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<string>("ValStr")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("DataStAgId");
|
|
|
|
b.HasIndex("MachineId");
|
|
|
|
b.ToTable("DataStAg");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.EventLogModel", b =>
|
|
{
|
|
b.Property<int>("EventLogId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("CodEvent")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<DateTime>("DtRif")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<int>("MachineId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ValStr")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("EventLogId");
|
|
|
|
b.HasIndex("CodEvent");
|
|
|
|
b.HasIndex("MachineId");
|
|
|
|
b.ToTable("EventLog");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.EventModel", b =>
|
|
{
|
|
b.Property<string>("CodEvent")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<bool>("Active")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<bool>("IsUser")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.HasKey("CodEvent");
|
|
|
|
b.ToTable("Event");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
CodEvent = "",
|
|
Active = true,
|
|
Description = "NA",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Run",
|
|
Active = true,
|
|
Description = "Running",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Setup",
|
|
Active = true,
|
|
Description = "Machine Setup",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "ProgEdit",
|
|
Active = true,
|
|
Description = "Program Editing",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Fill",
|
|
Active = true,
|
|
Description = "Machine Fill",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "SetError",
|
|
Active = true,
|
|
Description = "Error",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "WuCd",
|
|
Active = true,
|
|
Description = "Warm Up / CoolDown Machine",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "ContrPwr",
|
|
Active = true,
|
|
Description = "Controlled PowerOn / ShutDown",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "ProgMiss",
|
|
Active = true,
|
|
Description = "Program Missing",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "HRMiss",
|
|
Active = true,
|
|
Description = "HR Missing",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Maint",
|
|
Active = true,
|
|
Description = "Maintenance",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Clean",
|
|
Active = true,
|
|
Description = "Machine CleanUp",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "SetPwrOff",
|
|
Active = true,
|
|
Description = "Power OFF Declaration",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Init",
|
|
Active = true,
|
|
Description = "Init",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "PowerOff",
|
|
Active = true,
|
|
Description = "Power OFF",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "PowerOn",
|
|
Active = true,
|
|
Description = "Power ON",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Cycle",
|
|
Active = true,
|
|
Description = "Machining",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "EndCycle",
|
|
Active = true,
|
|
Description = "End machining",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Error",
|
|
Active = true,
|
|
Description = "Error",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "PzCount",
|
|
Active = true,
|
|
Description = "Item Count(+1)",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "StartPall",
|
|
Active = true,
|
|
Description = "Start pallet",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "EndPall",
|
|
Active = true,
|
|
Description = "End pallet",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Manual",
|
|
Active = true,
|
|
Description = "Manual",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "LOutFull",
|
|
Active = true,
|
|
Description = "Line Out Full",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "LInEmpty",
|
|
Active = true,
|
|
Description = "Line In Empty",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "CycleTOut",
|
|
Active = true,
|
|
Description = "Timeout Std CycleTime",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "RMatMiss",
|
|
Active = true,
|
|
Description = "Raw Material Missing",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Emergency",
|
|
Active = true,
|
|
Description = "Emergency",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "ToolRepl",
|
|
Active = true,
|
|
Description = "Tool Replacement",
|
|
IsUser = true
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "CncAlam",
|
|
Active = true,
|
|
Description = "CNC Alarm",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "PlcAlam",
|
|
Active = true,
|
|
Description = "PLC Alarm",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Warning",
|
|
Active = true,
|
|
Description = "Warning State",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "Message",
|
|
Active = true,
|
|
Description = "Machine Message",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "PzIncr",
|
|
Active = true,
|
|
Description = "Item Count Increment",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "PzSet",
|
|
Active = true,
|
|
Description = "Item Count Set",
|
|
IsUser = false
|
|
},
|
|
new
|
|
{
|
|
CodEvent = "UserComm",
|
|
Active = true,
|
|
Description = "User Comment",
|
|
IsUser = true
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.MachineModel", b =>
|
|
{
|
|
b.Property<int>("MachineId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("BuildYear")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Code")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("Model")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("Serial")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("MachineId");
|
|
|
|
b.ToTable("Machine");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
MachineId = 1,
|
|
BuildYear = 2022,
|
|
Code = "",
|
|
Description = "Default SIM Machine",
|
|
Model = "Egalware SIM",
|
|
Name = "EGW-SIM-Machine",
|
|
Serial = "SN-0000-0000-0000"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.PMMGroupModel", b =>
|
|
{
|
|
b.Property<string>("PMMGCode")
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("varchar(500)");
|
|
|
|
b.HasKey("PMMGCode");
|
|
|
|
b.ToTable("MachineGroup");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
PMMGCode = "Whole",
|
|
Description = "Whole Machine"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "Load",
|
|
Description = "Part loader/unloader"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "MovBelts",
|
|
Description = "Part moving belts"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "MovRoll",
|
|
Description = "Part moving rollers"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "Axis",
|
|
Description = "Machining axis"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "Spindles",
|
|
Description = "Tool spindles"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "ToolChange",
|
|
Description = "Automatic tool changer"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "Cabinet",
|
|
Description = "Electrical cabinet"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "ChipConv",
|
|
Description = "Chips conveyor"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "DustSuct",
|
|
Description = "Dust suction"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "OpPanel",
|
|
Description = "Operator pannel"
|
|
},
|
|
new
|
|
{
|
|
PMMGCode = "Access",
|
|
Description = "Accessories"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.PMTaskTopicModel", b =>
|
|
{
|
|
b.Property<string>("PMTCode")
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("varchar(500)");
|
|
|
|
b.HasKey("PMTCode");
|
|
|
|
b.ToTable("TaskTopic");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
PMTCode = "Mechanical",
|
|
Description = "Mechanical system"
|
|
},
|
|
new
|
|
{
|
|
PMTCode = "Electro",
|
|
Description = "Electrical system"
|
|
},
|
|
new
|
|
{
|
|
PMTCode = "Lubro",
|
|
Description = "Lubrication system"
|
|
},
|
|
new
|
|
{
|
|
PMTCode = "Coolant",
|
|
Description = "Coolant system"
|
|
},
|
|
new
|
|
{
|
|
PMTCode = "Preumo",
|
|
Description = "Pneumatic system"
|
|
},
|
|
new
|
|
{
|
|
PMTCode = "Hydro",
|
|
Description = "Hydraulic system"
|
|
},
|
|
new
|
|
{
|
|
PMTCode = "Safety",
|
|
Description = "Enclosure/Safety system"
|
|
},
|
|
new
|
|
{
|
|
PMTCode = "Suction",
|
|
Description = "Suction system"
|
|
},
|
|
new
|
|
{
|
|
PMTCode = "GeoAdj",
|
|
Description = "Geometrical system"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.PMUTModel", b =>
|
|
{
|
|
b.Property<string>("PMUTCode")
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("varchar(500)");
|
|
|
|
b.HasKey("PMUTCode");
|
|
|
|
b.ToTable("UserTeam");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
PMUTCode = "TrainOp",
|
|
Description = "Trained Operator"
|
|
},
|
|
new
|
|
{
|
|
PMUTCode = "MaintServ",
|
|
Description = "Maintenance Service"
|
|
},
|
|
new
|
|
{
|
|
PMUTCode = "DevSupp",
|
|
Description = "Device Supplier"
|
|
},
|
|
new
|
|
{
|
|
PMUTCode = "MultiaxServ",
|
|
Description = "Multiax Service"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.PrevMaintTaskModel", b =>
|
|
{
|
|
b.Property<int>("PMTaskId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("CCode")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<double>("ExpiryVal")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<int>("ExtIdx")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("JobDescription")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int>("MachineId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("NumTaskDone")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("PMMGCode")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("PMTCode")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("PMUTCode")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("PMTaskId");
|
|
|
|
b.HasIndex("CCode");
|
|
|
|
b.HasIndex("MachineId");
|
|
|
|
b.HasIndex("PMMGCode");
|
|
|
|
b.HasIndex("PMTCode");
|
|
|
|
b.HasIndex("PMUTCode");
|
|
|
|
b.ToTable("PrevMaintTask");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.ProdLogModel", b =>
|
|
{
|
|
b.Property<int>("ProdLogId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("DtRif")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("EvType")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("ExtRef")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int>("MachineId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<double>("ValNum")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<string>("ValStr")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("ProdLogId");
|
|
|
|
b.HasIndex("MachineId");
|
|
|
|
b.ToTable("ProdLog");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.ScheduledMaintModel", b =>
|
|
{
|
|
b.Property<int>("SMTaskId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("CCode")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<double>("CountStartVal")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<DateTime>("DtCreation")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<DateTime>("DtExecution")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<double>("ElapsedVal")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<double>("ExpiryVal")
|
|
.HasColumnType("double");
|
|
|
|
b.Property<int>("PMTaskId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("UserCode")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("SMTaskId");
|
|
|
|
b.HasIndex("CCode");
|
|
|
|
b.HasIndex("PMTaskId");
|
|
|
|
b.ToTable("ScheduledMaintTask");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.StatusLogModel", b =>
|
|
{
|
|
b.Property<int>("EventLogId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("CodStatus")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<DateTime>("DtRif")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<float>("Duration")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<int>("MachineId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ValStr")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("EventLogId");
|
|
|
|
b.HasIndex("CodStatus");
|
|
|
|
b.HasIndex("MachineId");
|
|
|
|
b.ToTable("StatusLog");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.StatusModel", b =>
|
|
{
|
|
b.Property<string>("CodStatus")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<string>("CssClass")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<string>("CssClassOvr")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.Property<string>("Group")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<string>("GroupOvr")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)");
|
|
|
|
b.Property<int>("Prior")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("ShowProdItem")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.HasKey("CodStatus");
|
|
|
|
b.ToTable("Status");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
CodStatus = "",
|
|
CssClass = "dark",
|
|
CssClassOvr = "",
|
|
Description = "NA",
|
|
Group = "NA",
|
|
GroupOvr = "",
|
|
Prior = 0,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Error",
|
|
CssClass = "danger",
|
|
CssClassOvr = "",
|
|
Description = "Error",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 5,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Emergency",
|
|
CssClass = "danger",
|
|
CssClassOvr = "",
|
|
Description = "Emergency",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 5,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Manual",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Manual",
|
|
Group = "ManYellow",
|
|
GroupOvr = "",
|
|
Prior = 4,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "PzProd",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Item Produced",
|
|
Group = "MicroYellow",
|
|
GroupOvr = "",
|
|
Prior = 4,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Unkn",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Unknown Stop",
|
|
Group = "MicroYellow",
|
|
GroupOvr = "",
|
|
Prior = 4,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "ProgMissing",
|
|
CssClass = "danger",
|
|
CssClassOvr = "",
|
|
Description = "Program Missing",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "HRMissing",
|
|
CssClass = "danger",
|
|
CssClassOvr = "",
|
|
Description = "HR Missing",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Maint",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Maintenance",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "LineOutFull",
|
|
CssClass = "danger",
|
|
CssClassOvr = "",
|
|
Description = "Line Out Full",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "LineInEmpty",
|
|
CssClass = "danger",
|
|
CssClassOvr = "",
|
|
Description = "Line In Empty",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "RawMatMiss",
|
|
CssClass = "danger",
|
|
CssClassOvr = "",
|
|
Description = "Raw Material Missing",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "CncAlam",
|
|
CssClass = "danger",
|
|
CssClassOvr = "",
|
|
Description = "CNC Alarm",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "PlcAlam",
|
|
CssClass = "danger",
|
|
CssClassOvr = "",
|
|
Description = "PLC Alarm",
|
|
Group = "StopRed",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "WUpCDown",
|
|
CssClass = "primary",
|
|
CssClassOvr = "",
|
|
Description = "Warm Up / CoolDown Machine",
|
|
Group = "WaitBlue",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "ContrPOnSDown",
|
|
CssClass = "primary",
|
|
CssClassOvr = "",
|
|
Description = "Controller PowerOn / ShutDown",
|
|
Group = "WaitBlue",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Init",
|
|
CssClass = "primary",
|
|
CssClassOvr = "",
|
|
Description = "Init",
|
|
Group = "WaitBlue",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "PowerOn",
|
|
CssClass = "primary",
|
|
CssClassOvr = "",
|
|
Description = "Power ON",
|
|
Group = "WaitBlue",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "TimeoutCycle",
|
|
CssClass = "primary",
|
|
CssClassOvr = "",
|
|
Description = "Timeout Std CycleTime",
|
|
Group = "WaitBlue",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Waiting",
|
|
CssClass = "primary",
|
|
CssClassOvr = "",
|
|
Description = "Waiting State",
|
|
Group = "WaitBlue",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "ProgEdit",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Program Editing",
|
|
Group = "ManYellow",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Setup",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Machine Setup",
|
|
Group = "ManYellow",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Clean",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Machine CleanUp",
|
|
Group = "ManYellow",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Fill",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Machine Fill",
|
|
Group = "MicroYellow",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "ToolReplace",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Tool Replacement",
|
|
Group = "MicroYellow",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Warning",
|
|
CssClass = "warning",
|
|
CssClassOvr = "",
|
|
Description = "Warning State",
|
|
Group = "MicroYellow",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "PowerOff",
|
|
CssClass = "secondary",
|
|
CssClassOvr = "",
|
|
Description = "Power OFF",
|
|
Group = "Gray",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Run",
|
|
CssClass = "success",
|
|
CssClassOvr = "",
|
|
Description = "Running",
|
|
Group = "Green",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
},
|
|
new
|
|
{
|
|
CodStatus = "Cycle",
|
|
CssClass = "success",
|
|
CssClassOvr = "",
|
|
Description = "Machining",
|
|
Group = "Green",
|
|
GroupOvr = "",
|
|
Prior = 1,
|
|
ShowProdItem = true
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.StatusStAgModel", b =>
|
|
{
|
|
b.Property<int>("DataStAgId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("CodStatus")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<DateTime>("DtRif")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<float>("Duration")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<int>("MachineId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ValStr")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("varchar(250)");
|
|
|
|
b.HasKey("DataStAgId");
|
|
|
|
b.HasIndex("CodStatus");
|
|
|
|
b.HasIndex("MachineId");
|
|
|
|
b.ToTable("StatusStAg");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.AlarmLogModel", b =>
|
|
{
|
|
b.HasOne("MP.MONO.Data.DbModels.MachineModel", "MachineNav")
|
|
.WithMany()
|
|
.HasForeignKey("MachineId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("MachineNav");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.DataLogModel", b =>
|
|
{
|
|
b.HasOne("MP.MONO.Data.DbModels.MachineModel", "MachineNav")
|
|
.WithMany()
|
|
.HasForeignKey("MachineId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("MachineNav");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.DataStAgModel", b =>
|
|
{
|
|
b.HasOne("MP.MONO.Data.DbModels.MachineModel", "MachineNav")
|
|
.WithMany()
|
|
.HasForeignKey("MachineId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("MachineNav");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.EventLogModel", b =>
|
|
{
|
|
b.HasOne("MP.MONO.Data.DbModels.EventModel", "CodEventNav")
|
|
.WithMany()
|
|
.HasForeignKey("CodEvent")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("MP.MONO.Data.DbModels.MachineModel", "MachineNav")
|
|
.WithMany()
|
|
.HasForeignKey("MachineId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("CodEventNav");
|
|
|
|
b.Navigation("MachineNav");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.PrevMaintTaskModel", b =>
|
|
{
|
|
b.HasOne("MP.MONO.Data.DbModels.CounterModel", "CounterNav")
|
|
.WithMany()
|
|
.HasForeignKey("CCode")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("MP.MONO.Data.DbModels.MachineModel", "MachineNav")
|
|
.WithMany()
|
|
.HasForeignKey("MachineId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("MP.MONO.Data.DbModels.PMMGroupModel", "MachGroupNav")
|
|
.WithMany()
|
|
.HasForeignKey("PMMGCode")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("MP.MONO.Data.DbModels.PMTaskTopicModel", "TopicNav")
|
|
.WithMany()
|
|
.HasForeignKey("PMTCode")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("MP.MONO.Data.DbModels.PMUTModel", "UserTeamNav")
|
|
.WithMany()
|
|
.HasForeignKey("PMUTCode")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("CounterNav");
|
|
|
|
b.Navigation("MachGroupNav");
|
|
|
|
b.Navigation("MachineNav");
|
|
|
|
b.Navigation("TopicNav");
|
|
|
|
b.Navigation("UserTeamNav");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.ProdLogModel", b =>
|
|
{
|
|
b.HasOne("MP.MONO.Data.DbModels.MachineModel", "MachineNav")
|
|
.WithMany()
|
|
.HasForeignKey("MachineId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("MachineNav");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.ScheduledMaintModel", b =>
|
|
{
|
|
b.HasOne("MP.MONO.Data.DbModels.CounterModel", "CounterNav")
|
|
.WithMany()
|
|
.HasForeignKey("CCode")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("MP.MONO.Data.DbModels.PrevMaintTaskModel", "PMTaskeNav")
|
|
.WithMany()
|
|
.HasForeignKey("PMTaskId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("CounterNav");
|
|
|
|
b.Navigation("PMTaskeNav");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.StatusLogModel", b =>
|
|
{
|
|
b.HasOne("MP.MONO.Data.DbModels.StatusModel", "CodStatusNav")
|
|
.WithMany()
|
|
.HasForeignKey("CodStatus")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("MP.MONO.Data.DbModels.MachineModel", "MachineNav")
|
|
.WithMany()
|
|
.HasForeignKey("MachineId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("CodStatusNav");
|
|
|
|
b.Navigation("MachineNav");
|
|
});
|
|
|
|
modelBuilder.Entity("MP.MONO.Data.DbModels.StatusStAgModel", b =>
|
|
{
|
|
b.HasOne("MP.MONO.Data.DbModels.StatusModel", "CodStatusNav")
|
|
.WithMany()
|
|
.HasForeignKey("CodStatus")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("MP.MONO.Data.DbModels.MachineModel", "MachineNav")
|
|
.WithMany()
|
|
.HasForeignKey("MachineId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("CodStatusNav");
|
|
|
|
b.Navigation("MachineNav");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|