Warehouses #1

Merged
trent merged 159 commits from Warehouses into master 2026-01-10 20:24:17 +00:00
8 changed files with 769 additions and 17 deletions
Showing only changes of commit eb40cc35fe - Show all commits

View File

@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using SytelineSaAppEfDataModel.Dtos;
using SytelineSaAppEfDataModel.Services;
namespace FaKrosnoApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class ItemController(IItemService service) : Controller
{
[HttpGet("by-number")]
public async Task<ActionResult<ItemDto>> Get([FromQuery] string itemNumber)
{
ItemDto item = await service.GetItem(itemNumber);
return Ok(item);
}
}

View File

@@ -1,13 +1,10 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Tokens;
using System.Text;
using FaKrosnoApi.Models; using FaKrosnoApi.Models;
using FaKrosnoApi.Services; using FaKrosnoApi.Services;
using FaKrosnoEfDataModel; using FaKrosnoEfDataModel;
using FaKrosnoEfDataModel.Services; using FaKrosnoEfDataModel.Services;
using Hangfire; using Hangfire;
using Hangfire.SqlServer; using Hangfire.SqlServer;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using OrdersManagementDataModel; using OrdersManagementDataModel;
using OrdersManagementDataModel.Services; using OrdersManagementDataModel.Services;
using SytelineSaAppEfDataModel; using SytelineSaAppEfDataModel;
@@ -69,19 +66,19 @@ builder.Services.AddOpenApiDocument(config =>
config.OperationProcessors.Add(new OperationSecurityScopeProcessor("Bearer")); config.OperationProcessors.Add(new OperationSecurityScopeProcessor("Bearer"));
}); });
// builder.Services.AddHangfire(config => config builder.Services.AddHangfire(config => config
// .SetDataCompatibilityLevel(CompatibilityLevel.Version_170) .SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
// .UseSimpleAssemblyNameTypeSerializer() .UseSimpleAssemblyNameTypeSerializer()
// .UseRecommendedSerializerSettings() .UseRecommendedSerializerSettings()
// .UseSqlServerStorage(builder.Configuration.GetConnectionString("OrdersManagementConnection"), new SqlServerStorageOptions .UseSqlServerStorage(builder.Configuration.GetConnectionString("OrdersManagementConnection"), new SqlServerStorageOptions
// { {
// CommandBatchMaxTimeout = TimeSpan.FromMinutes(5), CommandBatchMaxTimeout = TimeSpan.FromMinutes(5),
// SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5), SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
// QueuePollInterval = TimeSpan.Zero, QueuePollInterval = TimeSpan.Zero,
// UseRecommendedIsolationLevel = true, UseRecommendedIsolationLevel = true,
// DisableGlobalLocks = true DisableGlobalLocks = true
// })); }));
// builder.Services.AddHangfireServer(); builder.Services.AddHangfireServer();
builder.Services.AddAutoMapper(typeof(FaKrosnoMappingProfile), typeof(SytelineSaAppMappingProfile), builder.Services.AddAutoMapper(typeof(FaKrosnoMappingProfile), typeof(SytelineSaAppMappingProfile),
typeof(OrdersManagementMappingProfile)); typeof(OrdersManagementMappingProfile));
@@ -108,6 +105,7 @@ builder.Services.AddScoped<IItemCustService, ItemCustService>();
builder.Services.AddScoped<IEdiCustomerOrderImportService, EdiCustomerOrderImportService>(); builder.Services.AddScoped<IEdiCustomerOrderImportService, EdiCustomerOrderImportService>();
builder.Services.AddScoped<ICustomerService, CustomerService>(); builder.Services.AddScoped<ICustomerService, CustomerService>();
builder.Services.AddScoped<ICustomerTpService, CustomerTpService>(); builder.Services.AddScoped<ICustomerTpService, CustomerTpService>();
builder.Services.AddScoped<IItemService, ItemService>();
builder.Services.AddHostedService<TimedHostedService>(); builder.Services.AddHostedService<TimedHostedService>();
@@ -125,6 +123,6 @@ app.UseAuthorization();
app.MapControllers(); app.MapControllers();
// app.UseHangfireDashboard(); app.UseHangfireDashboard();
app.Run(); app.Run();

View File

@@ -0,0 +1,227 @@
namespace SytelineSaAppEfDataModel.Dtos;
public class ItemDto
{
public string ItemCode { get; set; }
public string Description { get; set; }
public decimal? QtyAllocjob { get; set; }
public string UM { get; set; }
public int LeadTime { get; set; }
public decimal? LotSize { get; set; }
public decimal? QtyUsedYtd { get; set; }
public decimal? QtyMfgYtd { get; set; }
public string AbcCode { get; set; }
public string DrawingNbr { get; set; }
public string ProductCode { get; set; }
public string PMTCode { get; set; }
public string CostMethod { get; set; }
public decimal? LstLotSize { get; set; }
public decimal? UnitCost { get; set; }
public decimal? LstUCost { get; set; }
public decimal? AvgUCost { get; set; }
public string Job { get; set; }
public int? Suffix { get; set; }
public bool Stocked { get; set; }
public string MatlType { get; set; }
public string FamilyCode { get; set; }
public int? LowLevel { get; set; }
public DateTime? LastInv { get; set; }
public int? DaysSupply { get; set; }
public decimal? OrderMin { get; set; }
public decimal? OrderMult { get; set; }
public string PlanCode { get; set; }
public bool MpsFlag { get; set; }
public bool AcceptReq { get; set; }
public DateTime? ChangeDate { get; set; }
public string Revision { get; set; }
public bool PhantomFlag { get; set; }
public bool PlanFlag { get; set; }
public int PaperTime { get; set; }
public int DockTime { get; set; }
public decimal? AsmSetup { get; set; }
public decimal? AsmRun { get; set; }
public decimal? AsmMatl { get; set; }
public decimal? AsmTool { get; set; }
public decimal? AsmFixture { get; set; }
public decimal? AsmOther { get; set; }
public decimal? AsmFixed { get; set; }
public decimal? AsmVar { get; set; }
public decimal? AsmOutside { get; set; }
public decimal? CompSetup { get; set; }
public decimal? CompRun { get; set; }
public decimal? CompMatl { get; set; }
public decimal? CompTool { get; set; }
public decimal? CompFixture { get; set; }
public decimal? CompOther { get; set; }
public decimal? CompFixed { get; set; }
public decimal? CompVar { get; set; }
public decimal? CompOutside { get; set; }
public decimal? SubMatl { get; set; }
public decimal? ShrinkFact { get; set; }
public string AltItem { get; set; }
public decimal? UnitWeight { get; set; }
public string WeightUnits { get; set; }
public string Charfld4 { get; set; }
public decimal? CurUCost { get; set; }
public string FeatType { get; set; }
public int? VarLead { get; set; }
public string FeatStr { get; set; }
public int? NextConfig { get; set; }
public string FeatTempl { get; set; }
public bool Backflush { get; set; }
public string Charfld1 { get; set; }
public string Charfld2 { get; set; }
public string Charfld3 { get; set; }
public decimal? Decifld1 { get; set; }
public decimal? Decifld2 { get; set; }
public decimal? Decifld3 { get; set; }
public bool Logifld { get; set; }
public DateTime? Datefld { get; set; }
public bool TrackEcn { get; set; }
public string CommCode { get; set; }
public string Origin { get; set; }
public decimal? UnitMatCost { get; set; }
public decimal? UnitDutyCost { get; set; }
public decimal? UnitFreightCost { get; set; }
public decimal? UnitBrokerageCost { get; set; }
public decimal? CurMatCost { get; set; }
public decimal? CurDutyCost { get; set; }
public decimal? CurFreightCost { get; set; }
public decimal? CurBrokerageCost { get; set; }
public string TaxCode1 { get; set; }
public string TaxCode2 { get; set; }
public string BflushLoc { get; set; }
public bool Reservable { get; set; }
public int? ShelfLife { get; set; }
public string LotPrefix { get; set; }
public string SerialPrefix { get; set; }
public int? SerialLength { get; set; }
public string IssueBy { get; set; }
public bool SerialTracked { get; set; }
public bool LotTracked { get; set; }
public string CostType { get; set; }
public decimal? MatlCost { get; set; }
public decimal? LbrCost { get; set; }
public decimal? FovhdCost { get; set; }
public decimal? VovhdCost { get; set; }
public decimal? OutCost { get; set; }
public decimal? CurMatlCost { get; set; }
public decimal? CurLbrCost { get; set; }
public decimal? CurFovhdCost { get; set; }
public decimal? CurVovhdCost { get; set; }
public decimal? CurOutCost { get; set; }
public decimal? AvgMatlCost { get; set; }
public decimal? AvgLbrCost { get; set; }
public decimal? AvgFovhdCost { get; set; }
public decimal? AvgVovhdCost { get; set; }
public decimal? AvgOutCost { get; set; }
public string ProdType { get; set; }
public decimal? RatePerDay { get; set; }
public int? MpsPlanFence { get; set; }
public bool PassReq { get; set; }
public bool LotGenExp { get; set; }
public string SupplySite { get; set; }
public string ProdMix { get; set; }
public string Stat { get; set; }
public string StatusChgUserCode { get; set; }
public DateTime? ChgDate { get; set; }
public string ReasonCode { get; set; }
public string SupplyWhse { get; set; }
public int? DuePeriod { get; set; }
public decimal? OrderMax { get; set; }
public bool MrpPart { get; set; }
public bool InfinitePart { get; set; }
public bool NoteExistsFlag { get; set; }
public DateTime RecordDate { get; set; }
public Guid RowPointer { get; set; }
public int? SupplyToleranceHrs { get; set; }
public int ExpLeadTime { get; set; }
public int? VarExpLead { get; set; }
public string Buyer { get; set; }
public bool OrderConfigurable { get; set; }
public bool JobConfigurable { get; set; }
public string CfgModel { get; set; }
public string CoPostConfig { get; set; }
public string JobPostConfig { get; set; }
public string AutoJob { get; set; }
public string AutoPost { get; set; }
public string Setupgroup { get; set; }
public string CreatedBy { get; set; }
public string UpdatedBy { get; set; }
public DateTime CreateDate { get; set; }
public bool InWorkflow { get; set; }
public bool MfgSupplySwitchingActive { get; set; }
public int? TimeFenceRule { get; set; }
public decimal? TimeFenceValue { get; set; }
public DateTime? EarliestPlannedPoReceipt { get; set; }
public bool UseReorderPoint { get; set; }
public decimal? ReorderPoint { get; set; }
public decimal? FixedOrderQty { get; set; }
public decimal? UnitInsuranceCost { get; set; }
public decimal? UnitLocFrtCost { get; set; }
public decimal? CurInsuranceCost { get; set; }
public decimal? CurLocFrtCost { get; set; }
public bool TaxFreeMatl { get; set; }
public int? TaxFreeDays { get; set; }
public decimal? SafetyStockPercent { get; set; }
public string TariffClassification { get; set; }
public DateTime Lowdate { get; set; }
public string RcptRqmt { get; set; }
public bool ActiveForDataIntegration { get; set; }
public decimal? RcvdOverPoQtyTolerance { get; set; }
public decimal? RcvdUnderPoQtyTolerance { get; set; }
public bool IncludeInNetChangePlanning { get; set; }
public bool Kit { get; set; }
public bool PrintKitComponents { get; set; }
public int? SafetyStockRule { get; set; }
public bool ShowInDropDownList { get; set; }
public bool ControlledByExternalIcs { get; set; }
public decimal? InventoryUclTolerance { get; set; }
public decimal? InventoryLclTolerance { get; set; }
public string SeparationAttribute { get; set; }
public decimal? BatchReleaseAttribute1 { get; set; }
public decimal? BatchReleaseAttribute2 { get; set; }
public decimal? BatchReleaseAttribute3 { get; set; }
public byte[] Picture { get; set; }
public bool ActiveForCustomerPortal { get; set; }
public bool Featured { get; set; }
public bool TopSeller { get; set; }
public string Overview { get; set; }
public bool PreassignLots { get; set; }
public bool PreassignSerials { get; set; }
public string AttrGroup { get; set; }
public string DimensionGroup { get; set; }
public string LotAttrGroup { get; set; }
public bool TrackPieces { get; set; }
public DateTime? BomLastImportDate { get; set; }
public bool SaveCurrentRevUponBomImport { get; set; }
public string NaftaPrefCrit { get; set; }
public bool SubjectToNaftaRvc { get; set; }
public bool Producer { get; set; }
public string NaftaCountryOfOrigin { get; set; }
public bool MustUseFutureRcptsBeforePln { get; set; }
public bool SubjectToExciseTax { get; set; }
public decimal? ExciseTaxPercent { get; set; }
public string Uf_PLT_AddItemDesc { get; set; }
public string Uf_PLT_Class { get; set; }
public string Uf_PLT_CNCode { get; set; }
public string Uf_PLT_Norm { get; set; }
public string Uf_PLT_OldItemID { get; set; }
public decimal? Uf_PLT_Volume { get; set; }
public string Uf_PLT_VolumeUnit { get; set; }
public bool Uf_INT_Replicate { get; set; }
public string BoxId { get; set; }
public decimal? ItemLength { get; set; }
public decimal? ItemFi { get; set; }
public int? BoxItemsCnt { get; set; }
public string Klient { get; set; }
public string Uf_FKR_FA_RodzajPozycji { get; set; }
public string Uf_Nr_Klienta { get; set; }
public int? Uf_FKR_FA_Items_Nr_Zmiany { get; set; }
public string Uf_FKR_FA_item_core { get; set; }
public string Uf_FKR_GTU { get; set; }
public int? Uf_FKR_FA_Ilosc_Na_Jedn_Pak { get; set; }
public int? Uf_Element_Ilosc_W_Palecie { get; set; }
public bool? Uf_PUDELKO { get; set; }
public string Uf_IMP_OrginalItem { get; set; }
}

View File

@@ -0,0 +1,227 @@
namespace SytelineSaAppEfDataModel.Entities;
public class Item
{
public string ItemCode { get; set; }
public string Description { get; set; }
public decimal? QtyAllocjob { get; set; }
public string UM { get; set; }
public int LeadTime { get; set; }
public decimal? LotSize { get; set; }
public decimal? QtyUsedYtd { get; set; }
public decimal? QtyMfgYtd { get; set; }
public string AbcCode { get; set; }
public string DrawingNbr { get; set; }
public string ProductCode { get; set; }
public string PMTCode { get; set; }
public string CostMethod { get; set; }
public decimal? LstLotSize { get; set; }
public decimal? UnitCost { get; set; }
public decimal? LstUCost { get; set; }
public decimal? AvgUCost { get; set; }
public string Job { get; set; }
public int? Suffix { get; set; }
public bool Stocked { get; set; }
public string MatlType { get; set; }
public string FamilyCode { get; set; }
public int? LowLevel { get; set; }
public DateTime? LastInv { get; set; }
public int? DaysSupply { get; set; }
public decimal? OrderMin { get; set; }
public decimal? OrderMult { get; set; }
public string PlanCode { get; set; }
public bool MpsFlag { get; set; }
public bool AcceptReq { get; set; }
public DateTime? ChangeDate { get; set; }
public string Revision { get; set; }
public bool PhantomFlag { get; set; }
public bool PlanFlag { get; set; }
public int PaperTime { get; set; }
public int DockTime { get; set; }
public decimal? AsmSetup { get; set; }
public decimal? AsmRun { get; set; }
public decimal? AsmMatl { get; set; }
public decimal? AsmTool { get; set; }
public decimal? AsmFixture { get; set; }
public decimal? AsmOther { get; set; }
public decimal? AsmFixed { get; set; }
public decimal? AsmVar { get; set; }
public decimal? AsmOutside { get; set; }
public decimal? CompSetup { get; set; }
public decimal? CompRun { get; set; }
public decimal? CompMatl { get; set; }
public decimal? CompTool { get; set; }
public decimal? CompFixture { get; set; }
public decimal? CompOther { get; set; }
public decimal? CompFixed { get; set; }
public decimal? CompVar { get; set; }
public decimal? CompOutside { get; set; }
public decimal? SubMatl { get; set; }
public decimal? ShrinkFact { get; set; }
public string AltItem { get; set; }
public decimal? UnitWeight { get; set; }
public string WeightUnits { get; set; }
public string Charfld4 { get; set; }
public decimal? CurUCost { get; set; }
public string FeatType { get; set; }
public int? VarLead { get; set; }
public string FeatStr { get; set; }
public int? NextConfig { get; set; }
public string FeatTempl { get; set; }
public bool Backflush { get; set; }
public string Charfld1 { get; set; }
public string Charfld2 { get; set; }
public string Charfld3 { get; set; }
public decimal? Decifld1 { get; set; }
public decimal? Decifld2 { get; set; }
public decimal? Decifld3 { get; set; }
public bool Logifld { get; set; }
public DateTime? Datefld { get; set; }
public bool TrackEcn { get; set; }
public string CommCode { get; set; }
public string Origin { get; set; }
public decimal? UnitMatCost { get; set; }
public decimal? UnitDutyCost { get; set; }
public decimal? UnitFreightCost { get; set; }
public decimal? UnitBrokerageCost { get; set; }
public decimal? CurMatCost { get; set; }
public decimal? CurDutyCost { get; set; }
public decimal? CurFreightCost { get; set; }
public decimal? CurBrokerageCost { get; set; }
public string TaxCode1 { get; set; }
public string TaxCode2 { get; set; }
public string BflushLoc { get; set; }
public bool Reservable { get; set; }
public int? ShelfLife { get; set; }
public string LotPrefix { get; set; }
public string SerialPrefix { get; set; }
public int? SerialLength { get; set; }
public string IssueBy { get; set; }
public bool SerialTracked { get; set; }
public bool LotTracked { get; set; }
public string CostType { get; set; }
public decimal? MatlCost { get; set; }
public decimal? LbrCost { get; set; }
public decimal? FovhdCost { get; set; }
public decimal? VovhdCost { get; set; }
public decimal? OutCost { get; set; }
public decimal? CurMatlCost { get; set; }
public decimal? CurLbrCost { get; set; }
public decimal? CurFovhdCost { get; set; }
public decimal? CurVovhdCost { get; set; }
public decimal? CurOutCost { get; set; }
public decimal? AvgMatlCost { get; set; }
public decimal? AvgLbrCost { get; set; }
public decimal? AvgFovhdCost { get; set; }
public decimal? AvgVovhdCost { get; set; }
public decimal? AvgOutCost { get; set; }
public string ProdType { get; set; }
public decimal? RatePerDay { get; set; }
public int? MpsPlanFence { get; set; }
public bool PassReq { get; set; }
public bool LotGenExp { get; set; }
public string SupplySite { get; set; }
public string ProdMix { get; set; }
public string Stat { get; set; }
public string StatusChgUserCode { get; set; }
public DateTime? ChgDate { get; set; }
public string ReasonCode { get; set; }
public string SupplyWhse { get; set; }
public int? DuePeriod { get; set; }
public decimal? OrderMax { get; set; }
public bool MrpPart { get; set; }
public bool InfinitePart { get; set; }
public bool NoteExistsFlag { get; set; }
public DateTime RecordDate { get; set; }
public Guid RowPointer { get; set; }
public int? SupplyToleranceHrs { get; set; }
public int ExpLeadTime { get; set; }
public int? VarExpLead { get; set; }
public string Buyer { get; set; }
public bool OrderConfigurable { get; set; }
public bool JobConfigurable { get; set; }
public string CfgModel { get; set; }
public string CoPostConfig { get; set; }
public string JobPostConfig { get; set; }
public string AutoJob { get; set; }
public string AutoPost { get; set; }
public string Setupgroup { get; set; }
public string CreatedBy { get; set; }
public string UpdatedBy { get; set; }
public DateTime CreateDate { get; set; }
public bool InWorkflow { get; set; }
public bool MfgSupplySwitchingActive { get; set; }
public int? TimeFenceRule { get; set; }
public decimal? TimeFenceValue { get; set; }
public DateTime? EarliestPlannedPoReceipt { get; set; }
public bool UseReorderPoint { get; set; }
public decimal? ReorderPoint { get; set; }
public decimal? FixedOrderQty { get; set; }
public decimal? UnitInsuranceCost { get; set; }
public decimal? UnitLocFrtCost { get; set; }
public decimal? CurInsuranceCost { get; set; }
public decimal? CurLocFrtCost { get; set; }
public bool TaxFreeMatl { get; set; }
public int? TaxFreeDays { get; set; }
public decimal? SafetyStockPercent { get; set; }
public string TariffClassification { get; set; }
public DateTime Lowdate { get; set; }
public string RcptRqmt { get; set; }
public bool ActiveForDataIntegration { get; set; }
public decimal? RcvdOverPoQtyTolerance { get; set; }
public decimal? RcvdUnderPoQtyTolerance { get; set; }
public bool IncludeInNetChangePlanning { get; set; }
public bool Kit { get; set; }
public bool PrintKitComponents { get; set; }
public int? SafetyStockRule { get; set; }
public bool ShowInDropDownList { get; set; }
public bool ControlledByExternalIcs { get; set; }
public decimal? InventoryUclTolerance { get; set; }
public decimal? InventoryLclTolerance { get; set; }
public string SeparationAttribute { get; set; }
public decimal? BatchReleaseAttribute1 { get; set; }
public decimal? BatchReleaseAttribute2 { get; set; }
public decimal? BatchReleaseAttribute3 { get; set; }
public byte[] Picture { get; set; }
public bool ActiveForCustomerPortal { get; set; }
public bool Featured { get; set; }
public bool TopSeller { get; set; }
public string Overview { get; set; }
public bool PreassignLots { get; set; }
public bool PreassignSerials { get; set; }
public string AttrGroup { get; set; }
public string DimensionGroup { get; set; }
public string LotAttrGroup { get; set; }
public bool TrackPieces { get; set; }
public DateTime? BomLastImportDate { get; set; }
public bool SaveCurrentRevUponBomImport { get; set; }
public string NaftaPrefCrit { get; set; }
public bool SubjectToNaftaRvc { get; set; }
public bool Producer { get; set; }
public string NaftaCountryOfOrigin { get; set; }
public bool MustUseFutureRcptsBeforePln { get; set; }
public bool SubjectToExciseTax { get; set; }
public decimal? ExciseTaxPercent { get; set; }
public string Uf_PLT_AddItemDesc { get; set; }
public string Uf_PLT_Class { get; set; }
public string Uf_PLT_CNCode { get; set; }
public string Uf_PLT_Norm { get; set; }
public string Uf_PLT_OldItemID { get; set; }
public decimal? Uf_PLT_Volume { get; set; }
public string Uf_PLT_VolumeUnit { get; set; }
public bool Uf_INT_Replicate { get; set; }
public string BoxId { get; set; }
public decimal? ItemLength { get; set; }
public decimal? ItemFi { get; set; }
public int? BoxItemsCnt { get; set; }
public string Klient { get; set; }
public string Uf_FKR_FA_RodzajPozycji { get; set; }
public string Uf_Nr_Klienta { get; set; }
public int? Uf_FKR_FA_Items_Nr_Zmiany { get; set; }
public string Uf_FKR_FA_item_core { get; set; }
public string Uf_FKR_GTU { get; set; }
public int? Uf_FKR_FA_Ilosc_Na_Jedn_Pak { get; set; }
public int? Uf_Element_Ilosc_W_Palecie { get; set; }
public bool? Uf_PUDELKO { get; set; }
public string Uf_IMP_OrginalItem { get; set; }
}

View File

@@ -28,6 +28,7 @@ namespace SytelineSaAppEfDataModel
CreateMap<EdiCustomerOrderImport, EdiCustomerOrderImportDto>().ReverseMap(); CreateMap<EdiCustomerOrderImport, EdiCustomerOrderImportDto>().ReverseMap();
CreateMap<Customer, CustomerDto>().ReverseMap(); CreateMap<Customer, CustomerDto>().ReverseMap();
CreateMap<CustomerTp, CustomerTpDto>().ReverseMap(); CreateMap<CustomerTp, CustomerTpDto>().ReverseMap();
CreateMap<Item, ItemDto>().ReverseMap();
} }
} }
} }

View File

@@ -0,0 +1,8 @@
using SytelineSaAppEfDataModel.Dtos;
namespace SytelineSaAppEfDataModel.Services;
public interface IItemService
{
Task<ItemDto> GetItem(string itemNumber);
}

View File

@@ -0,0 +1,14 @@
using AutoMapper;
using Microsoft.EntityFrameworkCore;
using SytelineSaAppEfDataModel.Dtos;
namespace SytelineSaAppEfDataModel.Services;
public class ItemService(SytelineSaAppDbContext context, IMapper mapper) : IItemService
{
public async Task<ItemDto> GetItem(string itemNumber)
{
var item = await context.Items.FirstOrDefaultAsync(x => x.ItemCode == itemNumber);
return mapper.Map<ItemDto>(item);
}
}

View File

@@ -27,6 +27,7 @@ namespace SytelineSaAppEfDataModel
public DbSet<EdiCustomerOrderImport> EdiCustomerOrderImports { get; set; } public DbSet<EdiCustomerOrderImport> EdiCustomerOrderImports { get; set; }
public DbSet<Customer> Customers { get; set; } public DbSet<Customer> Customers { get; set; }
public DbSet<CustomerTp> CustomerTps { get; set; } public DbSet<CustomerTp> CustomerTps { get; set; }
public DbSet<Item> Items { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{ {
@@ -1728,6 +1729,265 @@ namespace SytelineSaAppEfDataModel
.HasDatabaseName("IX_cust_tp_RowPointer") .HasDatabaseName("IX_cust_tp_RowPointer")
.IsUnique(); .IsUnique();
}); });
modelBuilder.Entity<Item>(entity =>
{
entity.ToTable("item");
entity.HasKey(e => e.ItemCode);
entity.Property(e => e.ItemCode).HasColumnName("item").HasMaxLength(60).IsRequired();
entity.Property(e => e.Description).HasColumnName("description").HasMaxLength(60).IsRequired(false);
entity.Property(e => e.QtyAllocjob).HasColumnName("qty_allocjob").IsRequired(false);
entity.Property(e => e.UM).HasColumnName("u_m").HasMaxLength(6).IsRequired(false);
entity.Property(e => e.LeadTime).HasColumnName("lead_time").IsRequired();
entity.Property(e => e.LotSize).HasColumnName("lot_size").IsRequired(false);
entity.Property(e => e.QtyUsedYtd).HasColumnName("qty_used_ytd").IsRequired(false);
entity.Property(e => e.QtyMfgYtd).HasColumnName("qty_mfg_ytd").IsRequired(false);
entity.Property(e => e.AbcCode).HasColumnName("abc_code").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.DrawingNbr).HasColumnName("drawing_nbr").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.ProductCode).HasColumnName("product_code").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.PMTCode).HasColumnName("p_m_t_code").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.CostMethod).HasColumnName("cost_method").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.LstLotSize).HasColumnName("lst_lot_size").IsRequired(false);
entity.Property(e => e.UnitCost).HasColumnName("unit_cost").IsRequired(false);
entity.Property(e => e.LstUCost).HasColumnName("lst_u_cost").IsRequired(false);
entity.Property(e => e.AvgUCost).HasColumnName("avg_u_cost").IsRequired(false);
entity.Property(e => e.Job).HasColumnName("job").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.Suffix).HasColumnName("suffix").IsRequired(false);
entity.Property(e => e.Stocked).HasColumnName("stocked").HasColumnType("tinyint");
entity.Property(e => e.MatlType).HasColumnName("matl_type").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.FamilyCode).HasColumnName("family_code").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.LowLevel).HasColumnName("low_level").IsRequired(false);
entity.Property(e => e.LastInv).HasColumnName("last_inv").IsRequired(false);
entity.Property(e => e.DaysSupply).HasColumnName("days_supply").IsRequired(false);
entity.Property(e => e.OrderMin).HasColumnName("order_min").IsRequired(false);
entity.Property(e => e.OrderMult).HasColumnName("order_mult").IsRequired(false);
entity.Property(e => e.PlanCode).HasColumnName("plan_code").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.MpsFlag).HasColumnName("mps_flag").HasColumnType("tinyint");
entity.Property(e => e.AcceptReq).HasColumnName("accept_req").HasColumnType("tinyint");
entity.Property(e => e.ChangeDate).HasColumnName("change_date").IsRequired(false);
entity.Property(e => e.Revision).HasColumnName("revision").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.PhantomFlag).HasColumnName("phantom_flag").HasColumnType("tinyint");
entity.Property(e => e.PlanFlag).HasColumnName("plan_flag").HasColumnType("tinyint");
entity.Property(e => e.PaperTime).HasColumnName("paper_time").IsRequired();
entity.Property(e => e.DockTime).HasColumnName("dock_time").IsRequired();
entity.Property(e => e.AsmSetup).HasColumnName("asm_setup").IsRequired(false);
entity.Property(e => e.AsmRun).HasColumnName("asm_run").IsRequired(false);
entity.Property(e => e.AsmMatl).HasColumnName("asm_matl").IsRequired(false);
entity.Property(e => e.AsmTool).HasColumnName("asm_tool").IsRequired(false);
entity.Property(e => e.AsmFixture).HasColumnName("asm_fixture").IsRequired(false);
entity.Property(e => e.AsmOther).HasColumnName("asm_other").IsRequired(false);
entity.Property(e => e.AsmFixed).HasColumnName("asm_fixed").IsRequired(false);
entity.Property(e => e.AsmVar).HasColumnName("asm_var").IsRequired(false);
entity.Property(e => e.AsmOutside).HasColumnName("asm_outside").IsRequired(false);
entity.Property(e => e.CompSetup).HasColumnName("comp_setup").IsRequired(false);
entity.Property(e => e.CompRun).HasColumnName("comp_run").IsRequired(false);
entity.Property(e => e.CompMatl).HasColumnName("comp_matl").IsRequired(false);
entity.Property(e => e.CompTool).HasColumnName("comp_tool").IsRequired(false);
entity.Property(e => e.CompFixture).HasColumnName("comp_fixture").IsRequired(false);
entity.Property(e => e.CompOther).HasColumnName("comp_other").IsRequired(false);
entity.Property(e => e.CompFixed).HasColumnName("comp_fixed").IsRequired(false);
entity.Property(e => e.CompVar).HasColumnName("comp_var").IsRequired(false);
entity.Property(e => e.CompOutside).HasColumnName("comp_outside").IsRequired(false);
entity.Property(e => e.SubMatl).HasColumnName("sub_matl").IsRequired(false);
entity.Property(e => e.ShrinkFact).HasColumnName("shrink_fact").IsRequired(false);
entity.Property(e => e.AltItem).HasColumnName("alt_item").HasMaxLength(60).IsRequired(false);
entity.Property(e => e.UnitWeight).HasColumnName("unit_weight").IsRequired(false);
entity.Property(e => e.WeightUnits).HasColumnName("weight_units").HasMaxLength(4).IsRequired(false);
entity.Property(e => e.Charfld4).HasColumnName("charfld4").HasMaxLength(40).IsRequired(false);
entity.Property(e => e.CurUCost).HasColumnName("cur_u_cost").IsRequired(false);
entity.Property(e => e.FeatType).HasColumnName("feat_type").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.VarLead).HasColumnName("var_lead").IsRequired(false);
entity.Property(e => e.FeatStr).HasColumnName("feat_str").HasMaxLength(255).IsRequired(false);
entity.Property(e => e.NextConfig).HasColumnName("next_config").IsRequired(false);
entity.Property(e => e.FeatTempl).HasColumnName("feat_templ").HasMaxLength(255).IsRequired(false);
entity.Property(e => e.Backflush).HasColumnName("backflush").HasColumnType("tinyint");
entity.Property(e => e.Charfld1).HasColumnName("charfld1").HasMaxLength(40).IsRequired(false);
entity.Property(e => e.Charfld2).HasColumnName("charfld2").HasMaxLength(40).IsRequired(false);
entity.Property(e => e.Charfld3).HasColumnName("charfld3").HasMaxLength(40).IsRequired(false);
entity.Property(e => e.Decifld1).HasColumnName("decifld1").IsRequired(false);
entity.Property(e => e.Decifld2).HasColumnName("decifld2").IsRequired(false);
entity.Property(e => e.Decifld3).HasColumnName("decifld3").IsRequired(false);
entity.Property(e => e.Logifld).HasColumnName("logifld").HasColumnType("tinyint");
entity.Property(e => e.Datefld).HasColumnName("datefld").IsRequired(false);
entity.Property(e => e.TrackEcn).HasColumnName("track_ecn").HasColumnType("tinyint");
entity.Property(e => e.CommCode).HasColumnName("comm_code").HasMaxLength(12).IsRequired(false);
entity.Property(e => e.Origin).HasColumnName("origin").HasMaxLength(3).IsRequired(false);
entity.Property(e => e.UnitMatCost).HasColumnName("unit_mat_cost").IsRequired(false);
entity.Property(e => e.UnitDutyCost).HasColumnName("unit_duty_cost").IsRequired(false);
entity.Property(e => e.UnitFreightCost).HasColumnName("unit_freight_cost").IsRequired(false);
entity.Property(e => e.UnitBrokerageCost).HasColumnName("unit_brokerage_cost").IsRequired(false);
entity.Property(e => e.CurMatCost).HasColumnName("cur_mat_cost").IsRequired(false);
entity.Property(e => e.CurDutyCost).HasColumnName("cur_duty_cost").IsRequired(false);
entity.Property(e => e.CurFreightCost).HasColumnName("cur_freight_cost").IsRequired(false);
entity.Property(e => e.CurBrokerageCost).HasColumnName("cur_brokerage_cost").IsRequired(false);
entity.Property(e => e.TaxCode1).HasColumnName("tax_code1").HasMaxLength(12).IsRequired(false);
entity.Property(e => e.TaxCode2).HasColumnName("tax_code2").HasMaxLength(12).IsRequired(false);
entity.Property(e => e.BflushLoc).HasColumnName("bflush_loc").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.Reservable).HasColumnName("reservable").HasColumnType("tinyint");
entity.Property(e => e.ShelfLife).HasColumnName("shelf_life").IsRequired(false);
entity.Property(e => e.LotPrefix).HasColumnName("lot_prefix").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.SerialPrefix).HasColumnName("serial_prefix").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.SerialLength).HasColumnName("serial_length").IsRequired(false);
entity.Property(e => e.IssueBy).HasColumnName("issue_by").HasMaxLength(3).IsRequired(false);
entity.Property(e => e.SerialTracked).HasColumnName("serial_tracked").HasColumnType("tinyint");
entity.Property(e => e.LotTracked).HasColumnName("lot_tracked").HasColumnType("tinyint");
entity.Property(e => e.CostType).HasColumnName("cost_type").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.MatlCost).HasColumnName("matl_cost").IsRequired(false);
entity.Property(e => e.LbrCost).HasColumnName("lbr_cost").IsRequired(false);
entity.Property(e => e.FovhdCost).HasColumnName("fovhd_cost").IsRequired(false);
entity.Property(e => e.VovhdCost).HasColumnName("vovhd_cost").IsRequired(false);
entity.Property(e => e.OutCost).HasColumnName("out_cost").IsRequired(false);
entity.Property(e => e.CurMatlCost).HasColumnName("cur_matl_cost").IsRequired(false);
entity.Property(e => e.CurLbrCost).HasColumnName("cur_lbr_cost").IsRequired(false);
entity.Property(e => e.CurFovhdCost).HasColumnName("cur_fovhd_cost").IsRequired(false);
entity.Property(e => e.CurVovhdCost).HasColumnName("cur_vovhd_cost").IsRequired(false);
entity.Property(e => e.CurOutCost).HasColumnName("cur_out_cost").IsRequired(false);
entity.Property(e => e.AvgMatlCost).HasColumnName("avg_matl_cost").IsRequired(false);
entity.Property(e => e.AvgLbrCost).HasColumnName("avg_lbr_cost").IsRequired(false);
entity.Property(e => e.AvgFovhdCost).HasColumnName("avg_fovhd_cost").IsRequired(false);
entity.Property(e => e.AvgVovhdCost).HasColumnName("avg_vovhd_cost").IsRequired(false);
entity.Property(e => e.AvgOutCost).HasColumnName("avg_out_cost").IsRequired(false);
entity.Property(e => e.ProdType).HasColumnName("prod_type").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.RatePerDay).HasColumnName("rate_per_day").IsRequired(false);
entity.Property(e => e.MpsPlanFence).HasColumnName("mps_plan_fence").IsRequired(false);
entity.Property(e => e.PassReq).HasColumnName("pass_req").HasColumnType("tinyint");
entity.Property(e => e.LotGenExp).HasColumnName("lot_gen_exp").HasColumnType("tinyint");
entity.Property(e => e.SupplySite).HasColumnName("supply_site").HasMaxLength(16).IsRequired(false);
entity.Property(e => e.ProdMix).HasColumnName("prod_mix").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.Stat).HasColumnName("stat").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.StatusChgUserCode).HasColumnName("status_chg_user_code").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.ChgDate).HasColumnName("chg_date").IsRequired(false);
entity.Property(e => e.ReasonCode).HasColumnName("reason_code").HasMaxLength(6).IsRequired(false);
entity.Property(e => e.SupplyWhse).HasColumnName("supply_whse").HasMaxLength(8).IsRequired(false);
entity.Property(e => e.DuePeriod).HasColumnName("due_period").IsRequired(false);
entity.Property(e => e.OrderMax).HasColumnName("order_max").IsRequired(false);
entity.Property(e => e.MrpPart).HasColumnName("mrp_part").HasColumnType("tinyint");
entity.Property(e => e.InfinitePart).HasColumnName("infinite_part").HasColumnType("tinyint");
entity.Property(e => e.NoteExistsFlag).HasColumnName("NoteExistsFlag").HasColumnType("tinyint");
entity.Property(e => e.RecordDate).HasColumnName("RecordDate").IsRequired();
entity.Property(e => e.RowPointer).HasColumnName("RowPointer").HasColumnType("uniqueidentifier").IsRequired();
entity.Property(e => e.SupplyToleranceHrs).HasColumnName("supply_tolerance_hrs").IsRequired(false);
entity.Property(e => e.ExpLeadTime).HasColumnName("exp_lead_time").IsRequired();
entity.Property(e => e.VarExpLead).HasColumnName("var_exp_lead").IsRequired(false);
entity.Property(e => e.Buyer).HasColumnName("buyer").HasMaxLength(60).IsRequired(false);
entity.Property(e => e.OrderConfigurable).HasColumnName("order_configurable").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.JobConfigurable).HasColumnName("job_configurable").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.CfgModel).HasColumnName("cfg_model").HasMaxLength(255).IsRequired(false);
entity.Property(e => e.CoPostConfig).HasColumnName("co_post_config").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.JobPostConfig).HasColumnName("job_post_config").HasMaxLength(1).IsRequired(false);
entity.Property(e => e.AutoJob).HasColumnName("auto_job").HasMaxLength(1).IsRequired();
entity.Property(e => e.AutoPost).HasColumnName("auto_post").HasMaxLength(1).IsRequired();
entity.Property(e => e.Setupgroup).HasColumnName("setupgroup").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.CreatedBy).HasColumnName("CreatedBy").HasMaxLength(60).IsRequired();
entity.Property(e => e.UpdatedBy).HasColumnName("UpdatedBy").HasMaxLength(60).IsRequired();
entity.Property(e => e.CreateDate).HasColumnName("CreateDate").IsRequired();
entity.Property(e => e.InWorkflow).HasColumnName("InWorkflow").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.MfgSupplySwitchingActive).HasColumnName("mfg_supply_switching_active").HasColumnType("tinyint");
entity.Property(e => e.TimeFenceRule).HasColumnName("time_fence_rule").IsRequired(false);
entity.Property(e => e.TimeFenceValue).HasColumnName("time_fence_value").IsRequired(false);
entity.Property(e => e.EarliestPlannedPoReceipt).HasColumnName("earliest_planned_po_receipt").IsRequired(false);
entity.Property(e => e.UseReorderPoint).HasColumnName("use_reorder_point").HasColumnType("tinyint");
entity.Property(e => e.ReorderPoint).HasColumnName("reorder_point").IsRequired(false);
entity.Property(e => e.FixedOrderQty).HasColumnName("fixed_order_qty").IsRequired(false);
entity.Property(e => e.UnitInsuranceCost).HasColumnName("unit_insurance_cost").IsRequired(false);
entity.Property(e => e.UnitLocFrtCost).HasColumnName("unit_loc_frt_cost").IsRequired(false);
entity.Property(e => e.CurInsuranceCost).HasColumnName("cur_insurance_cost").IsRequired(false);
entity.Property(e => e.CurLocFrtCost).HasColumnName("cur_loc_frt_cost").IsRequired(false);
entity.Property(e => e.TaxFreeMatl).HasColumnName("tax_free_matl").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.TaxFreeDays).HasColumnName("tax_free_days").IsRequired(false);
entity.Property(e => e.SafetyStockPercent).HasColumnName("safety_stock_percent").IsRequired();
entity.Property(e => e.TariffClassification).HasColumnName("tariff_classification").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.Lowdate).HasColumnName("lowdate").IsRequired();
entity.Property(e => e.RcptRqmt).HasColumnName("rcpt_rqmt").HasMaxLength(1).IsRequired();
entity.Property(e => e.ActiveForDataIntegration).HasColumnName("active_for_data_integration").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.RcvdOverPoQtyTolerance).HasColumnName("rcvd_over_po_qty_tolerance").IsRequired(false);
entity.Property(e => e.RcvdUnderPoQtyTolerance).HasColumnName("rcvd_under_po_qty_tolerance").IsRequired(false);
entity.Property(e => e.IncludeInNetChangePlanning).HasColumnName("include_in_net_change_planning").HasColumnType("tinyint");
entity.Property(e => e.Kit).HasColumnName("kit").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.PrintKitComponents).HasColumnName("print_kit_components").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.SafetyStockRule).HasColumnName("safety_stock_rule").IsRequired(false);
entity.Property(e => e.ShowInDropDownList).HasColumnName("show_in_drop_down_list").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.ControlledByExternalIcs).HasColumnName("controlled_by_external_ics").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.InventoryUclTolerance).HasColumnName("inventory_ucl_tolerance").IsRequired(false);
entity.Property(e => e.InventoryLclTolerance).HasColumnName("inventory_lcl_tolerance").IsRequired(false);
entity.Property(e => e.SeparationAttribute).HasColumnName("separation_attribute").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.BatchReleaseAttribute1).HasColumnName("batch_release_attribute1").IsRequired(false);
entity.Property(e => e.BatchReleaseAttribute2).HasColumnName("batch_release_attribute2").IsRequired(false);
entity.Property(e => e.BatchReleaseAttribute3).HasColumnName("batch_release_attribute3").IsRequired(false);
entity.Property(e => e.Picture).HasColumnName("picture").HasColumnType("image").IsRequired(false);
entity.Property(e => e.ActiveForCustomerPortal).HasColumnName("active_for_customer_portal").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.Featured).HasColumnName("featured").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.TopSeller).HasColumnName("top_seller").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.Overview).HasColumnName("overview").HasMaxLength(2000).IsRequired(false);
entity.Property(e => e.PreassignLots).HasColumnName("preassign_lots").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.PreassignSerials).HasColumnName("preassign_serials").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.AttrGroup).HasColumnName("attr_group").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.DimensionGroup).HasColumnName("dimension_group").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.LotAttrGroup).HasColumnName("lot_attr_group").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.TrackPieces).HasColumnName("track_pieces").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.BomLastImportDate).HasColumnName("bom_last_import_date").IsRequired(false);
entity.Property(e => e.SaveCurrentRevUponBomImport).HasColumnName("save_current_rev_upon_bom_import").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.NaftaPrefCrit).HasColumnName("nafta_pref_crit").HasMaxLength(2).IsRequired(false);
entity.Property(e => e.SubjectToNaftaRvc).HasColumnName("subject_to_nafta_rvc").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.Producer).HasColumnName("producer").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.NaftaCountryOfOrigin).HasColumnName("nafta_country_of_origin").HasMaxLength(3).IsRequired(false);
entity.Property(e => e.MustUseFutureRcptsBeforePln).HasColumnName("must_use_future_rcpts_before_pln").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.SubjectToExciseTax).HasColumnName("subject_to_excise_tax").HasColumnType("tinyint").IsRequired();
entity.Property(e => e.ExciseTaxPercent).HasColumnName("excise_tax_percent").IsRequired(false);
entity.Property(e => e.Uf_PLT_AddItemDesc).HasColumnName("uf_PLT_AddItemDesc").HasMaxLength(60).IsRequired(false);
entity.Property(e => e.Uf_PLT_Class).HasColumnName("uf_PLT_Class").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.Uf_PLT_CNCode).HasColumnName("uf_PLT_CNCode").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.Uf_PLT_Norm).HasColumnName("uf_PLT_Norm").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.Uf_PLT_OldItemID).HasColumnName("uf_PLT_OldItemID").HasMaxLength(60).IsRequired(false);
entity.Property(e => e.Uf_PLT_Volume).HasColumnName("uf_PLT_Volume").IsRequired(false);
entity.Property(e => e.Uf_PLT_VolumeUnit).HasColumnName("uf_PLT_VolumeUnit").HasMaxLength(6).IsRequired(false);
entity.Property(e => e.Uf_INT_Replicate).HasColumnName("UF_INT_Replicate").HasColumnType("tinyint");
entity.Property(e => e.BoxId).HasColumnName("box_id").HasMaxLength(3).IsRequired(false);
entity.Property(e => e.ItemLength).HasColumnName("item_length").HasColumnType("decimal(8,2)").IsRequired(false);
entity.Property(e => e.ItemFi).HasColumnName("item_fi").HasColumnType("decimal(8,2)").IsRequired(false);
entity.Property(e => e.BoxItemsCnt).HasColumnName("BoxItemsCnt").IsRequired(false);
entity.Property(e => e.Klient).HasColumnName("klient").HasMaxLength(10).IsRequired(false);
entity.Property(e => e.Uf_FKR_FA_RodzajPozycji).HasColumnName("Uf_FKR_FA_RodzajPozycji").HasMaxLength(4).IsRequired(false);
entity.Property(e => e.Uf_Nr_Klienta).HasColumnName("Uf_Nr_Klienta").HasMaxLength(20).IsRequired(false);
entity.Property(e => e.Uf_FKR_FA_Items_Nr_Zmiany).HasColumnName("Uf_FKR_FA_Items_Nr_Zmiany").IsRequired(false);
entity.Property(e => e.Uf_FKR_FA_item_core).HasColumnName("Uf_FKR_FA_item_core").HasMaxLength(30).IsRequired(false);
entity.Property(e => e.Uf_FKR_GTU).HasColumnName("Uf_FKR_GTU").HasMaxLength(15).IsRequired(false);
entity.Property(e => e.Uf_FKR_FA_Ilosc_Na_Jedn_Pak).HasColumnName("Uf_FKR_FA_Ilosc_Na_Jedn_Pak").IsRequired(false);
entity.Property(e => e.Uf_Element_Ilosc_W_Palecie).HasColumnName("Uf_Element_Ilosc_W_Palecie").IsRequired(false);
entity.Property(e => e.Uf_PUDELKO).HasColumnName("Uf_PUDELKO").HasColumnType("tinyint").IsRequired(false);
entity.Property(e => e.Uf_IMP_OrginalItem).HasColumnName("Uf_IMP_OrginalItem").HasMaxLength(60).IsRequired(false);
// Indexes
entity.HasIndex(e => new { e.ItemCode, e.Lowdate, e.RcptRqmt, e.RowPointer })
.HasDatabaseName("IX_item_item_lowdate")
.IsUnique();
entity.HasIndex(e => new { e.LowLevel, e.ItemCode })
.HasDatabaseName("IX_item_level")
.IsUnique();
entity.HasIndex(e => new { e.PlanCode, e.ItemCode })
.HasDatabaseName("IX_item_plan")
.IsUnique();
entity.HasIndex(e => new { e.ProductCode, e.ItemCode })
.HasDatabaseName("IX_item_product")
.IsUnique();
entity.HasIndex(e => new { e.SerialTracked, e.ItemCode })
.HasDatabaseName("IX_item_serial")
.IsUnique();
entity.HasIndex(e => new { e.UseReorderPoint, e.ItemCode })
.HasDatabaseName("IX_item_use_reorder_point")
.IsUnique();
entity.HasIndex(e => e.RowPointer)
.HasDatabaseName("IX_item_RowPointer")
.IsUnique();
});
} }
} }
} }