Browse Source

生成7个实体,数据表关系

master
me 3 weeks ago
parent
commit
649deac724
  1. 108
      API/TaskManager.Entity/Entity.cs
  2. 78
      API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_ATTACHMENT_DATA.cs
  3. 79
      API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_ENVIRONMENT.cs
  4. 124
      API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_FLAW.cs
  5. 90
      API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_MATERIAL_DATA.cs
  6. 102
      API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE.cs
  7. 82
      API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_OEE_TIME_DETAILS.cs
  8. 86
      API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_PROCESS.cs
  9. 130
      API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_PROCESS_EQUIPMENT.cs
  10. 514
      API/TaskManager.EntityFramework/JobDbContext.cs
  11. 2411
      API/TaskManager.EntityFramework/Migrations/20250529005719_2025052901.Designer.cs
  12. 502
      API/TaskManager.EntityFramework/Migrations/20250529005719_2025052901.cs
  13. 2389
      API/TaskManager.EntityFramework/Migrations/20250529013720_2025052902.Designer.cs
  14. 530
      API/TaskManager.EntityFramework/Migrations/20250529013720_2025052902.cs
  15. 3312
      API/TaskManager.EntityFramework/Migrations/20250529020443_2025052903.Designer.cs
  16. 303
      API/TaskManager.EntityFramework/Migrations/20250529020443_2025052903.cs
  17. 1347
      API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs

108
API/TaskManager.Entity/Entity.cs

@ -59,7 +59,7 @@ namespace TaskManager.Entity
public DateTime CreationTime { get; set; }
public string Remark { get; set; }
public string? Remark { get; set; }
public Guid TaskId { get; set; }
}
@ -144,58 +144,58 @@ namespace TaskManager.Entity
/// <summary>
/// 缺陷业务数据
/// </summary>
public class SUPPLIER_PRO_FLAW : BaseEntity
{
}
//public class SUPPLIER_PRO_FLAW : BaseEntity
//{
//}
/// <summary>
/// 环境业务数据
/// </summary>
public class SUPPLIER_PRO_ENVIRONMENT : BaseEntity
{
}
///// <summary>
///// 环境业务数据
///// </summary>
//public class SUPPLIER_PRO_ENVIRONMENT : BaseEntity
//{
//}
/// <summary>
/// 设备OEE达成率
/// </summary>
public class SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE : BaseEntity
{
}
///// <summary>
///// 设备OEE达成率
///// </summary>
//public class SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE : BaseEntity
//{
//}
/// <summary>
/// OEE时间明细
/// </summary>
public class SUPPLIER_PRO_OEE_TIME_DETAILS : BaseEntity
{
}
///// <summary>
///// OEE时间明细
///// </summary>
//public class SUPPLIER_PRO_OEE_TIME_DETAILS : BaseEntity
//{
//}
/// <summary>
/// 物料主数据
/// </summary>
public class SUPPLIER_PRO_MATERIAL_DATA : BaseEntity
{
}
///// <summary>
///// 物料主数据
///// </summary>
//public class SUPPLIER_PRO_MATERIAL_DATA : BaseEntity
//{
//}
/// <summary>
/// 附件类数据
/// </summary>
public class SUPPLIER_PRO_ATTACHMENT_DATA : BaseEntity
{
}
///// <summary>
///// 附件类数据
///// </summary>
//public class SUPPLIER_PRO_ATTACHMENT_DATA : BaseEntity
//{
//}
/// <summary>
/// 工艺装备
/// </summary>
public class SUPPLIER_PRO_PROCESS_EQUIPMENT : BaseEntity
{
}
///// <summary>
///// 工艺装备
///// </summary>
//public class SUPPLIER_PRO_PROCESS_EQUIPMENT : BaseEntity
//{
//}
/// <summary>
/// 工艺
/// </summary>
public class SUPPLIER_PRO_PROCESS : BaseEntity
{
}
///// <summary>
///// 工艺
///// </summary>
//public class SUPPLIER_PRO_PROCESS : BaseEntity
//{
//}
/// <summary>
/// 整车月度生产计划-2
@ -750,20 +750,4 @@ namespace TaskManager.Entity
public int Version { get; set; }
}
}

78
API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_ATTACHMENT_DATA.cs

@ -0,0 +1,78 @@
namespace TaskManager.Entity.Entitys
{
/// <summary>
/// 附件类数据
/// </summary>
public class SUPPLIER_PRO_ATTACHMENT_DATA : BaseEntity
{
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 数据类型(1产前管理;2人员资质;3监控视频)
/// </summary>
public string Type { get; set; }
/// <summary>
/// 文件名
/// </summary>
public string FileName { get; set; }
/// <summary>
/// 图文地址
/// </summary>
public string FileUrl { get; set; }
/// <summary>
/// 生成时间,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string DateTime { get; set; }
/// <summary>
/// 产线名称
/// </summary>
public string ProductionLineName { get; set; }
/// <summary>
/// 产线代码
/// </summary>
public string ProductionLineId { get; set; }
/// <summary>
/// 工位名称
/// </summary>
public string StationName { get; set; }
/// <summary>
/// 工位代码
/// </summary>
public string StationId { get; set; }
/// <summary>
/// 设备名称
/// </summary>
public string DeviceName { get; set; }
/// <summary>
/// 设备编码
/// </summary>
public string? DeviceId { get; set; }
/// <summary>
/// 供应商总成零件号
/// </summary>
public string VendorProductNo { get; set; }
/// <summary>
/// 供应商总成零件名称
/// </summary>
public string VendorProductName { get; set; }
/// <summary>
/// 奇瑞零件号
/// </summary>
public string CheryProductNo { get; set; }
/// <summary>
/// 奇瑞零件名称
/// </summary>
public string CheryProductName { get; set; }
/// <summary>
/// 供应商总成SN码
/// </summary>
public string? VendorProductSn { get; set; }
}
}

79
API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_ENVIRONMENT.cs

@ -0,0 +1,79 @@
namespace TaskManager.Entity.Entitys
{
/// <summary>
/// 环境业务数据
/// </summary>
public class SUPPLIER_PRO_ENVIRONMENT : BaseEntity
{
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 工厂代码
/// </summary>
public string PlantId { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string PlantName { get; set; }
/// <summary>
/// 车间代码
/// </summary>
public string WorkshopId { get; set; }
/// <summary>
/// 车间名称
/// </summary>
public string WorkshopName { get; set; }
/// <summary>
/// 产线代码
/// </summary>
public string ProductionLineId { get; set; }
/// <summary>
/// 产线名称
/// </summary>
public string ProductionLineName { get; set; }
/// <summary>
/// 环境指标名称,例如:温度、湿度、洁净度等
/// </summary>
public string EnvIndicatorName { get; set; }
/// <summary>
/// 指标实测值,(最大支持11位整数+5位小数)
/// </summary>
public decimal? NumValue { get; set; }
/// <summary>
/// 上限值,(最大支持11位整数+5位小数)
/// </summary>
public decimal UpperLimit { get; set; }
/// <summary>
/// 下限值,(最大支持11位整数+5位小数)
/// </summary>
public decimal LowerLimit { get; set; }
/// <summary>
/// 单位,相应的单位名称,如度数
/// </summary>
public string ChineseUnit { get; set; }
/// <summary>
/// 采集仪器代码,环境采集的仪器/工具代码
/// </summary>
public string EquipmentCode { get; set; }
/// <summary>
/// 采集仪器名称,环境采集的仪器/工具名称
/// </summary>
public string EquipmentName { get; set; }
/// <summary>
/// 数据采集的点位
/// </summary>
public string? DataCollectionPoint { get; set; }
/// <summary>
/// 数据采集的时间,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string CollectTime { get; set; }
}
}

124
API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_FLAW.cs

@ -0,0 +1,124 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TaskManager.Entity.Entitys
{
/// <summary>
/// 缺陷业务数据
/// </summary>
public class SUPPLIER_PRO_FLAW : BaseEntity
{
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 工厂代码
/// </summary>
public string PlantId { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string PlantName { get; set; }
/// <summary>
/// 车间代码
/// </summary>
public string WorkshopId { get; set; }
/// <summary>
/// 车间名称
/// </summary>
public string WorkshopName { get; set; }
/// <summary>
/// 产线代码
/// </summary>
public string ProductionLineId { get; set; }
/// <summary>
/// 产线名称
/// </summary>
public string ProductionLineName { get; set; }
/// <summary>
/// 工位代码
/// </summary>
public string StationId { get; set; }
/// <summary>
/// 工位名称
/// </summary>
public string StationName { get; set; }
/// <summary>
/// 缺陷代码
/// </summary>
public string DefectsCode { get; set; }
/// <summary>
/// 缺陷名称
/// </summary>
public string DefectsName { get; set; }
/// <summary>
/// 缺陷分类(外观,尺寸,材料,功能,性能,其他)
/// </summary>
public string ClassOfName { get; set; }
/// <summary>
/// 供应商总成零件号
/// </summary>
public string VendorProductNo { get; set; }
/// <summary>
/// 供应商总成零件名称
/// </summary>
public string VendorProductName { get; set; }
/// <summary>
/// 供应商总成批次号
/// </summary>
public string VendorProductBatch { get; set; }
/// <summary>
/// 供应商总成SN码
/// </summary>
public string VendorProductSn { get; set; }
/// <summary>
/// 奇瑞零件号
/// </summary>
public string CheryProductNo { get; set; }
/// <summary>
/// 奇瑞零件名称
/// </summary>
public string CheryProductName { get; set; }
/// <summary>
/// 奇瑞SN码
/// </summary>
public string CheryProductSn { get; set; }
/// <summary>
/// 生产批次号
/// </summary>
public string ProductBatchNo { get; set; }
/// <summary>
/// 生产工单号,或生产批次(工单业务数据)
/// </summary>
public string ManufactureNo { get; set; }
/// <summary>
/// 班次(白班,晚班,中班)
/// </summary>
public string WorkShift { get; set; }
/// <summary>
/// 缺陷件数
/// </summary>
public decimal Numberofdefect { get; set; }
/// <summary>
/// 缺陷描述
/// </summary>
public string DefectsDesc { get; set; }
/// <summary>
/// 缺陷等级,(1.严重、2.一般、3.轻微)
/// </summary>
public string DefectsLevel { get; set; }
/// <summary>
/// 缺陷录入时间,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string StatisticalTime { get; set; }
}
}

90
API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_MATERIAL_DATA.cs

@ -0,0 +1,90 @@
namespace TaskManager.Entity.Entitys
{
/// <summary>
/// 物料主数据
/// </summary>
public class SUPPLIER_PRO_MATERIAL_DATA : BaseEntity
{
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 供应商物料号
/// </summary>
public string VendorProductNo { get; set; }
/// <summary>
/// 供应商物料名称
/// </summary>
public string VendorProductName { get; set; }
/// <summary>
/// 类型(成品,半成品,原材料)
/// </summary>
public decimal Type { get; set; }
/// <summary>
/// 供应商零件版本号
/// </summary>
public string? VendorHardwareRevision { get; set; }
/// <summary>
/// 奇瑞零件号
/// </summary>
public string CheryProductNo { get; set; }
/// <summary>
/// 奇瑞零件名称
/// </summary>
public string CheryProductName { get; set; }
/// <summary>
/// 奇瑞硬件版本号
/// </summary>
public string OemHardwareRevision { get; set; }
/// <summary>
/// 奇瑞软件版本号
/// </summary>
public string? OemSoftwareRevision { get; set; }
/// <summary>
/// 车型
/// </summary>
public string? OemModel { get; set; }
/// <summary>
/// 项目名称
/// </summary>
public string? OemProjectName { get; set; }
/// <summary>
/// 是否SOP(Y/N)
/// </summary>
public string? Launched { get; set; }
/// <summary>
/// 数据同步执行时间,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string? DateTime { get; set; }
/// <summary>
/// 供应商工厂代码
/// </summary>
public string? PlantId { get; set; }
/// <summary>
/// 供应商工厂名称
/// </summary>
public string? PlantName { get; set; }
/// <summary>
/// 芯片采购类型(AVAP,CS,CMcontro)
/// </summary>
public string? ProcurementType { get; set; }
/// <summary>
/// 芯片MPN标识码
/// </summary>
public string? MpnCode { get; set; }
/// <summary>
/// 芯片MPN标识名称
/// </summary>
public string? MpnName { get; set; }
/// <summary>
/// 物料有效期(天)
/// </summary>
public string ValidDays { get; set; }
}
}

102
API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE.cs

@ -0,0 +1,102 @@
namespace TaskManager.Entity.Entitys
{
/// <summary>
/// 设备OEE达成率
/// </summary>
public class SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE : BaseEntity
{
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 工厂代码
/// </summary>
public string PlantId { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string PlantName { get; set; }
/// <summary>
/// 车间代码
/// </summary>
public string WorkshopId { get; set; }
/// <summary>
/// 车间名称
/// </summary>
public string WorkshopName { get; set; }
/// <summary>
/// 产线代码
/// </summary>
public string ProductionLineId { get; set; }
/// <summary>
/// 产线名称
/// </summary>
public string ProductionLineName { get; set; }
/// <summary>
/// 工位代码
/// </summary>
public string StationId { get; set; }
/// <summary>
/// 工位名称
/// </summary>
public string StationName { get; set; }
/// <summary>
/// 设备代码
/// </summary>
public string DeviceId { get; set; }
/// <summary>
/// 设备名称
/// </summary>
public string? DeviceName { get; set; }
/// <summary>
/// 奇瑞零件号
/// </summary>
public string CheryProductNo { get; set; }
/// <summary>
/// 奇瑞零件名称
/// </summary>
public string CheryProductName { get; set; }
/// <summary>
/// 供应商总成零件号
/// </summary>
public string VendorProductNo { get; set; }
/// <summary>
/// 供应商总成零件名称
/// </summary>
public string VendorProductName { get; set; }
/// <summary>
/// 生产批次号
/// </summary>
public string ProductBatchNo { get; set; }
/// <summary>
/// 生产工单号
/// </summary>
public string ManufactureNo { get; set; }
/// <summary>
/// OEE实际值
/// </summary>
public decimal Rate { get; set; }
/// <summary>
/// OEE目标值
/// </summary>
public decimal RateTagValue { get; set; }
/// <summary>
/// 班次(白班,晚班,中班)
/// </summary>
public string WorkShift { get; set; }
/// <summary>
/// 生产日期,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string StatisticalTime { get; set; }
/// <summary>
/// 值统计时间,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string DateTime { get; set; }
}
}

82
API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_OEE_TIME_DETAILS.cs

@ -0,0 +1,82 @@
namespace TaskManager.Entity.Entitys
{
/// <summary>
/// OEE时间明细
/// </summary>
public class SUPPLIER_PRO_OEE_TIME_DETAILS : BaseEntity
{
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 工厂代码
/// </summary>
public string PlantId { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string PlantName { get; set; }
/// <summary>
/// 车间代码
/// </summary>
public string WorkshopId { get; set; }
/// <summary>
/// 车间名称
/// </summary>
public string? WorkshopName { get; set; }
/// <summary>
/// 产线代码
/// </summary>
public string ProductionLineId { get; set; }
/// <summary>
/// 产线名称
/// </summary>
public string? ProductionLineName { get; set; }
/// <summary>
/// 工位代码
/// </summary>
public string StationId { get; set; }
/// <summary>
/// 工位名称
/// </summary>
public string StationName { get; set; }
/// <summary>
/// 设备代码
/// </summary>
public string DeviceId { get; set; }
/// <summary>
/// 设备名称
/// </summary>
public string DeviceName { get; set; }
/// <summary>
/// 记录ID
/// </summary>
public string RecId { get; set; }
/// <summary>
/// 大类(1计划工作,2计划停机,3非计划停机)
/// </summary>
public string Type { get; set; }
/// <summary>
/// 小类编码
/// </summary>
public string SubType { get; set; }
/// <summary>
/// 小类描述
/// </summary>
public string SubTypeName { get; set; }
/// <summary>
/// 开始时间,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string StartTime { get; set; }
/// <summary>
/// 结束时间,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string EndTime { get; set; }
}
}

86
API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_PROCESS.cs

@ -0,0 +1,86 @@
namespace TaskManager.Entity.Entitys
{
/// <summary>
/// 工艺
/// </summary>
public class SUPPLIER_PRO_PROCESS : BaseEntity
{
/// <summary>
/// 奇瑞零件号
/// </summary>
public string CheryProductNo { get; set; }
/// <summary>
/// 奇瑞零件名称
/// </summary>
public string CheryProductName { get; set; }
/// <summary>
/// 供应商总成零件号
/// </summary>
public string VendorProductNo { get; set; }
/// <summary>
/// 供应商总成零件名称
/// </summary>
public string VendorProductName { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 工艺编码
/// </summary>
public string TechCode { get; set; }
/// <summary>
/// 工艺名称
/// </summary>
public string TechName { get; set; }
/// <summary>
/// 有效期,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string ValidPeriod { get; set; }
/// <summary>
/// 工艺版本
/// </summary>
public string TechVersion { get; set; }
/// <summary>
/// 模具编码
/// </summary>
public string MoldCode { get; set; }
/// <summary>
/// 模具名称
/// </summary>
public string MoldName { get; set; }
/// <summary>
/// 最大加工能力
/// </summary>
public string MaxProcessingCapacity { get; set; }
/// <summary>
/// 工序编码
/// </summary>
public string ProcessCode { get; set; }
/// <summary>
/// 工序名称
/// </summary>
public string ProcessName { get; set; }
/// <summary>
/// 工序顺序号
/// </summary>
public decimal ProcessOrder { get; set; }
/// <summary>
/// 设备编码
/// </summary>
public string DeviceCode { get; set; }
/// <summary>
/// 工序节拍
/// </summary>
public decimal Rhythm { get; set; }
/// <summary>
/// 节拍单位
/// </summary>
public string RhythmUnit { get; set; }
}
}

130
API/TaskManager.Entity/Entitys/10_17/SUPPLIER_PRO_PROCESS_EQUIPMENT.cs

@ -0,0 +1,130 @@
namespace TaskManager.Entity.Entitys
{
/// <summary>
/// 工艺装备
/// </summary>
public class SUPPLIER_PRO_PROCESS_EQUIPMENT : BaseEntity
{
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 奇瑞零件号
/// </summary>
public string CheryProductNo { get; set; }
/// <summary>
/// 奇瑞零件名称
/// </summary>
public string CheryProductName { get; set; }
/// <summary>
/// 供应商总成零件号
/// </summary>
public string VendorProductNo { get; set; }
/// <summary>
/// 供应商总成零件名称
/// </summary>
public string VendorProductName { get; set; }
/// <summary>
/// 工艺装备类型分类(1模具;2检具;3夹具)
/// </summary>
public decimal DeviceType { get; set; }
/// <summary>
/// 工艺装备编码
/// </summary>
public string DeviceCode { get; set; }
/// <summary>
/// 工艺装备名称
/// </summary>
public string DeviceName { get; set; }
/// <summary>
/// 生产厂家
/// </summary>
public string Manufacturer { get; set; }
/// <summary>
/// 工艺装备型号
/// </summary>
public string ModelNumber { get; set; }
/// <summary>
/// 工艺装备序列号
/// </summary>
public string SerialNumber { get; set; }
/// <summary>
/// 工艺装备制造日期,格式(yyyy-MM-dd)
/// </summary>
public string ProductionDate { get; set; }
/// <summary>
/// 主要材质
/// </summary>
public string Material { get; set; }
/// <summary>
/// 当前存放地点
/// </summary>
public string CurrentLocation { get; set; }
/// <summary>
/// 工艺装备状态
/// </summary>
public string DeviceStatus { get; set; }
/// <summary>
/// 穴腔数量
/// </summary>
public decimal CavityCount { get; set; }
/// <summary>
/// 模具尺寸规格
/// </summary>
public string MoldSize { get; set; }
/// <summary>
/// 设计寿命单位
/// </summary>
public string DesignLifeUnits { get; set; }
/// <summary>
/// 设计寿命
/// </summary>
public string DesignLifeValue { get; set; }
/// <summary>
/// 当前剩余寿命,
/// </summary>
public string CurrentUsageCount { get; set; }
/// <summary>
/// 模具大修次数
/// </summary>
public decimal OverhaulCount { get; set; }
/// <summary>
/// 图纸编号描述
/// </summary>
public string CoolingChannelLayout { get; set; }
/// <summary>
/// 检测精度
/// </summary>
public string DetectionAccuracy { get; set; }
/// <summary>
/// 最近校准日期,格式(yyyy-MM-ddHH:mm:ss)
/// </summary>
public string CalibrationDate { get; set; }
/// <summary>
/// 校准到期天数
/// </summary>
public string CalibrationDueDays { get; set; }
/// <summary>
/// 允许误差范围
/// </summary>
public string ToleranceRange { get; set; }
/// <summary>
/// 磨损阈值
/// </summary>
public string WearThreshold { get; set; }
/// <summary>
/// 检测范围
/// </summary>
public string DetectionRange { get; set; }
/// <summary>
/// 检测单位
/// </summary>
public string UnitType { get; set; }
}
}

514
API/TaskManager.EntityFramework/JobDbContext.cs

@ -115,40 +115,40 @@ namespace TaskManager.EntityFramework
/// </summary>
public DbSet<SUPPLIER_PRO_FLAW> SUPPLIER_PRO_FLAW { get; set; }
/// <summary>
/// 环境业务数据
/// </summary>
public DbSet<SUPPLIER_PRO_ENVIRONMENT> SUPPLIER_PRO_ENVIRONMENT { get; set; }
/// <summary>
/// 设备OEE达成率
/// </summary>
public DbSet<SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE> SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE { get; set; }
/// <summary>
/// OEE时间明细
/// </summary>
public DbSet<SUPPLIER_PRO_OEE_TIME_DETAILS> SUPPLIER_PRO_OEE_TIME_DETAILS { get; set; }
/// <summary>
/// 物料主数据
/// </summary>
public DbSet<SUPPLIER_PRO_MATERIAL_DATA> SUPPLIER_PRO_MATERIAL_DATA { get; set; }
/// <summary>
/// 附件类数据
/// </summary>
public DbSet<SUPPLIER_PRO_ATTACHMENT_DATA> SUPPLIER_PRO_ATTACHMENT_DATA { get; set; }
/// <summary>
/// 工艺装备
/// </summary>
public DbSet<SUPPLIER_PRO_PROCESS_EQUIPMENT> SUPPLIER_PRO_PROCESS_EQUIPMENT { get; set; }
/// <summary>
/// 工艺
/// </summary>
public DbSet<SUPPLIER_PRO_PROCESS> SUPPLIER_PRO_PROCESS { get; set; }
///// <summary>
///// 环境业务数据
///// </summary>
//public DbSet<SUPPLIER_PRO_ENVIRONMENT> SUPPLIER_PRO_ENVIRONMENT { get; set; }
///// <summary>
///// 设备OEE达成率
///// </summary>
//public DbSet<SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE> SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE { get; set; }
///// <summary>
///// OEE时间明细
///// </summary>
//public DbSet<SUPPLIER_PRO_OEE_TIME_DETAILS> SUPPLIER_PRO_OEE_TIME_DETAILS { get; set; }
///// <summary>
///// 物料主数据
///// </summary>
//public DbSet<SUPPLIER_PRO_MATERIAL_DATA> SUPPLIER_PRO_MATERIAL_DATA { get; set; }
///// <summary>
///// 附件类数据
///// </summary>
//public DbSet<SUPPLIER_PRO_ATTACHMENT_DATA> SUPPLIER_PRO_ATTACHMENT_DATA { get; set; }
///// <summary>
///// 工艺装备
///// </summary>
//public DbSet<SUPPLIER_PRO_PROCESS_EQUIPMENT> SUPPLIER_PRO_PROCESS_EQUIPMENT { get; set; }
///// <summary>
///// 工艺
///// </summary>
//public DbSet<SUPPLIER_PRO_PROCESS> SUPPLIER_PRO_PROCESS { get; set; }
/// <summary>
/// 整车月度生产计划-2
@ -252,10 +252,7 @@ namespace TaskManager.EntityFramework
// 其他配置...
//工位一次合格率
# region 工位一次合格率
modelBuilder.Entity<SUPPLIER_PRO_STATION_FIRST_PASSYIELD>(b =>
{
b.ToTable("SUPPLIER_PRO_STATION_FIRST_PASSYIELD");
@ -312,15 +309,454 @@ namespace TaskManager.EntityFramework
b.HasKey(e => e.UId);
});
#endregion
#region 缺陷业务数据
modelBuilder.Entity<SUPPLIER_PRO_FLAW>(b =>
{
b.ToTable("SUPPLIER_PRO_FLAW");
//供应商代码
b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商名称
b.Property(e => e.SupplierName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工厂代码
b.Property(e => e.PlantId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工厂名称
b.Property(e => e.PlantName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//车间代码
b.Property(e => e.WorkshopId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//车间名称
b.Property(e => e.WorkshopName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//产线代码
b.Property(e => e.ProductionLineId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//产线名称
b.Property(e => e.ProductionLineName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工位代码
b.Property(e => e.StationId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工位名称
b.Property(e => e.StationName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//缺陷代码
b.Property(e => e.DefectsCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//缺陷名称
b.Property(e => e.DefectsName).HasColumnType("VARCHAR").HasMaxLength(100).IsRequired();
//缺陷分类(外观,尺寸,材料,功能,性能,其他)
b.Property(e => e.ClassOfName).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商总成零件号
b.Property(e => e.VendorProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商总成零件名称
b.Property(e => e.VendorProductName).HasColumnType("VARCHAR").HasMaxLength(100).IsRequired();
//供应商总成批次号
b.Property(e => e.VendorProductBatch).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商总成SN码
b.Property(e => e.VendorProductSn).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//奇瑞零件号
b.Property(e => e.CheryProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//奇瑞零件名称
b.Property(e => e.CheryProductName).HasColumnType("VARCHAR").HasMaxLength(100).IsRequired();
//奇瑞SN码
b.Property(e => e.CheryProductSn).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//生产批次号
b.Property(e => e.ProductBatchNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//生产工单号,或生产批次(工单业务数据)
b.Property(e => e.ManufactureNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//班次(白班,晚班,中班)
b.Property(e => e.WorkShift).HasColumnType("VARCHAR").HasMaxLength(10).IsRequired();
//缺陷件数
b.Property(e => e.Numberofdefect).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired();
//缺陷描述
b.Property(e => e.DefectsDesc).HasColumnType("VARCHAR").HasMaxLength(255).IsRequired();
//缺陷等级,(1.严重、2.一般、3.轻微)
b.Property(e => e.DefectsLevel).HasColumnType("CHAR").HasMaxLength(1).IsRequired();
//缺陷录入时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.StatisticalTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
b.Property(e => e.WriteState).HasDefaultValue(false);
b.HasKey(e => e.UId);
}
});
#endregion
#region 环境业务数据
modelBuilder.Entity<SUPPLIER_PRO_ENVIRONMENT>(b =>
{
b.ToTable("SUPPLIER_PRO_ENVIRONMENT");
//供应商代码
b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商名称
b.Property(e => e.SupplierName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工厂代码
b.Property(e => e.PlantId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工厂名称
b.Property(e => e.PlantName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//车间代码
b.Property(e => e.WorkshopId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//车间名称
b.Property(e => e.WorkshopName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//产线代码
b.Property(e => e.ProductionLineId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//产线名称
b.Property(e => e.ProductionLineName).HasColumnType("VARCHAR").HasMaxLength(100).IsRequired();
//环境指标名称,例如:温度、湿度、洁净度等
b.Property(e => e.EnvIndicatorName).HasColumnType("VARCHAR").HasMaxLength(100).IsRequired();
//指标实测值,(最大支持11位整数+5位小数)
b.Property(e => e.NumValue).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false);
//上限值,(最大支持11位整数+5位小数)
b.Property(e => e.UpperLimit).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired();
//下限值,(最大支持11位整数+5位小数)
b.Property(e => e.LowerLimit).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired();
//单位,相应的单位名称,如度数
b.Property(e => e.ChineseUnit).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//采集仪器代码,环境采集的仪器/工具代码
b.Property(e => e.EquipmentCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//采集仪器名称,环境采集的仪器/工具名称
b.Property(e => e.EquipmentName).HasColumnType("VARCHAR").HasMaxLength(100).IsRequired();
//数据采集的点位
b.Property(e => e.DataCollectionPoint).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(false);
//数据采集的时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.CollectTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
b.Property(e => e.WriteState).HasDefaultValue(false);
b.HasKey(e => e.UId);
});
#endregion
#region 设备OEE达成率
modelBuilder.Entity<SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE>(b =>
{
b.ToTable("SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE");
//供应商代码
b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商名称
b.Property(e => e.SupplierName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工厂代码
b.Property(e => e.PlantId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工厂名称
b.Property(e => e.PlantName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//车间代码
b.Property(e => e.WorkshopId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//车间名称
b.Property(e => e.WorkshopName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//产线代码
b.Property(e => e.ProductionLineId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//产线名称
b.Property(e => e.ProductionLineName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工位代码
b.Property(e => e.StationId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工位名称
b.Property(e => e.StationName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//设备代码
b.Property(e => e.DeviceId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//设备名称
b.Property(e => e.DeviceName).HasColumnType("nvarchar").HasMaxLength(50).IsRequired(false);
//奇瑞零件号
b.Property(e => e.CheryProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//奇瑞零件名称
b.Property(e => e.CheryProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//供应商总成零件号
b.Property(e => e.VendorProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商总成零件名称
b.Property(e => e.VendorProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//生产批次号
b.Property(e => e.ProductBatchNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//生产工单号
b.Property(e => e.ManufactureNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//OEE实际值
b.Property(e => e.Rate).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired();
//OEE目标值
b.Property(e => e.RateTagValue).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired();
//班次(白班,晚班,中班)
b.Property(e => e.WorkShift).HasColumnType("VARCHAR").HasMaxLength(10).IsRequired();
//生产日期,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.StatisticalTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
//值统计时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
b.Property(e => e.WriteState).HasDefaultValue(false);
b.HasKey(e => e.UId);
});
#endregion
#region OEE时间明细
modelBuilder.Entity<SUPPLIER_PRO_OEE_TIME_DETAILS>(b =>
{
b.ToTable("SUPPLIER_PRO_OEE_TIME_DETAILS");
//供应商代码
b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商名称
b.Property(e => e.SupplierName).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工厂代码
b.Property(e => e.PlantId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工厂名称
b.Property(e => e.PlantName).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//车间代码
b.Property(e => e.WorkshopId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//车间名称
b.Property(e => e.WorkshopName).HasColumnType("nvarchar").HasMaxLength(50).IsRequired(false);
//产线代码
b.Property(e => e.ProductionLineId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//产线名称
b.Property(e => e.ProductionLineName).HasColumnType("nvarchar").HasMaxLength(50).IsRequired(false);
//工位代码
b.Property(e => e.StationId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工位名称
b.Property(e => e.StationName).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//设备代码
b.Property(e => e.DeviceId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//设备名称
b.Property(e => e.DeviceName).HasColumnType("VARCHAR").HasMaxLength(33).IsRequired();
//记录ID
b.Property(e => e.RecId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//大类(1计划工作,2计划停机,3非计划停机)
b.Property(e => e.Type).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//小类编码
b.Property(e => e.SubType).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//小类描述
b.Property(e => e.SubTypeName).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//开始时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.StartTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
//结束时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.EndTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
b.Property(e => e.WriteState).HasDefaultValue(false);
b.HasKey(e => e.UId);
});
#endregion
#region 物料主数据
modelBuilder.Entity<SUPPLIER_PRO_MATERIAL_DATA>(b =>
{
b.ToTable("SUPPLIER_PRO_MATERIAL_DATA");
//供应商代码
b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商名称
b.Property(e => e.SupplierName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//供应商物料号
b.Property(e => e.VendorProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商物料名称
b.Property(e => e.VendorProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//类型(成品,半成品,原材料)
b.Property(e => e.Type).HasColumnType("DECIMAL").HasPrecision(precision: 1, scale: 0).IsRequired();
//供应商零件版本号
b.Property(e => e.VendorHardwareRevision).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(false);
//奇瑞零件号
b.Property(e => e.CheryProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//奇瑞零件名称
b.Property(e => e.CheryProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//奇瑞硬件版本号
b.Property(e => e.OemHardwareRevision).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//奇瑞软件版本号
b.Property(e => e.OemSoftwareRevision).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(false);
//车型
b.Property(e => e.OemModel).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(false);
//项目名称
b.Property(e => e.OemProjectName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired(false);
//是否SOP(Y/N)
b.Property(e => e.Launched).HasColumnType("VARCHAR").HasMaxLength(6).IsRequired(false);
//数据同步执行时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired(false);
//供应商工厂代码
b.Property(e => e.PlantId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(false);
//供应商工厂名称
b.Property(e => e.PlantName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired(false);
//芯片采购类型(AVAP,CS,CMcontro)
b.Property(e => e.ProcurementType).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired(false);
//芯片MPN标识码
b.Property(e => e.MpnCode).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired(false);
//芯片MPN标识名称
b.Property(e => e.MpnName).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired(false);
//物料有效期(天)
b.Property(e => e.ValidDays).HasColumnType("CHAR").HasMaxLength(12).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
b.Property(e => e.WriteState).HasDefaultValue(false);
b.HasKey(e => e.UId);
});
#endregion
#region 附件类数据
modelBuilder.Entity<SUPPLIER_PRO_ATTACHMENT_DATA>(b =>
{
b.ToTable("SUPPLIER_PRO_ATTACHMENT_DATA");
//供应商代码
b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商名称
b.Property(e => e.SupplierName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//数据类型(1产前管理;2人员资质;3监控视频)
b.Property(e => e.Type).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//文件名
b.Property(e => e.FileName).HasColumnType("VARCHAR").HasMaxLength(300).IsRequired();
//图文地址
b.Property(e => e.FileUrl).HasColumnType("VARCHAR").HasMaxLength(1000).IsRequired();
//生成时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
//产线名称
b.Property(e => e.ProductionLineName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//产线代码
b.Property(e => e.ProductionLineId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工位名称
b.Property(e => e.StationName).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工位代码
b.Property(e => e.StationId).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//设备名称
b.Property(e => e.DeviceName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//设备编码
b.Property(e => e.DeviceId).HasColumnType("nvarchar").HasMaxLength(50).IsRequired(false);
//供应商总成零件号
b.Property(e => e.VendorProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商总成零件名称
b.Property(e => e.VendorProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//奇瑞零件号
b.Property(e => e.CheryProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//奇瑞零件名称
b.Property(e => e.CheryProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//供应商总成SN码
b.Property(e => e.VendorProductSn).HasColumnType("VARCHAR").HasMaxLength(100).IsRequired(false);
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
b.Property(e => e.WriteState).HasDefaultValue(false);
b.HasKey(e => e.UId);
});
#endregion
#region 工艺装备
modelBuilder.Entity<SUPPLIER_PRO_PROCESS_EQUIPMENT>(b =>
{
b.ToTable("SUPPLIER_PRO_PROCESS_EQUIPMENT");
//供应商代码
b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商名称
b.Property(e => e.SupplierName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//奇瑞零件号
b.Property(e => e.CheryProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//奇瑞零件名称
b.Property(e => e.CheryProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//供应商总成零件号
b.Property(e => e.VendorProductNo).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//供应商总成零件名称
b.Property(e => e.VendorProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备类型分类(1模具;2检具;3夹具)
b.Property(e => e.DeviceType).HasColumnType("DECIMAL").HasPrecision(precision: 1, scale: 0).IsRequired();
//工艺装备编码
b.Property(e => e.DeviceCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//工艺装备名称
b.Property(e => e.DeviceName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//生产厂家
b.Property(e => e.Manufacturer).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备型号
b.Property(e => e.ModelNumber).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备序列号
b.Property(e => e.SerialNumber).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备制造日期,格式(yyyy-MM-dd)
b.Property(e => e.ProductionDate).HasColumnType("CHAR").HasMaxLength(16).IsRequired();
//主要材质
b.Property(e => e.Material).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//当前存放地点
b.Property(e => e.CurrentLocation).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备状态
b.Property(e => e.DeviceStatus).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//穴腔数量
b.Property(e => e.CavityCount).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 0).IsRequired();
//模具尺寸规格
b.Property(e => e.MoldSize).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//设计寿命单位
b.Property(e => e.DesignLifeUnits).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//设计寿命
b.Property(e => e.DesignLifeValue).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//当前剩余寿命,
b.Property(e => e.CurrentUsageCount).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//模具大修次数
b.Property(e => e.OverhaulCount).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 0).IsRequired();
//图纸编号描述
b.Property(e => e.CoolingChannelLayout).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//检测精度
b.Property(e => e.DetectionAccuracy).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//最近校准日期,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.CalibrationDate).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
//校准到期天数
b.Property(e => e.CalibrationDueDays).HasColumnType("CHAR").HasMaxLength(12).IsRequired();
//允许误差范围
b.Property(e => e.ToleranceRange).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//磨损阈值
b.Property(e => e.WearThreshold).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//检测范围
b.Property(e => e.DetectionRange).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//检测单位
b.Property(e => e.UnitType).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
b.Property(e => e.WriteState).HasDefaultValue(false);
b.HasKey(e => e.UId);
});
#endregion
#region 工艺
modelBuilder.Entity<SUPPLIER_PRO_PROCESS>(b =>
{
b.ToTable("SUPPLIER_PRO_PROCESS");
//奇瑞零件号
b.Property(e => e.CheryProductNo).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//奇瑞零件名称
b.Property(e => e.CheryProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//供应商总成零件号
b.Property(e => e.VendorProductNo).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//供应商总成零件名称
b.Property(e => e.VendorProductName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//供应商代码
b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//供应商名称
b.Property(e => e.SupplierName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺编码
b.Property(e => e.TechCode).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺名称
b.Property(e => e.TechName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//有效期,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.ValidPeriod).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
//工艺版本
b.Property(e => e.TechVersion).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//模具编码
b.Property(e => e.MoldCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//模具名称
b.Property(e => e.MoldName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//最大加工能力
b.Property(e => e.MaxProcessingCapacity).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工序编码
b.Property(e => e.ProcessCode).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工序名称
b.Property(e => e.ProcessName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工序顺序号
b.Property(e => e.ProcessOrder).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 0).IsRequired();
//设备编码
b.Property(e => e.DeviceCode).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工序节拍
b.Property(e => e.Rhythm).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired();
//节拍单位
b.Property(e => e.RhythmUnit).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
b.Property(e => e.WriteState).HasDefaultValue(false);
b.HasKey(e => e.UId);
});
#endregion
}
}
}

2411
API/TaskManager.EntityFramework/Migrations/20250529005719_2025052901.Designer.cs

File diff suppressed because it is too large

502
API/TaskManager.EntityFramework/Migrations/20250529005719_2025052901.cs

@ -0,0 +1,502 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class _2025052901 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_ATTACHMENT_DATA");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_ENVIRONMENT");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_MATERIAL_DATA");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_OEE_TIME_DETAILS");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_PROCESS");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_PROCESS_EQUIPMENT");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_FLAW",
type: "NVarchar(500)",
maxLength: 500,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AddColumn<string>(
name: "CheryProductName",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(100)",
maxLength: 100,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "CheryProductNo",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "CheryProductSn",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ClassOfName",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "DefectsCode",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "DefectsDesc",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(255)",
maxLength: 255,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "DefectsLevel",
table: "SUPPLIER_PRO_FLAW",
type: "CHAR(1)",
maxLength: 1,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "DefectsName",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(100)",
maxLength: 100,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ManufactureNo",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<decimal>(
name: "Numberofdefect",
table: "SUPPLIER_PRO_FLAW",
type: "DECIMAL(16,5)",
precision: 16,
scale: 5,
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "PlantId",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "PlantName",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ProductBatchNo",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ProductionLineId",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ProductionLineName",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "StationId",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "StationName",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "StatisticalTime",
table: "SUPPLIER_PRO_FLAW",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "SupplierCode",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "SupplierName",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "VendorProductBatch",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "VendorProductName",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(100)",
maxLength: 100,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "VendorProductNo",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "VendorProductSn",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "WorkShift",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(10)",
maxLength: 10,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "WorkshopId",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "WorkshopName",
table: "SUPPLIER_PRO_FLAW",
type: "VARCHAR(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CheryProductName",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "CheryProductNo",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "CheryProductSn",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "ClassOfName",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "DefectsCode",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "DefectsDesc",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "DefectsLevel",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "DefectsName",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "ManufactureNo",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "Numberofdefect",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "PlantId",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "PlantName",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "ProductBatchNo",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "ProductionLineId",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "ProductionLineName",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "StationId",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "StationName",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "StatisticalTime",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "SupplierCode",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "SupplierName",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "VendorProductBatch",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "VendorProductName",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "VendorProductNo",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "VendorProductSn",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "WorkShift",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "WorkshopId",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.DropColumn(
name: "WorkshopName",
table: "SUPPLIER_PRO_FLAW");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_FLAW",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "NVarchar(500)",
oldMaxLength: 500);
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_ATTACHMENT_DATA",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ReadState = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_ATTACHMENT_DATA", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_ENVIRONMENT",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ReadState = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_ENVIRONMENT", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_MATERIAL_DATA",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ReadState = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_MATERIAL_DATA", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ReadState = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_OEE_TIME_DETAILS",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ReadState = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_OEE_TIME_DETAILS", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_PROCESS",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ReadState = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_PROCESS", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ReadState = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_PROCESS_EQUIPMENT", x => x.UId);
});
}
}
}

2389
API/TaskManager.EntityFramework/Migrations/20250529013720_2025052902.Designer.cs

File diff suppressed because it is too large

530
API/TaskManager.EntityFramework/Migrations/20250529013720_2025052902.cs

@ -0,0 +1,530 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class _2025052902 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_SINV_DATA",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_SA_WEEK",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_RETURN",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_TSCHEDUL",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_STATION_FIRST_PASSYIELD",
type: "NVarchar(500)",
maxLength: 500,
nullable: true,
oldClrType: typeof(string),
oldType: "NVarchar(500)",
oldMaxLength: 500);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_SCHEDULING",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_PLANING",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_MATERIAL_STOCK",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_HSCHEDUL",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<bool>(
name: "WriteState",
table: "SUPPLIER_PRO_FLAW",
type: "bit",
nullable: false,
defaultValue: false,
oldClrType: typeof(bool),
oldType: "bit");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_FLAW",
type: "NVarchar(500)",
maxLength: 500,
nullable: true,
oldClrType: typeof(string),
oldType: "NVarchar(500)",
oldMaxLength: 500);
migrationBuilder.AlterColumn<bool>(
name: "ReadState",
table: "SUPPLIER_PRO_FLAW",
type: "bit",
nullable: false,
defaultValue: false,
oldClrType: typeof(bool),
oldType: "bit");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_FIRST_PASSYIELD",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_DATA",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_CSCHEDUL",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_CPS",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PO",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_MRP_STATE",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_MRP_MONTH",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_MRP_DATE",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_INV_DATA",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_INFO",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_EMPLOYEE",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_DEL_STATE",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_CON_PO",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_CON_MMRP",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_CON_DATE",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_BOM",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_SINV_DATA",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_SA_WEEK",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_RETURN",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_TSCHEDUL",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_STATION_FIRST_PASSYIELD",
type: "NVarchar(500)",
maxLength: 500,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "NVarchar(500)",
oldMaxLength: 500,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_SCHEDULING",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_PLANING",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_MATERIAL_STOCK",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_HSCHEDUL",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<bool>(
name: "WriteState",
table: "SUPPLIER_PRO_FLAW",
type: "bit",
nullable: false,
oldClrType: typeof(bool),
oldType: "bit",
oldDefaultValue: false);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_FLAW",
type: "NVarchar(500)",
maxLength: 500,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "NVarchar(500)",
oldMaxLength: 500,
oldNullable: true);
migrationBuilder.AlterColumn<bool>(
name: "ReadState",
table: "SUPPLIER_PRO_FLAW",
type: "bit",
nullable: false,
oldClrType: typeof(bool),
oldType: "bit",
oldDefaultValue: false);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_FIRST_PASSYIELD",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_DATA",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_CSCHEDUL",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PRO_CPS",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_PO",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_MRP_STATE",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_MRP_MONTH",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_MRP_DATE",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_INV_DATA",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_INFO",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_EMPLOYEE",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_DEL_STATE",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_CON_PO",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_CON_MMRP",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_CON_DATE",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "SUPPLIER_BOM",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
}
}
}

3312
API/TaskManager.EntityFramework/Migrations/20250529020443_2025052903.Designer.cs

File diff suppressed because it is too large

303
API/TaskManager.EntityFramework/Migrations/20250529020443_2025052903.cs

@ -0,0 +1,303 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class _2025052903 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_ATTACHMENT_DATA",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SupplierCode = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
SupplierName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
Type = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: false),
FileName = table.Column<string>(type: "VARCHAR(300)", maxLength: 300, nullable: false),
FileUrl = table.Column<string>(type: "VARCHAR(1000)", maxLength: 1000, nullable: false),
DateTime = table.Column<string>(type: "CHAR(19)", maxLength: 19, nullable: false),
ProductionLineName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ProductionLineId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
StationName = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
StationId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
DeviceName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
DeviceId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
VendorProductNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
VendorProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
CheryProductNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
CheryProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
VendorProductSn = table.Column<string>(type: "VARCHAR(100)", maxLength: 100, nullable: true),
WriteState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
ReadState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Remark = table.Column<string>(type: "NVarchar(500)", maxLength: 500, nullable: true),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_ATTACHMENT_DATA", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_ENVIRONMENT",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SupplierCode = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
SupplierName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
PlantId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
PlantName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
WorkshopId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
WorkshopName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ProductionLineId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
ProductionLineName = table.Column<string>(type: "VARCHAR(100)", maxLength: 100, nullable: false),
EnvIndicatorName = table.Column<string>(type: "VARCHAR(100)", maxLength: 100, nullable: false),
NumValue = table.Column<decimal>(type: "DECIMAL(16,5)", precision: 16, scale: 5, nullable: true),
UpperLimit = table.Column<decimal>(type: "DECIMAL(16,5)", precision: 16, scale: 5, nullable: false),
LowerLimit = table.Column<decimal>(type: "DECIMAL(16,5)", precision: 16, scale: 5, nullable: false),
ChineseUnit = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
EquipmentCode = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
EquipmentName = table.Column<string>(type: "VARCHAR(100)", maxLength: 100, nullable: false),
DataCollectionPoint = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: true),
CollectTime = table.Column<string>(type: "CHAR(19)", maxLength: 19, nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
ReadState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Remark = table.Column<string>(type: "NVarchar(500)", maxLength: 500, nullable: true),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_ENVIRONMENT", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_MATERIAL_DATA",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SupplierCode = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
SupplierName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
VendorProductNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
VendorProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
Type = table.Column<decimal>(type: "DECIMAL(1,0)", precision: 1, scale: 0, nullable: false),
VendorHardwareRevision = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: true),
CheryProductNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
CheryProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
OemHardwareRevision = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
OemSoftwareRevision = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: true),
OemModel = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: true),
OemProjectName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: true),
Launched = table.Column<string>(type: "VARCHAR(6)", maxLength: 6, nullable: true),
DateTime = table.Column<string>(type: "CHAR(19)", maxLength: 19, nullable: true),
PlantId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: true),
PlantName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: true),
ProcurementType = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: true),
MpnCode = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: true),
MpnName = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: true),
ValidDays = table.Column<string>(type: "CHAR(12)", maxLength: 12, nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
ReadState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Remark = table.Column<string>(type: "NVarchar(500)", maxLength: 500, nullable: true),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_MATERIAL_DATA", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SupplierCode = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
SupplierName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
PlantId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
PlantName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
WorkshopId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
WorkshopName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ProductionLineId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
ProductionLineName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
StationId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
StationName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
DeviceId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
DeviceName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CheryProductNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
CheryProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
VendorProductNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
VendorProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ProductBatchNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
ManufactureNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
Rate = table.Column<decimal>(type: "DECIMAL(16,5)", precision: 16, scale: 5, nullable: false),
RateTagValue = table.Column<decimal>(type: "DECIMAL(16,5)", precision: 16, scale: 5, nullable: false),
WorkShift = table.Column<string>(type: "VARCHAR(10)", maxLength: 10, nullable: false),
StatisticalTime = table.Column<string>(type: "CHAR(19)", maxLength: 19, nullable: false),
DateTime = table.Column<string>(type: "CHAR(19)", maxLength: 19, nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
ReadState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Remark = table.Column<string>(type: "NVarchar(500)", maxLength: 500, nullable: true),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_OEE_TIME_DETAILS",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SupplierCode = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
SupplierName = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
PlantId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
PlantName = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
WorkshopId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
WorkshopName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ProductionLineId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
ProductionLineName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
StationId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
StationName = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
DeviceId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
DeviceName = table.Column<string>(type: "VARCHAR(33)", maxLength: 33, nullable: false),
RecId = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
Type = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
SubType = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
SubTypeName = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
StartTime = table.Column<string>(type: "CHAR(19)", maxLength: 19, nullable: false),
EndTime = table.Column<string>(type: "CHAR(19)", maxLength: 19, nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
ReadState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Remark = table.Column<string>(type: "NVarchar(500)", maxLength: 500, nullable: true),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_OEE_TIME_DETAILS", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_PROCESS",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CheryProductNo = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
CheryProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
VendorProductNo = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
VendorProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
SupplierCode = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
SupplierName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
TechCode = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
TechName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ValidPeriod = table.Column<string>(type: "CHAR(19)", maxLength: 19, nullable: false),
TechVersion = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: false),
MoldCode = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
MoldName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
MaxProcessingCapacity = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ProcessCode = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ProcessName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ProcessOrder = table.Column<decimal>(type: "DECIMAL(16,0)", precision: 16, scale: 0, nullable: false),
DeviceCode = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
Rhythm = table.Column<decimal>(type: "DECIMAL(16,5)", precision: 16, scale: 5, nullable: false),
RhythmUnit = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
ReadState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Remark = table.Column<string>(type: "NVarchar(500)", maxLength: 500, nullable: true),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_PROCESS", x => x.UId);
});
migrationBuilder.CreateTable(
name: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SupplierCode = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
SupplierName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
CheryProductNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
CheryProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
VendorProductNo = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
VendorProductName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
DeviceType = table.Column<decimal>(type: "DECIMAL(1,0)", precision: 1, scale: 0, nullable: false),
DeviceCode = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
DeviceName = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
Manufacturer = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ModelNumber = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
SerialNumber = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
ProductionDate = table.Column<string>(type: "CHAR(16)", maxLength: 16, nullable: false),
Material = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
CurrentLocation = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
DeviceStatus = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: false),
CavityCount = table.Column<decimal>(type: "DECIMAL(16,0)", precision: 16, scale: 0, nullable: false),
MoldSize = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
DesignLifeUnits = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: false),
DesignLifeValue = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: false),
CurrentUsageCount = table.Column<string>(type: "VARCHAR(16)", maxLength: 16, nullable: false),
OverhaulCount = table.Column<decimal>(type: "DECIMAL(16,0)", precision: 16, scale: 0, nullable: false),
CoolingChannelLayout = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
DetectionAccuracy = table.Column<string>(type: "VARCHAR(64)", maxLength: 64, nullable: false),
CalibrationDate = table.Column<string>(type: "CHAR(19)", maxLength: 19, nullable: false),
CalibrationDueDays = table.Column<string>(type: "CHAR(12)", maxLength: 12, nullable: false),
ToleranceRange = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
WearThreshold = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
DetectionRange = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
UnitType = table.Column<string>(type: "VARCHAR(32)", maxLength: 32, nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
ReadState = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Remark = table.Column<string>(type: "NVarchar(500)", maxLength: 500, nullable: true),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SUPPLIER_PRO_PROCESS_EQUIPMENT", x => x.UId);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_ATTACHMENT_DATA");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_ENVIRONMENT");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_MATERIAL_DATA");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_OEE_TIME_DETAILS");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_PROCESS");
migrationBuilder.DropTable(
name: "SUPPLIER_PRO_PROCESS_EQUIPMENT");
}
}
}

1347
API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs

File diff suppressed because it is too large
Loading…
Cancel
Save