From 77b040e52879ffa262323c0b57f1a10521b30c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Fri, 12 Dec 2025 14:33:52 +0300 Subject: [PATCH] =?UTF-8?q?Code=20s=C3=BCtunlar=C4=B1=20kald=C4=B1r=C4=B1l?= =?UTF-8?q?d=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Intranet/DepartmentDto.cs | 1 - .../Intranet/JobPositionDto.cs | 4 +- .../Erp.Platform.DbMigrator/Seeds/Cities.json | 12 - .../Seeds/HostDataSeeder.cs | 10 +- .../Seeds/ListFormSeeder_Accounting.cs | 79 +-- .../Seeds/ListFormSeeder_Crm.cs | 23 +- .../Seeds/ListFormSeeder_Hr.cs | 74 +-- .../Seeds/ListFormSeeder_Maintenance.cs | 40 +- .../Seeds/ListFormSeeder_Mrp.cs | 38 -- .../Seeds/ListFormSeeder_Saas.cs | 51 -- .../Seeds/ListFormSeeder_Store.cs | 131 +--- .../Seeds/ListFormSeeder_SupplyChain.cs | 42 +- .../Branch/BranchSeedManager.cs | 9 +- .../Entities/Branch/Accounting/Bank.cs | 1 - .../Entities/Branch/Accounting/Cash.cs | 1 - .../Branch/Accounting/CurrentAccount.cs | 1 - .../Erp.Platform.Domain/Entities/Host/City.cs | 4 +- .../Entities/Host/Country.cs | 6 +- .../Entities/Tenant/Crm/LossReason.cs | 8 +- .../Entities/Tenant/Crm/Opportunity.cs | 2 +- .../Entities/Tenant/Hr/Badge.cs | 1 - .../Entities/Tenant/Hr/CostCenter.cs | 1 - .../Entities/Tenant/Hr/Department.cs | 1 - .../Entities/Tenant/Hr/Employee.cs | 2 +- .../Entities/Tenant/Hr/JobPosition.cs | 10 +- .../Entities/Tenant/Maintenance/Fault.cs | 3 +- .../Entities/Tenant/Maintenance/Workcenter.cs | 1 - .../Entities/Tenant/Mrp/Operation.cs | 1 - .../Entities/Tenant/Mrp/OperationType.cs | 1 - .../Entities/Tenant/Store/Location.cs | 1 - .../Entities/Tenant/Store/LocationType.cs | 1 - .../Entities/Tenant/Store/Putaway.cs | 1 - .../Entities/Tenant/Store/Warehouse.cs | 1 - .../Entities/Tenant/Store/WarehouseType.cs | 1 - .../Entities/Tenant/Store/Zone.cs | 1 - .../Entities/Tenant/Store/ZoneType.cs | 1 - .../Tenant/SupplyChain/MaterialGroup.cs | 1 - .../Tenant/SupplyChain/MaterialType.cs | 1 - .../EntityFrameworkCore/PlatformDbContext.cs | 41 +- ....cs => 20251212092917_Initial.Designer.cs} | 164 +---- ...5_Initial.cs => 20251212092917_Initial.cs} | 57 +- .../PlatformDbContextModelSnapshot.cs | 162 +---- .../Tenants/Seeds/TenantData.json | 597 +++++------------- .../Tenants/TenantDataSeeder.cs | 226 +++---- .../Tenants/TenantDatabaseViewCreator.cs | 1 - .../Tenants/TenantSeederDto.cs | 131 ++-- ui/src/proxy/intranet/models.ts | 2 - 47 files changed, 438 insertions(+), 1510 deletions(-) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251211210045_Initial.Designer.cs => 20251212092917_Initial.Designer.cs} (99%) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251211210045_Initial.cs => 20251212092917_Initial.cs} (99%) diff --git a/api/src/Erp.Platform.Application.Contracts/Intranet/DepartmentDto.cs b/api/src/Erp.Platform.Application.Contracts/Intranet/DepartmentDto.cs index 095ec244..c8cfae52 100644 --- a/api/src/Erp.Platform.Application.Contracts/Intranet/DepartmentDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Intranet/DepartmentDto.cs @@ -7,7 +7,6 @@ namespace Erp.Platform.Intranet; public class DepartmentDto : FullAuditedEntityDto { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public Guid? ParentDepartmentId { get; set; } diff --git a/api/src/Erp.Platform.Application.Contracts/Intranet/JobPositionDto.cs b/api/src/Erp.Platform.Application.Contracts/Intranet/JobPositionDto.cs index c4294d27..35851bbb 100644 --- a/api/src/Erp.Platform.Application.Contracts/Intranet/JobPositionDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Intranet/JobPositionDto.cs @@ -6,11 +6,13 @@ namespace Erp.Platform.Intranet; public class JobPositionDto : FullAuditedEntityDto { public Guid? TenantId { get; set; } - public string Code { get; set; } + public string Name { get; set; } public string Description { get; set; } + public Guid? DepartmentId { get; set; } public string DepartmentName { get; set; } + public string Level { get; set; } public decimal MinSalary { get; set; } public decimal MaxSalary { get; set; } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/Cities.json b/api/src/Erp.Platform.DbMigrator/Seeds/Cities.json index d658e142..e4509067 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/Cities.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/Cities.json @@ -7853,12 +7853,6 @@ "PlateCode": "AKH", "Country": "SA" }, - { - "Name": "Al Khobar", - "Code": "AQK", - "PlateCode": "AQK", - "Country": "SA" - }, { "Name": "Al Khobar", "Code": "ALK", @@ -7943,12 +7937,6 @@ "PlateCode": "BRU", "Country": "SA" }, - { - "Name": "Buraydah", - "Code": "BUR", - "PlateCode": "BUR", - "Country": "SA" - }, { "Name": "Dhahran", "Code": "DHA", diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs b/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs index 3e113796..46751a91 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs @@ -268,7 +268,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency // DB’de mevcut kodları set olarak al var existingCodes = (await dbCtx.Set() - .Select(c => c.Code) + .Select(c => c.Name) .ToListAsync()) .ToHashSet(); @@ -289,7 +289,6 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency continue; buffer.Add(new Country( - item.Code, item.Code, item.Name, item.GroupName, @@ -326,11 +325,11 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency // 1. Mevcut kayıtları çek (tek sorguda) var existingCities = await dbCtx.Set() - .Select(d => new { d.Code }) + .Select(d => new { d.Name }) .ToListAsync(); var existingSet = existingCities - .Select(d => d.Code) + .Select(d => d.Name) .ToHashSet(); var options = new JsonSerializerOptions @@ -346,14 +345,13 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency { if (item == null) continue; - var key = $"{item.Country}.{item.Code}"; + var key = $"{item.Country}.{item.Name}"; if (existingSet.Contains(key)) continue; // duplicate kontrolü buffer.Add(new City( Guid.NewGuid(), item.Country, item.Name, - key, item.PlateCode )); diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs index 3f88ec23..6c9afbfb 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs @@ -84,22 +84,21 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Bank)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox}, new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "Address1", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "Address2", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 8, DataField = "City", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 9, DataField = "District", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 10, DataField = "PostalCode", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 11, DataField = "PhoneNumber", ColSpan = 1, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order = 12, DataField = "Email", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "City", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 6, DataField = "District", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 7, DataField = "PostalCode", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 8, DataField = "Address1", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 9, DataField = "Address2", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 10, DataField = "PhoneNumber", ColSpan = 1, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order = 11, DataField = "Email", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), @@ -157,22 +156,6 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 200, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -551,17 +534,16 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Cash)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 5, DataField = "Currency", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 4, DataField = "Currency", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), @@ -612,22 +594,6 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 150, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -760,7 +726,6 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende [ new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "PartnerId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 5, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 6, DataField = "TaxNumber", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox }, @@ -838,22 +803,6 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 150, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs index 2b1043db..069978bc 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs @@ -977,7 +977,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.LossReason)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -988,15 +988,14 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LossReason)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField="Category", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -1027,22 +1026,6 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs index ef902260..63928ce4 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs @@ -162,7 +162,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -173,15 +173,14 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.JobPosition)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField="DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -219,22 +218,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 0, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -474,7 +457,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField="ParentDepartmentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -508,22 +490,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 0, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -684,7 +650,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ - new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField="Icon", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -721,22 +686,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 200, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -994,7 +943,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField="ParentCostCenterId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -1033,22 +981,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 0, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs index cd80f7ba..cf33cc98 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs @@ -334,7 +334,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "WorkcenterTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -380,22 +379,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -1335,8 +1318,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Title", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField = "Location", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, @@ -1380,25 +1362,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Title", + FieldName = "Name", Width = 180, ListOrderNo = 3, Visible = true, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs index 81d1e495..22911d56 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs @@ -211,7 +211,6 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "CategoryId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -250,24 +249,6 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -441,7 +422,6 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "OperationTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -485,24 +465,6 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs index 657b7000..dfa68958 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs @@ -3956,7 +3956,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new() { Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Symbol", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Rate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, @@ -3984,22 +3983,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), }, new() - { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - }, - new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -4200,7 +4183,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new() { Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "GroupName", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "Currency", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -4234,22 +4216,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), }, new() - { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - }, - new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -4406,7 +4372,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency [ new EditingFormItemDto { Order = 1, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "PlateCode", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } ] } @@ -4473,22 +4438,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), }, new() - { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 120, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - }, - new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs index 7b37c645..72a71976 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs @@ -88,7 +88,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, @@ -117,22 +116,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -229,7 +212,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, @@ -258,22 +240,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -370,7 +336,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, @@ -399,22 +364,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -511,7 +460,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -556,22 +504,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -891,7 +823,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "WarehouseId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -926,22 +857,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -1107,7 +1022,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "WarehouseId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -1141,22 +1055,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -1382,10 +1280,10 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Priority", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 4, DataField = "Strategy", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Priority", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 3, DataField = "Strategy", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 5, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, ]}, new() { @@ -1393,9 +1291,8 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new EditingFormItemDto { Order = 1, DataField = "WarehouseId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "MaterialTypeId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "MaterialGroupId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 5, DataField = "TargetZoneId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 6, DataField = "TargetLocationId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "TargetZoneId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "TargetLocationId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]}, }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -1433,22 +1330,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs index 08f1262c..8d433a2d 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs @@ -88,7 +88,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, @@ -117,22 +116,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, @@ -227,11 +210,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 5, DataField = "ParentGroupId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 3, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 4, DataField = "ParentGroupId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), @@ -258,22 +240,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 200, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = DefaultValidationRuleRequiredJson, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson - }, new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, diff --git a/api/src/Erp.Platform.Domain/Branch/BranchSeedManager.cs b/api/src/Erp.Platform.Domain/Branch/BranchSeedManager.cs index d87bc965..02439dfd 100644 --- a/api/src/Erp.Platform.Domain/Branch/BranchSeedManager.cs +++ b/api/src/Erp.Platform.Domain/Branch/BranchSeedManager.cs @@ -394,7 +394,7 @@ public class BranchSeedManager : DomainService var bankLog = CreateLog(nameof(Bank)); foreach (var item in items.Banks) { - var exists = await _bankRepository.AnyAsync(x => x.Code == item.Code && x.BranchId == branchId); + var exists = await _bankRepository.AnyAsync(x => x.Name == item.Name && x.BranchId == branchId); if (!exists) { @@ -402,7 +402,6 @@ public class BranchSeedManager : DomainService { TenantId = tenantId, BranchId = branchId, - Code = item.Code, Name = item.Name, Address1 = item.Address1, Address2 = item.Address2, @@ -431,7 +430,7 @@ public class BranchSeedManager : DomainService var cashLog = CreateLog(nameof(Cash)); foreach (var item in items.Cashes) { - var exists = await _cashRepository.AnyAsync(x => x.Code == item.Code && x.BranchId == branchId); + var exists = await _cashRepository.AnyAsync(x => x.Name == item.Name && x.BranchId == branchId); if (!exists) { @@ -439,7 +438,6 @@ public class BranchSeedManager : DomainService { TenantId = tenantId, BranchId = branchId, - Code = item.Code, Name = item.Name, Description = item.Description, Currency = item.Currency, @@ -464,7 +462,7 @@ public class BranchSeedManager : DomainService var currentAccountLog = CreateLog(nameof(CurrentAccount)); foreach (var item in items.CurrentAccounts) { - var exists = await _currentAccountRepository.AnyAsync(x => x.Code == item.Code && x.BranchId == branchId); + var exists = await _currentAccountRepository.AnyAsync(x => x.Name == item.Name && x.BranchId == branchId); if (!exists) { @@ -472,7 +470,6 @@ public class BranchSeedManager : DomainService { TenantId = tenantId, BranchId = branchId, - Code = item.Code, Name = item.Name, Description = item.Description, TaxNumber = item.TaxNumber, diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Bank.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Bank.cs index 50233ddf..937b085a 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Bank.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Bank.cs @@ -9,7 +9,6 @@ public class Bank : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public Guid? BranchId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Address1 { get; set; } public string Address2 { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Cash.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Cash.cs index 99a6b037..7c05d38a 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Cash.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Cash.cs @@ -9,7 +9,6 @@ public class Cash : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public Guid? BranchId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CurrentAccount.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CurrentAccount.cs index aba5ad95..9b5db2c7 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CurrentAccount.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CurrentAccount.cs @@ -14,7 +14,6 @@ public class CurrentAccount : FullAuditedEntity, IMultiTenant public Guid? PartnerId { get; set; } public Partner? Partner { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Host/City.cs b/api/src/Erp.Platform.Domain/Entities/Host/City.cs index 1d012b0b..b87bd01f 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/City.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/City.cs @@ -8,19 +8,17 @@ public class City : FullAuditedEntity { public string Country { get; set; } public string Name { get; set; } - public string Code { get; set; } public string PlateCode { get; set; } public ICollection Districts { get; set; } protected City() { } - public City(Guid id, string country, string name, string code, string plateCode) + public City(Guid id, string country, string name, string plateCode) : base(id) { Country = country; Name = name; - Code = code; PlateCode = plateCode; } } diff --git a/api/src/Erp.Platform.Domain/Entities/Host/Country.cs b/api/src/Erp.Platform.Domain/Entities/Host/Country.cs index 161929a0..98d2d88d 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/Country.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/Country.cs @@ -1,12 +1,10 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; namespace Erp.Platform.Entities; public class Country : FullAuditedEntity { - public string Code { get; set; } // TR, US public string Name { get; set; } public string GroupName { get; set; } public string Currency { get; set; } @@ -21,7 +19,6 @@ public class Country : FullAuditedEntity public Country( string id, - string code, string name, string groupName, string currency, @@ -31,7 +28,6 @@ public class Country : FullAuditedEntity bool stateRequired = false) : base(id) { - Code = code; Name = name; GroupName = groupName; Currency = currency; diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/LossReason.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/LossReason.cs index aac2ea47..ad746b98 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/LossReason.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/LossReason.cs @@ -5,15 +5,19 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class LossReason : FullAuditedEntity, IMultiTenant +public class LossReason : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public string Category { get; set; } public bool IsActive { get; set; } public ICollection Opportunities { get; set; } + + public LossReason(string id) + { + Id = id; + } } \ No newline at end of file diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/Opportunity.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/Opportunity.cs index 02a83759..a0813c0a 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/Opportunity.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/Opportunity.cs @@ -33,7 +33,7 @@ public class Opportunity : FullAuditedEntity, IMultiTenant public Guid SourceId { get; set; } public Source Source { get; set; } - public Guid? LossReasonId { get; set; } // Kaybetme Nedeni + public string? LossReasonId { get; set; } // Kaybetme Nedeni public LossReason LossReason { get; set; } public string Status { get; set; } // Durum diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Badge.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Badge.cs index e99c0f6e..d25a34ea 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Badge.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Badge.cs @@ -8,7 +8,6 @@ public class Badge : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public string Icon { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs index 88e02049..749d591c 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs @@ -9,7 +9,6 @@ public class CostCenter : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Department.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Department.cs index 91fbace7..dada542e 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Department.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Department.cs @@ -10,7 +10,6 @@ public class Department : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs index 63793440..c64a6a9e 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs @@ -40,7 +40,7 @@ public class Employee : FullAuditedEntity, IMultiTenant public Guid? EmploymentTypeId { get; set; } public EmploymentType EmploymentType { get; set; } - public Guid? JobPositionId { get; set; } + public string? JobPositionId { get; set; } public JobPosition JobPosition { get; set; } public Guid? DepartmentId { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/JobPosition.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/JobPosition.cs index 688e18ce..d2e9dbd6 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/JobPosition.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/JobPosition.cs @@ -4,15 +4,16 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class JobPosition : FullAuditedEntity, IMultiTenant +public class JobPosition : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } + public Guid? DepartmentId { get; set; } public Department Department { get; set; } + public string Level { get; set; } public decimal MinSalary { get; set; } public decimal MaxSalary { get; set; } @@ -21,5 +22,10 @@ public class JobPosition : FullAuditedEntity, IMultiTenant public string Responsibilities { get; set; } public string Qualifications { get; set; } public bool IsActive { get; set; } + + public JobPosition(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Fault.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Fault.cs index 9b2991af..e3369ab7 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Fault.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Fault.cs @@ -8,8 +8,7 @@ public class Fault : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } - public string Title { get; set; } + public string Name { get; set; } public string Description { get; set; } public string? WorkcenterId { get; set; } public Workcenter? Workcenter { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workcenter.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workcenter.cs index 67d028ad..c57949b2 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workcenter.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workcenter.cs @@ -11,7 +11,6 @@ public class Workcenter : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } // İş Merkezi / Ekipman Bilgileri - public string Code { get; set; } public string Name { get; set; } public string? Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Operation.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Operation.cs index d4113f20..2df661ba 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Operation.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Operation.cs @@ -9,7 +9,6 @@ public class Operation : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/OperationType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/OperationType.cs index fc8f6ff5..a10dca85 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/OperationType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/OperationType.cs @@ -9,7 +9,6 @@ public class OperationType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs index 0c49a76f..10c94f0f 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs @@ -18,7 +18,6 @@ public class Location : FullAuditedEntity, IMultiTenant public string? LocationTypeId { get; set; } public LocationType? LocationType { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs index 145c804c..3ee26e38 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs @@ -9,7 +9,6 @@ public class LocationType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs index 6e4bdbbf..d4360d77 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs @@ -9,7 +9,6 @@ public class Putaway : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public int Priority { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs index 4d5b8c24..e98b7a7b 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs @@ -9,7 +9,6 @@ public class Warehouse : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs index 37fb04a3..90ee3915 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs @@ -9,7 +9,6 @@ public class WarehouseType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs index deacbcd5..81dfd8b7 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs @@ -15,7 +15,6 @@ public class Zone : FullAuditedEntity, IMultiTenant public string? ZoneTypeId { get; set; } public ZoneType? ZoneType { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs index 2182af00..59deb3fa 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs @@ -9,7 +9,6 @@ public class ZoneType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialGroup.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialGroup.cs index 3bdf1883..071532c9 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialGroup.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialGroup.cs @@ -9,7 +9,6 @@ public class MaterialGroup : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public Guid? ParentGroupId { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialType.cs index 29a5e611..b29b24cc 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialType.cs @@ -9,7 +9,6 @@ public class MaterialType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } diff --git a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 6c1aaa78..efaaf862 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -949,13 +949,12 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Id).HasMaxLength(8); - b.Property(x => x.Code).IsRequired().HasMaxLength(8); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.GroupName).HasMaxLength(128); b.Property(x => x.TaxLabel).HasMaxLength(64); b.Property(x => x.Currency).IsRequired().HasMaxLength(8); - b.HasIndex(x => x.Code).IsUnique(); + b.HasIndex(x => x.Name).IsUnique(); b.HasIndex(x => x.GroupName); b.HasOne() @@ -972,10 +971,9 @@ public class PlatformDbContext : b.Property(x => x.Country).HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.Code).IsRequired().HasMaxLength(16); b.Property(x => x.PlateCode).HasMaxLength(20); - b.HasIndex(x => new { x.Country, x.Code }).IsUnique(); + b.HasIndex(x => new { x.Country, x.Name }).IsUnique(); }); builder.Entity(b => @@ -1805,7 +1803,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Address1).HasMaxLength(256); b.Property(x => x.Address2).HasMaxLength(256); @@ -1841,7 +1838,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Cash)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.Currency).IsRequired().HasMaxLength(8); @@ -1854,7 +1850,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CurrentAccount)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(p => p.Code).IsRequired().HasMaxLength(64); b.Property(p => p.Name).IsRequired().HasMaxLength(128); b.Property(p => p.Description).HasMaxLength(512); b.Property(p => p.TaxOffice).HasMaxLength(128); @@ -1878,7 +1873,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.JobPosition)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(150); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.Level).HasMaxLength(64); @@ -1901,7 +1895,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Badge)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(150); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.Icon).HasMaxLength(10); @@ -1918,7 +1911,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Department)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(20); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.Budget).HasDefaultValue(0); @@ -1946,7 +1938,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CostCenter)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(256); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.FiscalYear).HasMaxLength(10); @@ -2455,7 +2446,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2466,7 +2456,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialGroup)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2792,7 +2781,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.LossReason)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(256); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.Category).HasMaxLength(64).IsRequired(); @@ -2933,8 +2921,7 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Id).HasMaxLength(128); - b.Property(x => x.Code).IsRequired().HasMaxLength(128); - b.Property(x => x.Name).IsRequired().HasMaxLength(256); + b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.WorkcenterTypeId).IsRequired().HasMaxLength(64); b.Property(x => x.Manufacturer).HasMaxLength(256); @@ -3044,13 +3031,12 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Fault)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(128); + b.Property(x => x.Name).HasMaxLength(128); b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(128); b.Property(x => x.Location).HasMaxLength(256); b.Property(x => x.FaultTypeId).IsRequired().HasMaxLength(64); b.Property(x => x.Priority).HasMaxLength(64); b.Property(x => x.Severity).HasMaxLength(64); - b.Property(x => x.Title).HasMaxLength(256); b.Property(x => x.Description).HasMaxLength(1024); b.Property(x => x.AssignedTo).HasMaxLength(128); b.Property(x => x.Status).IsRequired().HasMaxLength(20); @@ -3114,7 +3100,6 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Id).HasMaxLength(64); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(64); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3126,7 +3111,6 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Id).HasMaxLength(64); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(256); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.EmployeeId).IsRequired(); @@ -3161,7 +3145,6 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Id).HasMaxLength(64); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(64); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3172,10 +3155,9 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Zone)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.WarehouseId).IsRequired().HasMaxLength(64); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Id).HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(64); + b.Property(x => x.WarehouseId).IsRequired().HasMaxLength(64); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.ZoneTypeId).IsRequired().HasMaxLength(64); b.Property(x => x.Temperature).HasPrecision(18, 2).HasDefaultValue(0); @@ -3198,7 +3180,6 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.LocationType)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Id).HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(64); b.Property(x => x.Description).HasMaxLength(512); @@ -3210,10 +3191,9 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Location)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(64); b.Property(x => x.WarehouseId).IsRequired().HasMaxLength(64); b.Property(x => x.ZoneId).IsRequired().HasMaxLength(64); - b.Property(x => x.Code).IsRequired().HasMaxLength(64); - b.Property(x => x.Id).HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(64); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.LocationTypeId).IsRequired().HasMaxLength(64); @@ -3247,8 +3227,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Putaway)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(128); - b.Property(x => x.Name).IsRequired().HasMaxLength(256); + b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.WarehouseId).IsRequired().HasMaxLength(64); b.Property(x => x.Priority).IsRequired().HasDefaultValue(1); @@ -3289,8 +3268,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.OperationType)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(128); - b.Property(x => x.Name).IsRequired().HasMaxLength(256); + b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.CategoryId).IsRequired(); b.Property(x => x.DefaultDuration).HasDefaultValue(0); @@ -3310,8 +3288,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Operation)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(128); - b.Property(x => x.Name).IsRequired().HasMaxLength(256); + b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.OperationTypeId).IsRequired(); b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(128); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212092917_Initial.Designer.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212092917_Initial.Designer.cs index a8ff63df..c1939dfa 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212092917_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251211210045_Initial")] + [Migration("20251212092917_Initial")] partial class Initial { /// @@ -1063,11 +1063,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Color") .HasMaxLength(10) .HasColumnType("nvarchar(10)"); @@ -1160,10 +1155,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("Code") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Country") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); @@ -2028,11 +2019,6 @@ namespace Erp.Platform.Migrations b.Property("BranchId") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -2462,11 +2448,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); - b.Property("Country") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); @@ -2517,7 +2498,7 @@ namespace Erp.Platform.Migrations b.HasIndex("CountryId"); - b.HasIndex("Country", "Code") + b.HasIndex("Country", "Name") .IsUnique() .HasFilter("[Country] IS NOT NULL"); @@ -3311,11 +3292,6 @@ namespace Erp.Platform.Migrations .HasPrecision(18, 4) .HasColumnType("decimal(18,4)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CostCenterType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3403,11 +3379,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(8) .HasColumnType("nvarchar(8)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -3467,11 +3438,11 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); - b.HasIndex("GroupName"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("Sas_H_Country", (string)null); }); @@ -3736,11 +3707,6 @@ namespace Erp.Platform.Migrations b.Property("BranchId") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -4457,11 +4423,6 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,4)") .HasDefaultValue(0m); - b.Property("Code") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); - b.Property("CostCenterId") .HasColumnType("uniqueidentifier"); @@ -4960,8 +4921,8 @@ namespace Erp.Platform.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("JobPositionId") - .HasColumnType("uniqueidentifier"); + b.Property("JobPositionId") + .HasColumnType("nvarchar(450)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -5500,11 +5461,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -5560,6 +5516,10 @@ namespace Erp.Platform.Migrations .HasMaxLength(256) .HasColumnType("nvarchar(256)"); + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + b.Property("Priority") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -5581,10 +5541,6 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Title") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - b.Property("WorkcenterId") .IsRequired() .HasMaxLength(128) @@ -6394,13 +6350,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.JobPosition", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -7516,11 +7467,6 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7615,11 +7561,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7703,19 +7644,14 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.LossReason", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("Category") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7881,11 +7817,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8018,11 +7949,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8712,11 +8638,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8774,8 +8695,8 @@ namespace Erp.Platform.Migrations b.Property("Name") .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("OperationTypeId") .HasColumnType("uniqueidentifier"); @@ -8890,11 +8811,6 @@ namespace Erp.Platform.Migrations b.Property("CategoryId") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8941,8 +8857,8 @@ namespace Erp.Platform.Migrations b.Property("Name") .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("QualityCheckRequired") .ValueGeneratedOnAdd() @@ -9027,8 +8943,8 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LossReasonId") - .HasColumnType("uniqueidentifier"); + b.Property("LossReasonId") + .HasColumnType("nvarchar(450)"); b.Property("PartnerId") .HasColumnType("uniqueidentifier"); @@ -12009,11 +11925,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -12061,8 +11972,8 @@ namespace Erp.Platform.Migrations b.Property("Name") .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Priority") .ValueGeneratedOnAdd() @@ -16110,11 +16021,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Country") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); @@ -16216,11 +16122,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16791,11 +16692,6 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CostPerHour") .ValueGeneratedOnAdd() .HasPrecision(18, 2) @@ -16865,8 +16761,8 @@ namespace Erp.Platform.Migrations b.Property("Name") .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("SerialNumber") .HasMaxLength(128) @@ -17476,11 +17372,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17566,11 +17457,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212092917_Initial.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212092917_Initial.cs index f9fb8627..f4d88e3a 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212092917_Initial.cs @@ -441,7 +441,6 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), BranchId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Address1 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), Address2 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), @@ -471,7 +470,6 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), BranchId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), Currency = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), @@ -1306,9 +1304,8 @@ namespace Erp.Platform.Migrations name: "Crm_T_LossReason", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(450)", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), @@ -1354,7 +1351,6 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), Icon = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), @@ -2887,7 +2883,6 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), ParentGroupId = table.Column(type: "uniqueidentifier", nullable: true), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), @@ -2917,7 +2912,6 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), @@ -3195,7 +3189,6 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), @@ -3240,8 +3233,7 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), Priority = table.Column(type: "int", nullable: false, defaultValue: 1), Strategy = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), @@ -3293,7 +3285,6 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), @@ -3316,7 +3307,6 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), @@ -3889,8 +3879,7 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), CategoryId = table.Column(type: "uniqueidentifier", nullable: false), DefaultDuration = table.Column(type: "int", nullable: false, defaultValue: 0), @@ -4051,7 +4040,6 @@ namespace Erp.Platform.Migrations columns: table => new { Id = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - Code = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), GroupName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Currency = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), @@ -4689,7 +4677,6 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Code = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), PlateCode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), CountryId = table.Column(type: "nvarchar(8)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), @@ -5106,7 +5093,6 @@ namespace Erp.Platform.Migrations TenantId = table.Column(type: "uniqueidentifier", nullable: true), BranchId = table.Column(type: "uniqueidentifier", nullable: true), PartnerId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), TaxNumber = table.Column(type: "bigint", nullable: true), @@ -6089,7 +6075,7 @@ namespace Erp.Platform.Migrations EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), TeamCode = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: true), SourceId = table.Column(type: "uniqueidentifier", nullable: false), - LossReasonId = table.Column(type: "uniqueidentifier", nullable: true), + LossReasonId = table.Column(type: "nvarchar(450)", nullable: true), Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), @@ -6121,7 +6107,6 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), ParentCostCenterId = table.Column(type: "uniqueidentifier", nullable: true), @@ -6157,7 +6142,6 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), ParentDepartmentId = table.Column(type: "uniqueidentifier", nullable: true), @@ -6194,9 +6178,8 @@ namespace Erp.Platform.Migrations name: "Hr_T_JobPosition", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(450)", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), DepartmentId = table.Column(type: "uniqueidentifier", nullable: true), @@ -6272,8 +6255,7 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), WorkcenterTypeId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Manufacturer = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), @@ -6385,7 +6367,7 @@ namespace Erp.Platform.Migrations HireDate = table.Column(type: "datetime2", nullable: false), TerminationDate = table.Column(type: "datetime2", nullable: true), EmploymentTypeId = table.Column(type: "uniqueidentifier", nullable: true), - JobPositionId = table.Column(type: "uniqueidentifier", nullable: true), + JobPositionId = table.Column(type: "nvarchar(450)", nullable: true), DepartmentId = table.Column(type: "uniqueidentifier", nullable: true), WorkLocation = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), ManagerId = table.Column(type: "uniqueidentifier", nullable: true), @@ -6448,8 +6430,7 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), WorkcenterId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Location = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), @@ -6577,8 +6558,7 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), OperationTypeId = table.Column(type: "uniqueidentifier", nullable: false), WorkcenterId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), @@ -7072,7 +7052,6 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), @@ -7769,7 +7748,6 @@ namespace Erp.Platform.Migrations TenantId = table.Column(type: "uniqueidentifier", nullable: true), WarehouseId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), ZoneTypeId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), Temperature = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -8011,7 +7989,6 @@ namespace Erp.Platform.Migrations WarehouseId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), ZoneId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), LocationTypeId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), Capacity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -9720,9 +9697,9 @@ namespace Erp.Platform.Migrations column: "ProjectId"); migrationBuilder.CreateIndex( - name: "IX_Sas_H_City_Country_Code", + name: "IX_Sas_H_City_Country_Name", table: "Sas_H_City", - columns: new[] { "Country", "Code" }, + columns: new[] { "Country", "Name" }, unique: true, filter: "[Country] IS NOT NULL"); @@ -9731,17 +9708,17 @@ namespace Erp.Platform.Migrations table: "Sas_H_City", column: "CountryId"); - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Country_Code", - table: "Sas_H_Country", - column: "Code", - unique: true); - migrationBuilder.CreateIndex( name: "IX_Sas_H_Country_GroupName", table: "Sas_H_Country", column: "GroupName"); + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Country_Name", + table: "Sas_H_Country", + column: "Name", + unique: true); + migrationBuilder.CreateIndex( name: "IX_Sas_H_CountryGroup_Name", table: "Sas_H_CountryGroup", diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 1134cc45..60c3ff2e 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -1060,11 +1060,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Color") .HasMaxLength(10) .HasColumnType("nvarchar(10)"); @@ -1157,10 +1152,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("Code") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Country") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); @@ -2025,11 +2016,6 @@ namespace Erp.Platform.Migrations b.Property("BranchId") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -2459,11 +2445,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); - b.Property("Country") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); @@ -2514,7 +2495,7 @@ namespace Erp.Platform.Migrations b.HasIndex("CountryId"); - b.HasIndex("Country", "Code") + b.HasIndex("Country", "Name") .IsUnique() .HasFilter("[Country] IS NOT NULL"); @@ -3308,11 +3289,6 @@ namespace Erp.Platform.Migrations .HasPrecision(18, 4) .HasColumnType("decimal(18,4)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CostCenterType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3400,11 +3376,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(8) .HasColumnType("nvarchar(8)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -3464,11 +3435,11 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); - b.HasIndex("GroupName"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("Sas_H_Country", (string)null); }); @@ -3733,11 +3704,6 @@ namespace Erp.Platform.Migrations b.Property("BranchId") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -4454,11 +4420,6 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,4)") .HasDefaultValue(0m); - b.Property("Code") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); - b.Property("CostCenterId") .HasColumnType("uniqueidentifier"); @@ -4957,8 +4918,8 @@ namespace Erp.Platform.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("JobPositionId") - .HasColumnType("uniqueidentifier"); + b.Property("JobPositionId") + .HasColumnType("nvarchar(450)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -5497,11 +5458,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -5557,6 +5513,10 @@ namespace Erp.Platform.Migrations .HasMaxLength(256) .HasColumnType("nvarchar(256)"); + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + b.Property("Priority") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -5578,10 +5538,6 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Title") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - b.Property("WorkcenterId") .IsRequired() .HasMaxLength(128) @@ -6391,13 +6347,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.JobPosition", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -7513,11 +7464,6 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7612,11 +7558,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7700,19 +7641,14 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.LossReason", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("Category") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7878,11 +7814,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8015,11 +7946,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8709,11 +8635,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8771,8 +8692,8 @@ namespace Erp.Platform.Migrations b.Property("Name") .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("OperationTypeId") .HasColumnType("uniqueidentifier"); @@ -8887,11 +8808,6 @@ namespace Erp.Platform.Migrations b.Property("CategoryId") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8938,8 +8854,8 @@ namespace Erp.Platform.Migrations b.Property("Name") .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("QualityCheckRequired") .ValueGeneratedOnAdd() @@ -9024,8 +8940,8 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LossReasonId") - .HasColumnType("uniqueidentifier"); + b.Property("LossReasonId") + .HasColumnType("nvarchar(450)"); b.Property("PartnerId") .HasColumnType("uniqueidentifier"); @@ -12006,11 +11922,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -12058,8 +11969,8 @@ namespace Erp.Platform.Migrations b.Property("Name") .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Priority") .ValueGeneratedOnAdd() @@ -16107,11 +16018,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Country") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); @@ -16213,11 +16119,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16788,11 +16689,6 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("Code") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("CostPerHour") .ValueGeneratedOnAdd() .HasPrecision(18, 2) @@ -16862,8 +16758,8 @@ namespace Erp.Platform.Migrations b.Property("Name") .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("SerialNumber") .HasMaxLength(128) @@ -17473,11 +17369,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17563,11 +17454,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json index 44393aea..1b6514d6 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json @@ -2277,7 +2277,6 @@ ], "Badges": [ { - "code": "STAR_PERFORMER", "name": "Yıldız Performans", "description": "Üstün performans sergileyen çalışanlara verilen prestijli rozet", "icon": "⭐", @@ -2290,7 +2289,6 @@ "isActive": true }, { - "code": "TEAM_LEADER", "name": "Takım Lideri", "description": "Takım arkadaşlarına öncülük eden ve onları motive eden çalışanlar için", "icon": "👑", @@ -2303,7 +2301,6 @@ "isActive": true }, { - "code": "INNOVATOR", "name": "İnovatör", "description": "Yaratıcı çözümler üreten ve yenilikçi yaklaşımlar sergileyen çalışanlar", "icon": "💡", @@ -2316,7 +2313,6 @@ "isActive": true }, { - "code": "PERFECT_ATTENDANCE", "name": "Mükemmel Devam", "description": "Düzenli ve zamanında işe gelen, devamsızlık yapmayan çalışanlar", "icon": "❤️", @@ -2329,7 +2325,6 @@ "isActive": true }, { - "code": "CUSTOMER_CHAMPION", "name": "Müşteri Şampiyonu", "description": "Müşteri memnuniyetinde üstün başarı gösteren çalışanlar", "icon": "🏆", @@ -2364,67 +2359,61 @@ ], "Departments": [ { - "code": "ÜRT", "name": "Üretim", "description": "Üretim departmanı", - "parentDepartmentCode": null, + "parentDepartmentName": null, "subDepartments": [], "managerCode": "EMP-001", - "costCenterCode": "CC-ADM-001", + "costCenterName": "CC-ADM-001", "budget": 8500000, "isActive": true }, { - "code": "BAK", "name": "Bakım", "description": "Bakım departmanı", - "parentDepartmentCode": null, + "parentDepartmentName": null, "subDepartments": [], "managerCode": "EMP-002", - "costCenterCode": "CC-HR-001", + "costCenterName": "CC-HR-001", "budget": 2200000, "isActive": true }, { - "code": "KAL", "name": "Kalite Kontrol", "description": "Kalite kontrol departmanı", - "parentDepartmentCode": "ÜRT", + "parentDepartmentName": "Üretim", "subDepartments": [], "managerCode": "EMP-003", - "costCenterCode": "CC-FIN-001", + "costCenterName": "CC-FIN-001", "budget": 1200000, "isActive": true }, { - "code": "DEP", "name": "Depo", "description": "Depo departmanı", - "parentDepartmentCode": "ÜRT", + "parentDepartmentName": "Üretim", "subDepartments": [], "managerCode": "EMP-004", - "costCenterCode": "CC-FIN-001", + "costCenterName": "CC-FIN-001", "budget": 2800000, "isActive": true }, { - "code": "IDR", "name": "İdari İşler", "description": "İdari işler departmanı", - "parentDepartmentCode": null, + "parentDepartmentName": null, "subDepartments": [], "managerCode": "EMP-005", - "costCenterCode": "CC-HR-001", + "costCenterName": "CC-HR-001", "budget": 2500000, "isActive": true } ], "JobPositions": [ { - "code": "DEV-001", "name": "Software Developer", "description": "Responsible for developing and maintaining web applications", - "departmentCode": "ÜRT", + "departmentName": "Üretim", "level": "Mid", "minSalary": 80000, "maxSalary": 120000, @@ -2444,10 +2433,9 @@ "isActive": true }, { - "code": "MGR-001", "name": "Project Manager", "description": "Lead and manage software development projects", - "departmentCode": "BAK", + "departmentName": "Bakım", "level": "Manager", "minSalary": 100000, "maxSalary": 150000, @@ -2472,10 +2460,9 @@ "isActive": true }, { - "code": "QA-001", "name": "Quality Assurance Engineer", "description": "Ensure software quality through testing and automation", - "departmentCode": "KAL", + "departmentName": "Kalite Kontrol", "level": "Mid", "minSalary": 70000, "maxSalary": 100000, @@ -2500,10 +2487,9 @@ "isActive": true }, { - "code": "UX-001", "name": "UX/UI Designer", "description": "Design user interfaces and improve user experience", - "departmentCode": "DEP", + "departmentName": "Depo", "level": "Mid", "minSalary": 75000, "maxSalary": 110000, @@ -2528,10 +2514,9 @@ "isActive": true }, { - "code": "DA-001", "name": "Data Analyst", "description": "Analyze business data and provide insights", - "departmentCode": "IDR", + "departmentName": "İdari İşler", "level": "Mid", "minSalary": 85000, "maxSalary": 125000, @@ -2557,10 +2542,9 @@ "isActive": true }, { - "code": "HR-001", "name": "HR Specialist", "description": "Support human resources operations and employee relations", - "departmentCode": "IDR", + "departmentName": "İdari İşler", "level": "Mid", "minSalary": 60000, "maxSalary": 85000, @@ -2585,10 +2569,9 @@ "isActive": true }, { - "code": "SA-001", "name": "Sales Associate", "description": "Generate sales leads and maintain customer relationships", - "departmentCode": "BAK", + "departmentName": "Bakım", "level": "Junior", "minSalary": 45000, "maxSalary": 70000, @@ -2613,10 +2596,9 @@ "isActive": true }, { - "code": "ACC-001", "name": "Accountant", "description": "Manage financial records and ensure compliance", - "departmentCode": "ÜRT", + "departmentName": "Üretim", "level": "Mid", "minSalary": 55000, "maxSalary": 80000, @@ -2642,10 +2624,9 @@ "employees": [] }, { - "code": "CS-001", "name": "Customer Support Representative", "description": "Provide excellent customer service and technical support", - "departmentCode": "ÜRT", + "departmentName": "Üretim", "level": "Entry", "minSalary": 35000, "maxSalary": 50000, @@ -2670,10 +2651,9 @@ "isActive": true }, { - "code": "IT-001", "name": "IT Support Specialist", "description": "Provide technical support and maintain IT infrastructure", - "departmentCode": "BAK", + "departmentName": "Bakım", "level": "Junior", "minSalary": 50000, "maxSalary": 75000, @@ -2700,13 +2680,12 @@ ], "CostCenters": [ { - "code": "CC-ADM-001", "name": "Genel Yönetim", "description": "Şirket genel yönetim masrafları", "costCenterType": "Administrative", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-001", - "departmentCode": "HR", + "departmentName": "İdari İşler", "budgetedAmount": 2500000, "actualAmount": 2350000, "currency": "TRY", @@ -2714,13 +2693,12 @@ "isActive": true }, { - "code": "CC-HR-001", "name": "İnsan Kaynakları", "description": "İnsan kaynakları departmanı masrafları", "costCenterType": "Support", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-001", - "departmentCode": "HR", + "departmentName": "İdari İşler", "budgetedAmount": 1800000, "actualAmount": 1650000, "currency": "TRY", @@ -2728,13 +2706,12 @@ "isActive": true }, { - "code": "CC-FIN-001", "name": "Finans ve Muhasebe", "description": "Mali işler ve muhasebe masrafları", "costCenterType": "Support", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-002", - "departmentCode": "HR", + "departmentName": "İdari İşler", "budgetedAmount": 1500000, "actualAmount": 1420000, "currency": "TRY", @@ -2742,13 +2719,12 @@ "isActive": true }, { - "code": "CC-IT-001", "name": "Bilgi İşlem", "description": "IT altyapı ve yazılım masrafları", "costCenterType": "Support", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-002", - "departmentCode": "HR", + "departmentName": "İdari İşler", "budgetedAmount": 3200000, "actualAmount": 3100000, "currency": "TRY", @@ -2756,13 +2732,12 @@ "isActive": true }, { - "code": "CC-PROD-001", "name": "Üretim Departmanı", "description": "Üretim faaliyetleri masrafları", "costCenterType": "Production", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-003", - "departmentCode": "HR", + "departmentName": "İdari İşler", "budgetedAmount": 8500000, "actualAmount": 8200000, "currency": "TRY", @@ -2770,13 +2745,12 @@ "isActive": true }, { - "code": "CC-SAL-001", "name": "Satış ve Pazarlama", "description": "Satış ve pazarlama faaliyetleri", "costCenterType": "Revenue", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-002", - "departmentCode": "DEP", + "departmentName": "Depo", "budgetedAmount": 4200000, "actualAmount": 4050000, "currency": "TRY", @@ -2784,13 +2758,12 @@ "isActive": true }, { - "code": "CC-QUA-001", "name": "Kalite Kontrol", "description": "Kalite kontrol ve güvence masrafları", "costCenterType": "Support", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-003", - "departmentCode": "HR", + "departmentName": "İdari İşler", "budgetedAmount": 1200000, "actualAmount": 1150000, "currency": "TRY", @@ -2798,13 +2771,12 @@ "isActive": true }, { - "code": "CC-LOG-001", "name": "Lojistik ve Depo", "description": "Lojistik operasyonları ve depo masrafları", "costCenterType": "Support", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-003", - "departmentCode": "BAK", + "departmentName": "Bakım", "budgetedAmount": 2800000, "actualAmount": 2650000, "currency": "TRY", @@ -2812,13 +2784,12 @@ "isActive": true }, { - "code": "CC-RND-001", "name": "Ar-Ge Departmanı", "description": "Araştırma ve geliştirme masrafları", "costCenterType": "Investment", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-001", - "departmentCode": "KAL", + "departmentName": "Kalite Kontrol", "budgetedAmount": 3500000, "actualAmount": 3300000, "currency": "TRY", @@ -2826,13 +2797,12 @@ "isActive": true }, { - "code": "CC-PUR-001", "name": "Satın Alma", "description": "Satın alma ve tedarik masrafları", "costCenterType": "Support", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-001", - "departmentCode": "HR", + "departmentName": "İdari İşler", "budgetedAmount": 1600000, "actualAmount": 1520000, "currency": "TRY", @@ -2840,13 +2810,12 @@ "isActive": true }, { - "code": "CC-MAI-001", "name": "Bakım ve Onarım", "description": "Bakım ve onarım masrafları", "costCenterType": "Service", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-002", - "departmentCode": "KAL", + "departmentName": "Kalite Kontrol", "budgetedAmount": 2200000, "actualAmount": 2100000, "currency": "TRY", @@ -2854,13 +2823,12 @@ "isActive": true }, { - "code": "CC-CUS-001", "name": "Müşteri Hizmetleri", "description": "Müşteri hizmetleri masrafları", "costCenterType": "Service", - "parentCostCenterCode": null, + "parentCostCenterName": null, "responsibleEmployeeCode": "EMP-003", - "departmentCode": "IDR", + "departmentName": "İdari İşler", "budgetedAmount": 1000000, "actualAmount": 950000, "currency": "TRY", @@ -2893,15 +2861,15 @@ "hireDate": "09-01-2020", "terminationDate": null, "employmentTypeName": "Full Time", - "jobPositionCode": "MGR-001", - "departmentCode": "BAK", + "JobPositionName": "Software Developer", + "departmentName": "Bakım", "workLocation": "Ankara Merkez", "baseSalary": 65000, "managerCode": null, "currency": "TRY", "payrollGroup": "Monthly", "ibanNumber": "TR330006200001123456789012", - "badgeCode": "B001", + "badgeName": "B001", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -2933,15 +2901,15 @@ "hireDate": "01-06-2021", "terminationDate": null, "employmentTypeName": "Full Time", - "jobPositionCode": "HR-001", - "departmentCode": "IDR", + "JobPositionName": "Quality Assurance Engineer", + "departmentName": "İdari İşler", "workLocation": "Ankara Şube", "baseSalary": 72000, "managerCode": "EMP-001", "currency": "TRY", "payrollGroup": "Monthly", "ibanNumber": "TR330006200001123456781112", - "badgeCode": "B002", + "badgeName": "B002", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -2973,15 +2941,15 @@ "hireDate": "10-02-2020", "terminationDate": null, "employmentTypeName": "Full Time", - "jobPositionCode": "DEV-001", - "departmentCode": "ÜRT", + "JobPositionName": "UX/UI Designer", + "departmentName": "Üretim", "workLocation": "İstanbul HQ", "baseSalary": 85000, "managerCode": "EMP-001", "currency": "TRY", "payrollGroup": "Monthly", "ibanNumber": "TR322006200001123456781112", - "badgeCode": "B003", + "badgeName": "B003", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -3013,15 +2981,15 @@ "hireDate": "10-01-2022", "terminationDate": null, "employmentTypeName": "Part Time", - "jobPositionCode": "UX-001", - "departmentCode": "DEP", + "JobPositionName": "Data Analyst", + "departmentName": "Depo", "workLocation": "Ankara Şube", "baseSalary": 60000, "managerCode": "EMP-003", "currency": "TRY", "payrollGroup": "Monthly", "ibanNumber": "TR110006200001123456781112", - "badgeCode": "B004", + "badgeName": "B004", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -3053,15 +3021,15 @@ "hireDate": "01-04-2019", "terminationDate": null, "employmentTypeName": "Full Time", - "jobPositionCode": "DA-001", - "departmentCode": "IDR", + "JobPositionName": "HR Specialist", + "departmentName": "İdari İşler", "workLocation": "İstanbul HQ", "baseSalary": 95000, "managerCode": "EMP-001", "currency": "TRY", "payrollGroup": "Monthly", "ibanNumber": "TR440006200001123456782222", - "badgeCode": "B005", + "badgeName": "B005", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -3093,15 +3061,15 @@ "hireDate": "02-03-2023", "terminationDate": null, "employmentTypeName": "Intern", - "jobPositionCode": "CS-001", - "departmentCode": "ÜRT", + "JobPositionName": "Sales Associate", + "departmentName": "Üretim", "workLocation": "İzmir Ofis", "baseSalary": 15000, "managerCode": "EMP-003", "currency": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "1", - "badgeCode": "B006", + "badgeName": "B006", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -3133,15 +3101,15 @@ "hireDate": "09-07-2021", "terminationDate": null, "employmentTypeName": "Full Time", - "jobPositionCode": "IT-001", - "departmentCode": "BAK", + "JobPositionName": "Accountant", + "departmentName": "Bakım", "workLocation": "Bursa Depo", "baseSalary": 75000, "managerCode": "EMP-001", "currency": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "3", - "badgeCode": "B007", + "badgeName": "B007", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -3173,15 +3141,15 @@ "hireDate": "01-09-2018", "terminationDate": null, "employmentTypeName": "Full Time", - "jobPositionCode": "SA-001", - "departmentCode": "BAK", + "JobPositionName": "Customer Support Representative", + "departmentName": "Bakım", "workLocation": "İzmir Bölge Ofisi", "baseSalary": 130000, "managerCode": "EMP-001", "currency": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "2", - "badgeCode": "B008", + "badgeName": "B008", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -3213,15 +3181,15 @@ "hireDate": "02-06-2020", "terminationDate": null, "employmentTypeName": "Full Time", - "jobPositionCode": "CS-001", - "departmentCode": "ÜRT", + "JobPositionName": "IT Support Specialist", + "departmentName": "Üretim", "workLocation": "Ankara Çağrı Merkezi", "baseSalary": 50000, "managerCode": "EMP-003", "currency": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "1", - "badgeCode": "B009", + "badgeName": "B009", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -3253,15 +3221,15 @@ "hireDate": "06-05-2017", "terminationDate": null, "employmentTypeName": "Full Time", - "jobPositionCode": "ACC-001", - "departmentCode": "ÜRT", + "JobPositionName": "IT Support Specialist", + "departmentName": "Üretim", "workLocation": "İstanbul Genel Merkez", "baseSalary": 250000, "managerCode": "EMP-001", "currency": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "4", - "badgeCode": "B010", + "badgeName": "B010", "employeeStatus": "Aktif", "isActive": true, "leaves": [], @@ -3515,7 +3483,7 @@ "startDate": "01-11-2024", "endDate": "15-12-2024", "status": "Aktif", - "departmentCode": "ÜRT", + "departmentName": "Üretim", "targetEmployees": "EMP-001|EMP-002|EMP-003|EMP-004|EMP-005" }, { @@ -3525,7 +3493,7 @@ "startDate": "01-01-2025", "endDate": "08-02-2025", "status": "Aktif", - "departmentCode": "ÜRT", + "departmentName": "Üretim", "targetEmployees": "EMP-007|EMP-008|EMP-009" }, { @@ -3535,7 +3503,7 @@ "startDate": "01-10-2023", "endDate": "10-11-2023", "status": "Aktif", - "departmentCode": "ÜRT", + "departmentName": "Üretim", "targetEmployees": "EMP-005|EMP-006" }, { @@ -3545,7 +3513,7 @@ "startDate": "01-10-2022", "endDate": "08-11-2024", "status": "İptal", - "departmentCode": "BAK", + "departmentName": "Bakım", "targetEmployees": "EMP-005|EMP-006" }, { @@ -3555,7 +3523,7 @@ "startDate": "01-10-2021", "endDate": "10-11-2021", "status": "Taslak", - "departmentCode": "KAL", + "departmentName": "Kalite Kontrol", "targetEmployees": "EMP-005|EMP-006" }, { @@ -3565,7 +3533,7 @@ "startDate": "01-10-2020", "endDate": "05-11-2020", "status": "Tamamlandı", - "departmentCode": "KAL", + "departmentName": "Kalite Kontrol", "targetEmployees": "EMP-005|EMP-006" } ], @@ -4207,37 +4175,31 @@ ], "MaterialTypes": [ { - "code": "RAW", "name": "Hammadde", "description": "Üretimde kullanılan temel malzemeler", "isActive": true }, { - "code": "SEMI", "name": "Yarı Mamul", "description": "Kısmen işlenmiş ürünler", "isActive": true }, { - "code": "FINISHED", "name": "Mamul", "description": "Satışa hazır nihai ürünler", "isActive": true }, { - "code": "CONSUMABLE", "name": "Sarf Malzemesi", "description": "Tüketilen yardımcı malzemeler", "isActive": true }, { - "code": "SERVICE", "name": "Hizmet", "description": "Hizmet türü kalemler", "isActive": true }, { - "code": "SPARE", "name": "Yedek Parça", "description": "Bakım ve onarım parçaları", "isActive": true @@ -4245,38 +4207,32 @@ ], "MaterialGroups": [ { - "code": "METAL", "name": "Metal Malzemeler", "description": "Çelik, alüminyum gibi metal ürün grupları.", "isActive": true }, { - "code": "MOTOR", "name": "Elektrik Motorları", "description": "AC, DC ve servo motor grupları.", "isActive": true }, { - "code": "PLASTIK", "name": "Plastik Malzemeler", "isActive": true }, { - "code": "KIMYA", "name": "Kimyasal Maddeler", "description": "Yağlar, solventler ve diğer kimyasallar.", "isActive": true }, { - "code": "MAMUL", "name": "Mamuller", - "parentGroupCode": "METAL", + "parentGroupName": "METAL", "isActive": true }, { - "code": "YARI-MAMUL", "name": "Yarı Mamuller", - "parentGroupCode": "MAMUL", + "parentGroupName": "MAMUL", "isActive": true } ], @@ -4286,8 +4242,8 @@ "name": "Yüksek Kaliteli Çelik Levha 10mm", "barcode": "1234567890123", "description": "Çelik Levha 2mm", - "materialTypeCode": "RAW", - "materialGroupCode": "METAL", + "MaterialTypeName": "RAW", + "MaterialGroupName": "METAL", "uomId": "Adet", "costPrice": 15.5, "salesPrice": 18.75, @@ -4301,8 +4257,8 @@ "name": "Alüminyum Profil 40x40", "barcode": "1234567890124", "description": "Alüminyum Profil 40x40", - "materialTypeCode": "SEMI", - "materialGroupCode": "METAL", + "MaterialTypeName": "SEMI", + "MaterialGroupName": "METAL", "uomId": "kg", "costPrice": 45.0, "salesPrice": 55.0, @@ -4316,8 +4272,8 @@ "name": "Montajlı Motor Grubu A-Type", "barcode": "1234567890125", "description": "Motor Grubu A-Type", - "materialTypeCode": "FINISHED", - "materialGroupCode": "MOTOR", + "MaterialTypeName": "FINISHED", + "MaterialGroupName": "MOTOR", "uomId": "Adet", "costPrice": 850.0, "salesPrice": 1200.0, @@ -4331,8 +4287,8 @@ "name": "Kesme Yağı Premium", "barcode": "1234567890126", "description": "Kesme Yağı Premium", - "materialTypeCode": "FINISHED", - "materialGroupCode": "PLASTIK", + "MaterialTypeName": "FINISHED", + "MaterialGroupName": "PLASTIK", "uomId": "Adet", "costPrice": 25.0, "salesPrice": 35.0, @@ -4346,8 +4302,8 @@ "name": "Plastik Kapak Komponenti", "barcode": "1234567890127", "description": "Plastik Kapak", - "materialTypeCode": "SEMI", - "materialGroupCode": "KIMYA", + "MaterialTypeName": "SEMI", + "MaterialGroupName": "KIMYA", "uomId": "Adet", "costPrice": 8.5, "salesPrice": 15.0, @@ -4428,25 +4384,21 @@ ], "SupplyCardTypes": [ { - "code": "STANDARD", "name": "Standart", "description": "Standart tedarikçi kartı", "isActive": true }, { - "code": "PREMIUM", "name": "Premium", "description": "Premium tedarikçi kartı", "isActive": true }, { - "code": "STRATEGIC", "name": "Stratejik", "description": "Stratejik tedarikçi kartı", "isActive": true }, { - "code": "PREFERRED", "name": "Tercih Edilen", "description": "Tercih edilen tedarikçi kartı", "isActive": true @@ -4454,25 +4406,21 @@ ], "CustomerTypes": [ { - "code": "Individual", "name": "Bireysel", "description": "Bireysel müşteriler", "isActive": true }, { - "code": "Company", "name": "Şirket", "description": "Kurumsal müşteriler", "isActive": true }, { - "code": "Government", "name": "Devlet", "description": "Kamu kurumları ve devlet daireleri", "isActive": true }, { - "code": "NonProfit", "name": "Kar Amacı Gütmeyen", "description": "STK ve kar amacı gütmeyen kuruluşlar", "isActive": true @@ -4480,25 +4428,21 @@ ], "CustomerSegments": [ { - "code": "SMB", "name": "KOBİ", "description": "Küçük ve Orta Büyüklükteki İşletmeler", "isActive": true }, { - "code": "Enterprise", "name": "Kurumsal", "description": "Büyük ölçekli işletmeler ve kurumlar", "isActive": true }, { - "code": "Startup", "name": "Yeni Kuruluş", "description": "Yeni kurulan işletmeler", "isActive": true }, { - "code": "Government", "name": "Devlet", "description": "Kamu kurumları ve devlet daireleri", "isActive": true @@ -4736,42 +4680,36 @@ ], "LossReasons": [ { - "code": "LR001", "name": "Fiyat Rekabetsizliği", "description": "Müşteri daha uygun fiyatlı alternatif buldu", "category": "Price", "isActive": true }, { - "code": "LR002", "name": "Ürün Özellik Eksikliği", "description": "Ürünümüzde müşterinin istediği özellik bulunmuyor", "category": "Product", "isActive": true }, { - "code": "LR003", "name": "Destek Kalitesi", "description": "Müşteri destek kalitemizden memnun değil", "category": "Service", "isActive": true }, { - "code": "LR004", "name": "Rakip Avantajı", "description": "Rakip daha iyi şartlar sundu", "category": "Competitor", "isActive": true }, { - "code": "LR005", "name": "Yanlış Zamanlama", "description": "Müşteri zamanlaması uygun değil", "category": "Timing", "isActive": false }, { - "code": "LR006", "name": "Bütçe Kısıtlaması", "description": "Müşteri bütçesi yetersiz", "category": "Budget", @@ -4814,15 +4752,15 @@ "Approvals": [ { "name": "Üretim Malzeme Onayı", - "departmentCode": "ÜRT", - "materialTypeCode": "RAW", + "departmentName": "Üretim", + "MaterialTypeName": "Hammadde", "amountThreshold": "5000", "isActive": true }, { "name": "Kalite Kontrol Malzeme Onayı", - "departmentCode": "KAL", - "materialTypeCode": "CONSUMABLE", + "departmentName": "Kalite Kontrol", + "MaterialTypeName": "Yarı Mamul", "amountThreshold": "100000", "isActive": true } @@ -4873,7 +4811,6 @@ ], "Workcenters": [ { - "code": "CNC-001", "name": "CNC Torna Tezgahı", "description": "Yüksek hassasiyetli CNC torna tezgahı", "workcenterTypeName": "CNC Makineleri", @@ -4883,7 +4820,7 @@ "installationDate": "2022-03-15T00:00:00", "warrantyExpiry": "2025-03-15T00:00:00", "location": "Atölye A - Hat 1", - "departmentCode": "ÜRT", + "departmentName": "Üretim", "status": "Operational", "criticality": "High", "capacity": 8, @@ -4892,7 +4829,6 @@ "isActive": true }, { - "code": "COMP-001", "name": "Hava Kompresörü", "description": "Endüstriyel hava kompresörü sistemi", "workcenterTypeName": "Kompresörler", @@ -4902,7 +4838,7 @@ "installationDate": "2021-08-20T00:00:00", "warrantyExpiry": "2024-08-20T00:00:00", "location": "Kompresör Odası", - "departmentCode": "BAK", + "departmentName": "Bakım", "status": "Under Maintenance", "criticality": "Critical", "capacity": 8, @@ -4911,7 +4847,6 @@ "isActive": true }, { - "code": "CONV-001", "name": "Konveyör Sistemi", "description": "Ana hat konveyör sistemi", "workcenterTypeName": "Konveyörler", @@ -4920,7 +4855,7 @@ "serialNumber": "SM112233445", "installationDate": "2020-11-10T00:00:00", "location": "Ana Üretim Hattı", - "departmentCode": "KAL", + "departmentName": "Kalite Kontrol", "status": "Out of Order", "criticality": "Medium", "capacity": 8, @@ -4929,72 +4864,9 @@ "isActive": true } ], - "MaintenancePlans": [ - { - "code": "PM-CNC-001", - "workCenterCode": "CNC-001", - "planType": "Düzeltici", - "priority": "Düşük", - "description": "CNC torna tezgahı için haftalık rutin bakım planı", - "frequency": 1, - "frequencyUnit": "Haftalık", - "estimatedDuration": 120, - "instructions": "Yağlama, temizlik ve genel kontrol yapılacaktır.", - "requiredSkillsJson": "Torna Operatörü|Mekanik", - "nextDue": "2024-02-12T00:00:00.000Z", - "isActive": true, - "lastExecuted": "2024-02-05T00:00:00.000Z" - }, - { - "code": "PM-COMP-001", - "workCenterCode": "COMP-001", - "planType": "Tahminsel", - "priority": "Acil", - "description": "Hava kompresörü aylık bakım ve kontrol planı", - "frequency": 1, - "frequencyUnit": "Aylık", - "estimatedDuration": 240, - "instructions": "Filtre değişimi, yağ seviyesi kontrolü ve basınç testi yapılacaktır.", - "requiredSkillsJson": "Kompresör Teknisyeni|Elektrikçi", - "nextDue": "2024-02-15T00:00:00.000Z", - "isActive": true, - "lastExecuted": "2024-01-15T00:00:00.000Z" - }, - { - "code": "CM-CONV-001", - "workCenterCode": "CONV-001", - "planType": "Düzeltici", - "description": "Konveyör sistemi arıza durumunda müdahale planı", - "frequency": 10, - "frequencyUnit": "Günlük", - "estimatedDuration": 180, - "priority": "Yüksek", - "requiredSkillsJson": "Mekanik|Elektrikçi|PLC Teknisyeni", - "instructions": "Acil durum müdahale prosedürleri uygulanacaktır.", - "nextDue": "2024-02-10T00:00:00.000Z", - "isActive": false, - "lastExecuted": "2025-08-15T00:00:00.000Z" - }, - { - "code": "PM-WELD-001", - "workCenterCode": "CONV-001", - "planType": "Tahminsel", - "description": "Robot kaynak sistemi 6 aylık periyodik bakımı", - "frequency": 6, - "frequencyUnit": "Aylık", - "estimatedDuration": 480, - "priority": "Yüksek", - "requiredSkillsJson": "Robot Teknisyeni|Kaynak Uzmanı|Elektrikçi", - "instructions": "Robotik kaynak ekipmanlarının detaylı kontrolü ve kalibrasyonu yapılacaktır.", - "nextDue": "2024-02-15T00:00:00.000Z", - "isActive": true, - "lastExecuted": "2023-08-15T00:00:00.000Z" - } - ], "Faults": [ { - "code": "ARZ-2024-001", - "workCenterCode": "CNC-001", + "WorkCenterName": "CNC Torna Tezgahı", "location": "Atölye A - Hat 1", "faultTypeName": "Mekanik", "priority": "High", @@ -5008,8 +4880,7 @@ "isActive": true }, { - "code": "ARZ-2024-002", - "workCenterCode": "COMP-001", + "WorkCenterName": "Hava Kompresörü", "location": "Kompresör Odası", "faultTypeName": "Elektrik", "priority": "Urgent", @@ -5025,8 +4896,7 @@ "isActive": true }, { - "code": "ARZ-2024-003", - "workCenterCode": "CONV-001", + "WorkCenterName": "Konveyör Sistemi", "location": "Ana Üretim Hattı", "faultTypeName": "Performans", "priority": "Normal", @@ -5039,8 +4909,7 @@ "isActive": true }, { - "code": "ARZ-2024-004", - "workCenterCode": "CONV-001", + "workCenterName": "Konveyör Sistemi", "location": "Kaynak Atölyesi", "faultTypeName": "Yazılım", "priority": "High", @@ -5054,8 +4923,7 @@ "isActive": true }, { - "code": "ARZ-2024-005", - "workCenterCode": "CONV-001", + "workCenterName": "Konveyör Sistemi", "location": "Pres Atölyesi", "faultTypeName": "Hidrolik", "priority": "Low", @@ -5200,43 +5068,36 @@ ], "WarehouseTypes": [ { - "code": "RawMaterials", "name": "Hammaddeler", "description": "Üretim için kullanılan temel malzemelerin depolandığı alan", "isActive": true }, { - "code": "FinishedGoods", "name": "Mamuller", "description": "Bitmiş ürünlerin depolandığı alan", "isActive": true }, { - "code": "WorkInProgress", "name": "İşlenmekte olan ürünler", "description": "Üretim sürecinde olan ürünlerin depolandığı alan", "isActive": true }, { - "code": "SpareParts", "name": "Yedek Parçalar", "description": "Makine ve ekipman yedek parçalarının depolandığı alan", "isActive": true }, { - "code": "Returns", "name": "İadeler", "description": "Müşterilerden geri gelen ürünlerin depolandığı alan", "isActive": true }, { - "code": "Quarantine", "name": "Karantina", "description": "Kalite kontrolü bekleyen ürünlerin depolandığı alan", "isActive": true }, { - "code": "Transit", "name": "Geçici Depo", "description": "Kısa süreli depolama için kullanılan alan", "isActive": true @@ -5244,31 +5105,26 @@ ], "ZoneTypes": [ { - "code": "Receiving", "name": "Alım Bölgesi", "description": "Malzemelerin teslim alındığı ve ilk kontrollerin yapıldığı alan", "isActive": true }, { - "code": "Storage", "name": "Depolama Bölgesi", "description": "Malzemelerin düzenli olarak saklandığı alan", "isActive": true }, { - "code": "Picking", "name": "Sevkiyat Bölgesi", "description": "Siparişlerin hazırlanıp sevk edildiği alan", "isActive": true }, { - "code": "QualityControl", "name": "Kalite Kontrol Bölgesi", "description": "Malzemelerin kalite kontrolünden geçtiği alan", "isActive": true }, { - "code": "Packing", "name": "Paketleme Bölgesi", "description": "Ürünlerin paketlendiği ve sevkiyata hazırlandığı alan", "isActive": true @@ -5276,31 +5132,26 @@ ], "LocationTypes": [ { - "code": "Raf", "name": "Raf", "description": "Malzemelerin yerleştirildiği raf sistemleri", "isActive": true }, { - "code": "Kutu", "name": "Kutu", "description": "Malzemelerin saklandığı kutular", "isActive": true }, { - "code": "Zemin", "name": "Zemin", "description": "Büyük ve ağır malzemelerin yerleştirildiği zemin alanları", "isActive": true }, { - "code": "Palet", "name": "Palet", "description": "Paletlerin düzenli olarak saklandığı raf sistemleri", "isActive": true }, { - "code": "Tank", "name": "Tank", "description": "Sıvı malzemelerin depolandığı tanklar", "isActive": true @@ -5308,11 +5159,10 @@ ], "Warehouses": [ { - "code": "WH-001", "name": "Merkez Depo", "description": "Ana depo alanı", "employeeCode": "EMP-001", - "warehouseTypeCode": "RawMaterials", + "warehouseTypeName": "Hammaddeler", "country": "TR", "isMainWarehouse": true, "capacity": 10000, @@ -5321,11 +5171,10 @@ "security": "Low" }, { - "code": "WH-002", "name": "Yedek Parça Deposu", "description": "Yedek parçaların depolandığı alan", "employeeCode": "EMP-002", - "warehouseTypeCode": "FinishedGoods", + "warehouseTypeName": "Mamuller", "country": "TR", "isMainWarehouse": false, "capacity": 5000, @@ -5336,9 +5185,8 @@ ], "Zones": [ { - "warehouseCode": "WH-001", - "zoneTypeCode": "Receiving", - "code": "Z001", + "warehouseName": "Merkez Depo", + "zoneTypeName": "Kalite Kontrol Bölgesi", "name": "Giriş Bölgesi", "description": "Malzeme kabul bölgesi", "temperature": 20, @@ -5346,9 +5194,8 @@ "isActive": true }, { - "warehouseCode": "WH-001", - "zoneTypeCode": "Storage", - "code": "Z002", + "warehouseName": "Merkez Depo", + "zoneTypeName": "Sevkiyat Bölgesi", "name": "Ana Depolama", "description": "Ana depolama alanı", "temperature": 18, @@ -5356,9 +5203,8 @@ "isActive": true }, { - "warehouseCode": "WH-002", - "zoneTypeCode": "Picking", - "code": "Z003", + "warehouseName": "Yedek Parça Deposu", + "zoneTypeName": "Sevkiyat Bölgesi", "name": "Sevkiyat Hazırlık", "description": "Sevkiyat hazırlık alanı", "temperature": 22, @@ -5368,10 +5214,9 @@ ], "Locations": [ { - "warehouseCode": "WH-001", - "zoneCode": "Z001", - "locationTypeCode": "Raf", - "code": "A01-01-01", + "warehouseName": "Merkez Depo", + "zoneName": "Giriş Bölgesi", + "locationTypeName": "Raf", "name": "A Blok 1. Koridor 1. Raf", "description": "Yüksek raf - Ağır malzemeler", "capacity": 100, @@ -5381,10 +5226,9 @@ "isActive": true }, { - "warehouseCode": "WH-001", - "zoneCode": "Z002", - "locationTypeCode": "Kutu", - "code": "A01-01-02", + "warehouseName": "Merkez Depo", + "zoneName": "Ana Depolama", + "locationTypeName": "Kutu", "name": "A Blok 1. Koridor 2. Raf", "description": "Orta raf - Orta ağırlık malzemeler", "capacity": 50, @@ -5394,10 +5238,9 @@ "isActive": true }, { - "warehouseCode": "WH-002", - "zoneCode": "Z003", - "locationTypeCode": "Zemin", - "code": "B02-02-01", + "warehouseName": "Yedek Parça Deposu", + "zoneName": "Sevkiyat Hazırlık", + "locationTypeName": "Zemin", "name": "B Blok 2. Koridor 1. Raf", "description": "Küçük parçalar rafı", "capacity": 200, @@ -5407,10 +5250,9 @@ "isActive": true }, { - "warehouseCode": "WH-002", - "zoneCode": "Z003", - "locationTypeCode": "Palet", - "code": "B02-02-01", + "warehouseName": "Yedek Parça Deposu", + "zoneName": "Sevkiyat Hazırlık", + "locationTypeName": "Palet", "name": "B Blok 2. Koridor 1. Raf", "description": "Küçük parçalar rafı", "capacity": 200, @@ -5420,10 +5262,9 @@ "isActive": true }, { - "warehouseCode": "WH-001", - "zoneCode": "Z001", - "locationTypeCode": "Raf", - "code": "C01-02-01", + "warehouseName": "Merkez Depo", + "zoneName": "Giriş Bölgesi", + "locationTypeName": "Raf", "name": "C Blok 2. Koridor 1. Raf", "description": "Büyük parçalar rafı", "capacity": 200, @@ -5435,41 +5276,38 @@ ], "Putaways": [ { - "code": "RULE001", "name": "Ağır Malzemeler", "description": "Ağır malzemeler için zemin seviye yerleştirme kuralı", "priority": 1, "strategy": "FIFO", "isActive": true, - "warehouseCode": "WH-001", - "materialTypeCode": "RAW", - "materialGroupCode": "MAMUL", - "targetZoneCode": "Z002", - "targetLocationCode": null + "warehouseName": "Merkez Depo", + "materialTypeName": "Hammadde", + "materialGroupName": "Metal Malzemeler", + "targetZoneName": "Sevkiyat Bölgesi", + "TargetLocationName": null }, { - "code": "RULE002", "name": "Hızlı Hareket Eden Malzemeler", "description": "A sınıfı malzemeler için kolay erişim bölgesi", - "warehouseCode": "WH-001", - "materialTypeCode": "SERVICE", - "materialGroupCode": "MOTOR", + "warehouseName": "Merkez Depo", + "materialTypeName": "Yarı Mamul", + "materialGroupName": "Elektrik Motorları", "priority": 2, - "targetZoneCode": "Z002", - "targetLocationCode": null, + "targetZoneName": "Sevkiyat Bölgesi", + "TargetLocationName": null, "strategy": "NEAREST_LOCATION", "isActive": true }, { - "code": "RULE003", "name": "FIFO Kuralı", "description": "Son kullanma tarihi olan malzemeler için FIFO", - "warehouseCode": "WH-001", - "materialTypeCode": "FINISHED", - "materialGroupCode": "METAL", + "warehouseName": "Merkez Depo", + "materialTypeName": "Mamul", + "materialGroupName": "Metal Malzemeler", "priority": 3, - "targetZoneCode": "Z002", - "targetLocationCode": null, + "targetZoneName": "Sevkiyat Bölgesi", + "TargetLocationName": null, "strategy": "FIFO", "isActive": true } @@ -5518,7 +5356,6 @@ ], "OperationTypes": [ { - "code": "CUT001", "name": "Kesme İşlemi", "description": "Malzeme kesme operasyonu", "categoryName": "Üretim", @@ -5529,7 +5366,6 @@ "isActive": true }, { - "code": "WELD001", "name": "Kaynak İşlemi", "description": "Metal kaynak operasyonu", "categoryName": "Muayene", @@ -5540,7 +5376,6 @@ "isActive": true }, { - "code": "ASSY001", "name": "Montaj İşlemi", "description": "Parça montaj operasyonu", "categoryName": "Montaj", @@ -5551,7 +5386,6 @@ "isActive": true }, { - "code": "QC001", "name": "Kalite Kontrolü", "description": "Ürün kalite kontrol işlemi", "categoryName": "Kalite", @@ -5562,7 +5396,6 @@ "isActive": true }, { - "code": "PACK001", "name": "Paketleme", "description": "Ürün paketleme işlemi", "categoryName": "Kurulum", @@ -5575,11 +5408,10 @@ ], "Operations": [ { - "code": "OP001", "name": "CNC Torna Tezgahı İşlemi", "description": "Metal parçaların CNC torna tezgahında işlenmesi", - "operationTypeCode": "ASSY001", - "workCenterCode": "CNC-001", + "operationTypeName": "Kesme İşlemi", + "workCenterName": "CNC Torna Tezgahı", "standardTime": 45, "setupTime": 30, "laborCost": 50, @@ -5590,11 +5422,10 @@ "qualityCheckRequired": true }, { - "code": "OP002", "name": "Kaynak İşlemi", "description": "Argon kaynak ile metal birleştirme", - "operationTypeCode": "WELD001", - "workCenterCode": "CNC-001", + "operationTypeName": "Kaynak İşlemi", + "workCenterName": "CNC Torna Tezgahı", "standardTime": 60, "setupTime": 15, "laborCost": 80, @@ -5605,11 +5436,10 @@ "qualityCheckRequired": true }, { - "code": "OP003", "name": "Kalite Kontrolü", "description": "Boyutsal ve görsel kalite kontrolü", - "operationTypeCode": "QC001", - "workCenterCode": "COMP-001", + "operationTypeName": "Kalite Kontrolü", + "workCenterName": "Hava Kompresörü", "standardTime": 20, "setupTime": 5, "laborCost": 60, @@ -5620,11 +5450,10 @@ "qualityCheckRequired": false }, { - "code": "OP004", "name": "Paketleme İşlemi", "description": "Ürünlerin paketlenmesi", - "operationTypeCode": "PACK001", - "workCenterCode": "CONV-001", + "operationTypeName": "Paketleme", + "workCenterName": "Konveyör Sistemi", "standardTime": 20, "setupTime": 5, "laborCost": 60, @@ -5692,7 +5521,7 @@ { "bomCode": "BOM-MOT-001", "materialCode": "MT001", - "operationCode": "OP001", + "OperationName": "CNC Torna Tezgahı İşlemi", "quantity": 2, "uomId": "Adet", "scrapPercentage": 0.05, @@ -5704,7 +5533,7 @@ { "bomCode": "BOM-MOT-001", "materialCode": "MT002", - "operationCode": "OP001", + "OperationName": "CNC Torna Tezgahı İşlemi", "quantity": 4, "uomId": "Adet", "scrapPercentage": 0.01, @@ -5716,7 +5545,7 @@ { "bomCode": "BOM-GEAR-001", "materialCode": "PR001", - "operationCode": "OP001", + "OperationName": "CNC Torna Tezgahı İşlemi", "quantity": 1, "uomId": "Adet", "scrapPercentage": 0.01, @@ -5728,7 +5557,7 @@ { "bomCode": "BOM-PCB-001", "materialCode": "MT002", - "operationCode": "OP001", + "operationName": "CNC Torna Tezgahı İşlemi", "quantity": 1, "uomId": "Adet", "scrapPercentage": 0.01, @@ -5741,8 +5570,8 @@ "BomOperations": [ { "bomCode": "BOM-MOT-001", - "operationCode": "OP001", - "workcenterCode": null, + "operationName": "CNC Torna Tezgahı İşlemi", + "workCenterName": null, "sequence": 10, "setupTime": 30, "runTime": 45, @@ -5754,8 +5583,8 @@ }, { "bomCode": "BOM-MOT-001", - "operationCode": "OP002", - "workcenterCode": null, + "operationName": "CNC Torna Tezgahı İşlemi", + "workCenterName": null, "sequence": 20, "setupTime": 15, "runTime": 60, @@ -5767,8 +5596,8 @@ }, { "bomCode": "BOM-MOT-001", - "operationCode": "OP002", - "workcenterCode": null, + "operationName": "Kaynak İşlemi", + "workCenterName": null, "sequence": 30, "setupTime": 5, "runTime": 20, @@ -5780,8 +5609,8 @@ }, { "bomCode": "BOM-GEAR-001", - "operationCode": "OP003", - "workcenterCode": null, + "operationName": "Kaynak İşlemi", + "workCenterName": null, "sequence": 30, "setupTime": 5, "runTime": 20, @@ -5793,8 +5622,8 @@ }, { "bomCode": "BOM-PCB-001", - "operationCode": "OP004", - "workcenterCode": null, + "operationName": "CNC Torna Tezgahı İşlemi", + "workCenterName": null, "sequence": 10, "setupTime": 15, "runTime": 30, @@ -6447,9 +6276,9 @@ "Inventories": [ { "materialCode": "PR001", - "warehouseCode": "WH-001", - "zoneCode": "Z001", - "locationCode": "A01-01-01", + "warehouseName": "Merkez Depo", + "zoneName": "Giriş Bölgesi", + "locationName": "A Blok 1. Koridor 1. Raf", "quantity": 50, "reservedQuantity": 10, "availableQuantity": 40, @@ -6462,9 +6291,9 @@ }, { "materialCode": "SF001", - "warehouseCode": "WH-001", - "zoneCode": "Z002", - "locationCode": "A01-01-02", + "warehouseName": "Yedek Parça Deposu", + "zoneName": "Sevkiyat Hazırlık", + "locationName": "B Blok 2. Koridor 1. Raf", "quantity": 25, "reservedQuantity": 5, "availableQuantity": 20, @@ -6477,9 +6306,9 @@ }, { "materialCode": "PR001", - "warehouseCode": "WH-002", - "zoneCode": "Z003", - "locationCode": "B02-02-01", + "warehouseName": "Merkez Depo", + "zoneName": "Ana Depolama", + "locationName": "A Blok 1. Koridor 2. Raf", "quantity": 150, "reservedQuantity": 0, "availableQuantity": 150, @@ -6489,36 +6318,6 @@ "expiryDate": null, "receivedDate": "2024-09-20T00:00:00.000Z", "lastMovementDate": "2024-10-25T00:00:00.000Z" - }, - { - "materialCode": "MT001", - "warehouseCode": "WH-002", - "zoneCode": "Z003", - "locationCode": "B02-02-01", - "quantity": 30, - "reservedQuantity": 8, - "availableQuantity": 22, - "uomId": "Adet", - "lotNumber": "LOT2024004", - "serialNumber": null, - "expiryDate": null, - "receivedDate": "2024-08-10T00:00:00.000Z", - "lastMovementDate": "2024-11-18T00:00:00.000Z" - }, - { - "materialCode": "MT002", - "warehouseCode": "WH-001", - "zoneCode": "Z001", - "locationCode": "C01-02-01", - "quantity": 5, - "reservedQuantity": 0, - "availableQuantity": 0, - "uomId": "Adet", - "lotNumber": "LOT2024005", - "serialNumber": null, - "expiryDate": null, - "receivedDate": "2024-11-25T00:00:00.000Z", - "lastMovementDate": "2024-11-25T00:00:00.000Z" } ], "MovementTypes": [ @@ -6625,56 +6424,6 @@ "isTransfer": true } ], - "MovementItems": [ - { - "movementNumber": "GR-2024-001", - "materialCode": "PR001", - "warehouseCode": "WH-001", - "zoneCode": "Z001", - "locationCode": "A01-01-01", - "quantity": 100, - "uomId": "Adet", - "lotNumber": "LOT2024006", - "serialNumber": null, - "description": "2024 yılı son çeyrek 360° derece performans değerlendirmesi" - }, - { - "movementNumber": "CI-2024-001", - "materialCode": "SF001", - "warehouseCode": "WH-001", - "zoneCode": "Z002", - "locationCode": "A01-01-02", - "quantity": 20, - "uomId": "Adet", - "lotNumber": "LOT2024001", - "serialNumber": null, - "description": "Satış siparişi için malzeme çıkışı" - }, - { - "movementNumber": "TR-2024-001", - "materialCode": "PR001", - "warehouseCode": "WH-002", - "zoneCode": "Z003", - "locationCode": "B02-02-01", - "quantity": 10, - "uomId": "m", - "lotNumber": "LOT2024002", - "serialNumber": null, - "description": "Depo transferi" - }, - { - "movementNumber": "TR-2024-002", - "materialCode": "PR001", - "warehouseCode": "WH-001", - "zoneCode": "Z002", - "locationCode": "A01-01-02", - "quantity": 10, - "uomId": "m", - "lotNumber": "LOT2024002", - "serialNumber": null, - "description": "Depo transferi" - } - ], "WaybillStatuses": [ { "name": "Taslak", diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs index 75fdc4ed..dba7c19f 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs @@ -65,7 +65,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _questionPoolRepository; private readonly IRepository _questionRepository; private readonly IRepository _employeeTypeRepository; - private readonly IRepository _jobPositionRepository; + private readonly IRepository _jobPositionRepository; private readonly IRepository _currencyRepository; private readonly IRepository _departmentRepository; private readonly IRepository _badgeRepository; @@ -101,7 +101,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _customerTypeRepository; private readonly IRepository _customerSegmentRepository; private readonly IRepository _partnerRepository; - private readonly IRepository _lossReasonRepository; + private readonly IRepository _lossReasonRepository; private readonly IRepository _organizationUnitRepository; private readonly OrganizationUnitManager _organizationUnitManager; private readonly IRepository _requestTypeRepository; @@ -203,7 +203,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository questionPoolRepository, IRepository questionRepository, IRepository employeeTypeRepository, - IRepository jobPositionRepository, + IRepository jobPositionRepository, IRepository currencyRepository, IRepository departmentRepository, IRepository costCenterRepository, @@ -239,7 +239,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository customerTypeRepository, IRepository customerSegmentRepository, IRepository partnerRepository, - IRepository lossReasonRepository, + IRepository lossReasonRepository, IRepository organizationUnitRepository, OrganizationUnitManager organizationUnitManager, IRepository requestTypeRepository, @@ -1037,16 +1037,15 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency //Hr foreach (var item in items.Badges) { - if (string.IsNullOrWhiteSpace(item.Code) || string.IsNullOrWhiteSpace(item.Name)) + if (string.IsNullOrWhiteSpace(item.Name)) continue; - var exists = await _badgeRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _badgeRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; await _badgeRepository.InsertAsync(new Badge { - Code = item.Code, Name = item.Name, Description = item.Description, Icon = item.Icon, @@ -1077,20 +1076,19 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Departments) { - if (string.IsNullOrWhiteSpace(item.Name) || string.IsNullOrWhiteSpace(item.Code)) + if (string.IsNullOrWhiteSpace(item.Name)) continue; - var parentDepartment = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.ParentDepartmentCode); - var costCenter = await _costCenterRepository.FirstOrDefaultAsync(x => x.Code == item.CostCenterCode); + var parentDepartment = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.ParentDepartmentName); + var costCenter = await _costCenterRepository.FirstOrDefaultAsync(x => x.Name == item.CostCenterName); var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.ManagerCode); - var exists = await _departmentRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _departmentRepository.AnyAsync(x => x.Name == item.Name ); if (exists) continue; await _departmentRepository.InsertAsync(new Department { - Code = item.Code, Name = item.Name, Description = item.Description, ParentDepartmentId = parentDepartment != null ? parentDepartment.Id : null, @@ -1103,20 +1101,19 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.CostCenters) { - if (string.IsNullOrWhiteSpace(item.Code) || string.IsNullOrWhiteSpace(item.Name)) + if (string.IsNullOrWhiteSpace(item.Name)) continue; - var parentCostCenter = await _costCenterRepository.FirstOrDefaultAsync(x => x.Code == item.ParentCostCenterCode); + var parentCostCenter = await _costCenterRepository.FirstOrDefaultAsync(x => x.Name == item.ParentCostCenterName); var responsibleEmployee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.ResponsibleEmployeeCode); - var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.DepartmentName); - var exists = await _costCenterRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _costCenterRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; await _costCenterRepository.InsertAsync(new CostCenter { - Code = item.Code, Name = item.Name, Description = item.Description, ParentCostCenterId = parentCostCenter != null ? parentCostCenter.Id : null, @@ -1133,18 +1130,17 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.JobPositions) { - if (string.IsNullOrWhiteSpace(item.Name) || string.IsNullOrWhiteSpace(item.Code)) + if (string.IsNullOrWhiteSpace(item.Name)) continue; - var exists = await _jobPositionRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _jobPositionRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; - var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.DepartmentName); - await _jobPositionRepository.InsertAsync(new JobPosition + await _jobPositionRepository.InsertAsync(new JobPosition(item.Name) { - Code = item.Code, Name = item.Name, Description = item.Description, DepartmentId = department != null ? department.Id : null, @@ -1166,11 +1162,11 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency continue; var employmentType = await _employeeTypeRepository.FirstOrDefaultAsync(x => x.Name == item.EmploymentTypeName); - var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); - var jobPosition = await _jobPositionRepository.FirstOrDefaultAsync(x => x.Code == item.JobPositionCode); + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.DepartmentName); + var jobPosition = await _jobPositionRepository.FirstOrDefaultAsync(x => x.Name == item.JobPositionName); var manager = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.ManagerCode); - var bank = await _bankRepository.FirstOrDefaultAsync(x => x.Code == item.BankCode); - var badge = await _badgeRepository.FirstOrDefaultAsync(x => x.Code == item.BadgeCode); + var bank = await _bankRepository.FirstOrDefaultAsync(x => x.Name == item.BankName); + var badge = await _badgeRepository.FirstOrDefaultAsync(x => x.Name == item.BadgeName); await _employeeRepository.InsertAsync(new Employee { @@ -1360,7 +1356,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency continue; var template = await _template360Repository.FirstOrDefaultAsync(x => x.Name == item.TemplateName); - var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.DepartmentName); var targetEmployees = await _employeeRepository.GetListAsync(x => item.TargetEmployees.Split('|', StringSplitOptions.RemoveEmptyEntries).Contains(x.Code)); @@ -1448,10 +1444,10 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.EmployeeCode); var targetDepartments = new List(); - if (item.DepartmentCodes != null) + if (item.DepartmentNames != null) { targetDepartments = await _departmentRepository.GetListAsync(x => - item.DepartmentCodes.Split('|', StringSplitOptions.RemoveEmptyEntries).Contains(x.Code)); + item.DepartmentNames.Split('|', StringSplitOptions.RemoveEmptyEntries).Contains(x.Name)); } await _announcementRepository.InsertAsync(new Announcement @@ -1790,13 +1786,12 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency //Supply Chain foreach (var item in items.MaterialTypes) { - var exists = await _materialTypeRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _materialTypeRepository.AnyAsync(x => x.Name == item.Name); if (!exists) { await _materialTypeRepository.InsertAsync(new MaterialType { - Code = item.Code, Name = item.Name, Description = item.Description, IsActive = item.IsActive @@ -1806,15 +1801,13 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.MaterialGroups) { - var exists = await _materialGroupRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _materialGroupRepository.AnyAsync(x => x.Name == item.Name); if (!exists) { - var parentGroup = await _materialGroupRepository.FirstOrDefaultAsync(x => x.Code == item.ParentGroupCode); - + var parentGroup = await _materialGroupRepository.FirstOrDefaultAsync(x => x.Name == item.ParentGroupName); await _materialGroupRepository.InsertAsync(new MaterialGroup { - Code = item.Code, Name = item.Name, Description = item.Description, IsActive = item.IsActive, @@ -1832,8 +1825,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - var type = await _materialTypeRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialTypeCode); - var group = await _materialGroupRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialGroupCode); + var type = await _materialTypeRepository.FirstOrDefaultAsync(x => x.Name == item.MaterialTypeName); + var group = await _materialGroupRepository.FirstOrDefaultAsync(x => x.Name == item.MaterialGroupName); await _materialRepository.InsertAsync(new Material { @@ -1943,9 +1936,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _lossReasonRepository.InsertAsync(new LossReason + await _lossReasonRepository.InsertAsync(new LossReason(item.Name) { - Code = item.Code, Name = item.Name, Category = item.Category, Description = item.Description, @@ -2041,8 +2033,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); - var materialType = await _materialTypeRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialTypeCode); + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.DepartmentName); + var materialType = await _materialTypeRepository.FirstOrDefaultAsync(x => x.Name == item.MaterialTypeName); await _approvalRepository.InsertAsync(new Approval { @@ -2084,16 +2076,15 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Workcenters) { - var exists = await _workcenterRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _workcenterRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; - var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); + var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Name == item.DepartmentName); var workcenterType = await _workcenterTypeRepository.FirstOrDefaultAsync(x => x.Name == item.WorkcenterTypeName); - await _workcenterRepository.InsertAsync(new Workcenter(item.Code) + await _workcenterRepository.InsertAsync(new Workcenter(item.Name) { - Code = item.Code, Name = item.Name, Description = item.Description, WorkcenterTypeId = workcenterType?.Id, @@ -2113,31 +2104,31 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency }, autoSave: true); } - foreach (var item in items.MaintenancePlans) - { - var exists = await _maintenancePlanRepository.AnyAsync(x => x.Code == item.Code); - if (exists) - continue; + // foreach (var item in items.MaintenancePlans) + // { + // var exists = await _maintenancePlanRepository.AnyAsync(x => x.Code == item.Code); + // if (exists) + // continue; - var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Code == item.WorkCenterCode); + // var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Name == item.WorkCenterName); - await _maintenancePlanRepository.InsertAsync(new PlanWizard - { - Code = item.Code, - WorkcenterId = workcenter?.Id, - PlanType = item.PlanType, - Priority = item.Priority, - Description = item.Description, - Frequency = item.Frequency, - FrequencyUnit = item.FrequencyUnit, - EstimatedDuration = item.EstimatedDuration, - RequiredSkillsJson = item.RequiredSkillsJson, - Instructions = item.Instructions, - NextDue = item.NextDue, - IsActive = item.IsActive, - LastExecuted = item.LastExecuted - }, autoSave: true); - } + // await _maintenancePlanRepository.InsertAsync(new PlanWizard + // { + // Code = item.Code, + // WorkcenterId = workcenter?.Id, + // PlanType = item.PlanType, + // Priority = item.Priority, + // Description = item.Description, + // Frequency = item.Frequency, + // FrequencyUnit = item.FrequencyUnit, + // EstimatedDuration = item.EstimatedDuration, + // RequiredSkillsJson = item.RequiredSkillsJson, + // Instructions = item.Instructions, + // NextDue = item.NextDue, + // IsActive = item.IsActive, + // LastExecuted = item.LastExecuted + // }, autoSave: true); + // } foreach (var item in items.FaultTypes) { @@ -2169,24 +2160,23 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Faults) { - var exists = await _faultRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _faultRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; - var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Code == item.WorkCenterCode); + var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Name == item.WorkCenterName); var faultType = await _faultTypeRepository.FirstOrDefaultAsync(x => x.Name == item.FaultTypeName); var faultStatus = await _faultStatusRepository.FirstOrDefaultAsync(x => x.Name == item.Status); await _faultRepository.InsertAsync(new Fault { - Code = item.Code, + Name = item.Name, + Description = item.Description, WorkcenterId = workcenter?.Id, Location = item.Location, FaultTypeId = faultType?.Id, Priority = item.Priority, Severity = item.Severity, - Title = item.Title, - Description = item.Description, Status = item.Status, EstimatedRepairTime = item.EstimatedRepairTime, ActualRepairTime = item.ActualRepairTime, @@ -2232,7 +2222,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency await _warehouseTypeRepository.InsertAsync(new WarehouseType(item.Name) { - Code = item.Code, Name = item.Name, Description = item.Description, IsActive = item.IsActive @@ -2241,13 +2230,12 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.ZoneTypes) { - var exists = await _zoneTypeRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _zoneTypeRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; await _zoneTypeRepository.InsertAsync(new ZoneType(item.Name) { - Code = item.Code, Name = item.Name, Description = item.Description, IsActive = item.IsActive @@ -2256,13 +2244,12 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.LocationTypes) { - var exists = await _locationTypeRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _locationTypeRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; await _locationTypeRepository.InsertAsync(new LocationType(item.Name) { - Code = item.Code, Name = item.Name, Description = item.Description, IsActive = item.IsActive @@ -2271,16 +2258,15 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Warehouses) { - var exists = await _warehouseRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _warehouseRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.EmployeeCode); - var warehousetype = await _warehouseTypeRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseTypeCode); + var warehousetype = await _warehouseTypeRepository.FirstOrDefaultAsync(x => x.Name == item.WarehouseTypeName); - await _warehouseRepository.InsertAsync(new Warehouse(item.Code) + await _warehouseRepository.InsertAsync(new Warehouse(item.Name) { - Code = item.Code, Name = item.Name, Description = item.Description, EmployeeId = employee?.Id, @@ -2300,18 +2286,17 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Zones) { - var exists = await _zoneRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _zoneRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; - var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode); - var zoneType = await _zoneTypeRepository.FirstOrDefaultAsync(x => x.Code == item.ZoneTypeCode); + var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Name == item.WarehouseName); + var zoneType = await _zoneTypeRepository.FirstOrDefaultAsync(x => x.Name == item.ZoneTypeName); await _zoneRepository.InsertAsync(new Zone(item.Name) { WarehouseId = warehouse?.Id, ZoneTypeId = zoneType?.Id, - Code = item.Code, Name = item.Name, Description = item.Description, Temperature = item.Temperature, @@ -2322,13 +2307,13 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Locations) { - var exists = await _locationRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _locationRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; - var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode); - var zone = await _zoneRepository.FirstOrDefaultAsync(x => x.Code == item.ZoneCode); - var locationtype = await _locationTypeRepository.FirstOrDefaultAsync(x => x.Code == item.LocationTypeCode); + var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Name == item.WarehouseName); + var zone = await _zoneRepository.FirstOrDefaultAsync(x => x.Name == item.ZoneName); + var locationtype = await _locationTypeRepository.FirstOrDefaultAsync(x => x.Name == item.LocationTypeName); var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.UomId); await _locationRepository.InsertAsync(new Location(item.Name) @@ -2336,7 +2321,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency WarehouseId = warehouse?.Id, ZoneId = zone?.Id, LocationTypeId = locationtype?.Id, - Code = item.Code, Name = item.Name, Description = item.Description, IsActive = item.IsActive, @@ -2349,19 +2333,18 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Putaways) { - var exists = await _putawayRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _putawayRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; - var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode); - var materialtype = await _materialTypeRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialTypeCode); - var materialgroup = await _materialGroupRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialGroupCode); - var targetzone = await _zoneRepository.FirstOrDefaultAsync(x => x.Code == item.TargetZoneCode); - var targetlocation = await _locationRepository.FirstOrDefaultAsync(x => x.Code == item.TargetLocationCode); + var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Name == item.WarehouseName); + var materialtype = await _materialTypeRepository.FirstOrDefaultAsync(x => x.Name == item.MaterialTypeName); + var materialgroup = await _materialGroupRepository.FirstOrDefaultAsync(x => x.Name == item.MaterialGroupName); + var targetzone = await _zoneRepository.FirstOrDefaultAsync(x => x.Name == item.TargetZoneName); + var targetlocation = await _locationRepository.FirstOrDefaultAsync(x => x.Name == item.TargetLocationName); await _putawayRepository.InsertAsync(new Putaway { - Code = item.Code, Name = item.Name, Description = item.Description, Priority = item.Priority, @@ -2400,7 +2383,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency await _operationTypeRepository.InsertAsync(new OperationType { - Code = item.Code, Name = item.Name, Description = item.Description, CategoryId = operationCategory?.Id, @@ -2414,16 +2396,15 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Operations) { - var exists = await _operationRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _operationRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; - var operationType = await _operationTypeRepository.FirstOrDefaultAsync(x => x.Code == item.OperationTypeCode); - var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Code == item.WorkCenterCode); + var operationType = await _operationTypeRepository.FirstOrDefaultAsync(x => x.Name == item.OperationTypeName); + var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Name == item.WorkCenterName); await _operationRepository.InsertAsync(new Operation { - Code = item.Code, Name = item.Name, Description = item.Description, OperationTypeId = operationType?.Id, @@ -2480,7 +2461,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency var bom = await _bomRepository.FirstOrDefaultAsync(x => x.Code == item.BomCode); var material = await _materialRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialCode); var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.UomId); - var operation = await _operationRepository.FirstOrDefaultAsync(x => x.Code == item.OperationCode); + var operation = await _operationRepository.FirstOrDefaultAsync(x => x.Name == item.OperationName); var exists = await _bomComponentRepository.AnyAsync(x => x.BomId == bom.Id && x.MaterialId == material.Id); if (exists) @@ -2505,13 +2486,13 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.BomOperations) { var bom = await _bomRepository.FirstOrDefaultAsync(x => x.Code == item.BomCode); - var operation = await _operationRepository.FirstOrDefaultAsync(x => x.Code == item.OperationCode); + var operation = await _operationRepository.FirstOrDefaultAsync(x => x.Name == item.OperationName); var exists = await _bomOperationRepository.AnyAsync(x => x.BomId == bom.Id && x.OperationId == operation.Id); if (exists) continue; - var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Code == item.WorkcenterCode); + var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Name == item.WorkcenterName); await _bomOperationRepository.InsertAsync(new BomOperation { @@ -2765,9 +2746,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Inventories) { var material = await _materialRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialCode); - var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode); - var zone = await _zoneRepository.FirstOrDefaultAsync(x => x.Code == item.ZoneCode); - var location = await _locationRepository.FirstOrDefaultAsync(x => x.Code == item.LocationCode); + var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Name == item.WarehouseName); + var zone = await _zoneRepository.FirstOrDefaultAsync(x => x.Name == item.ZoneName); + var location = await _locationRepository.FirstOrDefaultAsync(x => x.Name == item.LocationName); var exists = await _inventoryRepository.AnyAsync(x => x.MaterialId == material.Id && x.WarehouseId == warehouse.Id && @@ -2845,33 +2826,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency }, autoSave: true); } - foreach (var item in items.MovementItems) - { - var movement = await _movementRepository.FirstOrDefaultAsync(x => x.MovementNumber == item.MovementNumber); - - var exists = await _movementItemRepository.AnyAsync(x => x.MovementId == movement.Id); - if (exists) - continue; - - var material = await _materialRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialCode); - var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode); - var zone = await _zoneRepository.FirstOrDefaultAsync(x => x.Code == item.ZoneCode); - var location = await _locationRepository.FirstOrDefaultAsync(x => x.Code == item.LocationCode); - - await _movementItemRepository.InsertAsync(new MovementItem - { - MovementId = movement?.Id, - WarehouseId = warehouse?.Id, - ZoneId = zone?.Id, - LocationId = location?.Id, - MaterialId = material?.Id, - Quantity = item.Quantity, - UomId = item.UomId, - LotNumber = item.LotNumber, - Description = item.Description - }, autoSave: true); - } - foreach (var item in items.WaybillStatuses) { var exists = await _waybillStatusRepository.AnyAsync(x => x.Name == item.Name); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs index d3f0369a..25b6cea2 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs @@ -74,7 +74,6 @@ public class DatabaseViewSeeder : IDataSeedContributor, ITransientDependency lvl5.TenantId, lvl5.Id, lvl5.ParentGroupId, - lvl5.Code, lvl5.Name, lvl5.Description, lvl5.IsActive, diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs index fc197194..5db373f4 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs @@ -106,7 +106,6 @@ public class TenantSeederDto public List WorkcenterTypes { get; set; } public List WorkcenterStatuses { get; set; } public List Workcenters { get; set; } - public List MaintenancePlans { get; set; } public List Faults { get; set; } public List FaultStatuses { get; set; } public List FaultTypes { get; set; } @@ -141,12 +140,10 @@ public class TenantSeederDto public List ProjectWorkTypes { get; set; } public List ProjectPhases { get; set; } public List ProjectTasks { get; set; } - public List ProjectTaskDailies { get; set; } public List Inventories { get; set; } public List MovementTypes { get; set; } public List ReferenceTypes { get; set; } public List Movements { get; set; } - public List MovementItems { get; set; } //Accounting public List WaybillTypes { get; set; } @@ -243,21 +240,6 @@ public class MovementSeedDto public bool IsTransfer { get; set; } } -public class MovementItemSeedDto -{ - public string MovementNumber { get; set; } - public string WarehouseCode { get; set; } - public string ZoneCode { get; set; } - public string LocationCode { get; set; } - public string MaterialCode { get; set; } - - public decimal Quantity { get; set; } - public string UomId { get; set; } - public string LotNumber { get; set; } - - public string Description { get; set; } -} - public class ReferenceTypeSeedDto { public string Name { get; set; } @@ -276,9 +258,9 @@ public class MovementTypeSeedDto public class InventorySeedDto { public string MaterialCode { get; set; } - public string WarehouseCode { get; set; } - public string ZoneCode { get; set; } - public string LocationCode { get; set; } + public string WarehouseName { get; set; } + public string ZoneName { get; set; } + public string LocationName { get; set; } public decimal Quantity { get; set; } public decimal ReservedQuantity { get; set; } @@ -451,8 +433,8 @@ public class ProjectTypeSeedDto public class BomOperationSeedDto { public string BomCode { get; set; } - public string OperationCode { get; set; } - public string? WorkcenterCode { get; set; } + public string OperationName { get; set; } + public string? WorkcenterName { get; set; } public int Sequence { get; set; } public int SetupTime { get; set; } public int RunTime { get; set; } @@ -467,7 +449,7 @@ public class BomComponentSeedDto { public string BomCode { get; set; } public string MaterialCode { get; set; } - public string OperationCode { get; set; } + public string OperationName { get; set; } public decimal Quantity { get; set; } public string UomId { get; set; } @@ -504,11 +486,10 @@ public class BomTypeSeedDto public class OperationSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } - public string OperationTypeCode { get; set; } - public string WorkCenterCode { get; set; } + public string OperationTypeName { get; set; } + public string WorkCenterName { get; set; } public int StandardTime { get; set; } public int SetupTime { get; set; } public decimal LaborCost { get; set; } @@ -521,7 +502,6 @@ public class OperationSeedDto public class OperationTypeSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public string CategoryName { get; set; } @@ -548,21 +528,20 @@ public class PutawaySeedDto public string Strategy { get; set; } public bool IsActive { get; set; } - public string WarehouseCode { get; set; } - public string MaterialTypeCode { get; set; } - public string MaterialGroupCode { get; set; } - public string TargetZoneCode { get; set; } - public string TargetLocationCode { get; set; } + public string WarehouseName { get; set; } + public string MaterialTypeName { get; set; } + public string MaterialGroupName { get; set; } + public string TargetZoneName { get; set; } + public string TargetLocationName { get; set; } } public class LocationSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } - public string WarehouseCode { get; set; } - public string ZoneCode { get; set; } - public string LocationTypeCode { get; set; } + public string WarehouseName { get; set; } + public string ZoneName { get; set; } + public string LocationTypeName { get; set; } public decimal Capacity { get; set; } public decimal CurrentStock { get; set; } @@ -573,11 +552,10 @@ public class LocationSeedDto public class ZoneSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } - public string ZoneTypeCode { get; set; } - public string WarehouseCode { get; set; } + public string ZoneTypeName { get; set; } + public string WarehouseName { get; set; } public decimal Temperature { get; set; } public decimal Humidity { get; set; } @@ -586,11 +564,10 @@ public class ZoneSeedDto public class WarehouseSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public string EmployeeCode { get; set; } - public string WarehouseTypeCode { get; set; } + public string WarehouseTypeName { get; set; } public string Country { get; set; } public string City { get; set; } @@ -608,7 +585,6 @@ public class WarehouseSeedDto public class WarehouseTypeSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } @@ -616,7 +592,6 @@ public class WarehouseTypeSeedDto public class ZoneTypeSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } @@ -624,7 +599,6 @@ public class ZoneTypeSeedDto public class LocationTypeSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } @@ -646,14 +620,13 @@ public class WorkorderStatusSeedDto public class FaultSeedDto { - public string Code { get; set; } - public string WorkCenterCode { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public string WorkCenterName { get; set; } public string Location { get; set; } public string FaultTypeName { get; set; } public string Priority { get; set; } public string Severity { get; set; } - public string Title { get; set; } - public string Description { get; set; } public string Status { get; set; } public int? EstimatedRepairTime { get; set; } public int? ActualRepairTime { get; set; } @@ -676,26 +649,8 @@ public class FaultTypeSeedDto public bool IsActive { get; set; } } -public class MaintenancePlanSeedDto -{ - public string Code { get; set; } - public string WorkCenterCode { get; set; } - public string PlanType { get; set; } - public string Priority { get; set; } - public string Description { get; set; } - public int Frequency { get; set; } - public string FrequencyUnit { get; set; } - public int EstimatedDuration { get; set; } - public string RequiredSkillsJson { get; set; } - public string Instructions { get; set; } - public DateTime NextDue { get; set; } - public bool IsActive { get; set; } - public DateTime? LastExecuted { get; set; } -} - public class WorkcenterSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public string WorkcenterTypeName { get; set; } @@ -706,7 +661,7 @@ public class WorkcenterSeedDto public DateTime WarrantyExpiry { get; set; } public string Location { get; set; } - public string DepartmentCode { get; set; } + public string DepartmentName { get; set; } public string Status { get; set; } public string Criticality { get; set; } @@ -718,7 +673,6 @@ public class WorkcenterSeedDto public class WorkcenterTypeSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } @@ -734,8 +688,8 @@ public class WorkcenterStatusSeedDto public class ApprovalSeedDto { public string Name { get; set; } - public string DepartmentCode { get; set; } - public string MaterialTypeCode { get; set; } + public string DepartmentName { get; set; } + public string MaterialTypeName { get; set; } public decimal AmountThreshold { get; set; } public bool IsActive { get; set; } } @@ -798,7 +752,6 @@ public class PartnerSeedDto public class LossReasonSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Category { get; set; } public string Description { get; set; } @@ -846,8 +799,8 @@ public class MaterialSeedDto public string Name { get; set; } public string Barcode { get; set; } public string Description { get; set; } - public string MaterialTypeCode { get; set; } - public string MaterialGroupCode { get; set; } + public string MaterialTypeName { get; set; } + public string MaterialGroupName { get; set; } public string UomId { get; set; } public decimal CostPrice { get; set; } public decimal SalesPrice { get; set; } @@ -859,7 +812,6 @@ public class MaterialSeedDto public class MaterialTypeSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } @@ -867,10 +819,9 @@ public class MaterialTypeSeedDto public class MaterialGroupSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } - public string ParentGroupCode { get; set; } + public string ParentGroupName { get; set; } public bool IsActive { get; set; } } @@ -1009,7 +960,7 @@ public class AnnouncementSeedDto public DateTime? ExpiryDate { get; set; } public bool IsPinned { get; set; } public int ViewCount { get; set; } - public string DepartmentCodes { get; set; } + public string DepartmentNames { get; set; } } public class ShuttleRouteSeedDto @@ -1060,7 +1011,7 @@ public class Performans360SeedDto public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public string Status { get; set; } - public string DepartmentCode { get; set; } + public string DepartmentName { get; set; } public string TargetEmployees { get; set; } } @@ -1140,25 +1091,24 @@ public class EmployeeSeedDto public DateTime HireDate { get; set; } public DateTime? TerminationDate { get; set; } public string EmploymentTypeName { get; set; } - public string JobPositionCode { get; set; } - public string DepartmentCode { get; set; } + public string JobPositionName { get; set; } + public string DepartmentName { get; set; } public string WorkLocation { get; set; } public decimal BaseSalary { get; set; } public string ManagerCode { get; set; } public string Currency { get; set; } public string PayrollGroup { get; set; } - public string BankCode { get; set; } + public string BankName { get; set; } public string IbanNumber { get; set; } - public string BadgeCode { get; set; } + public string BadgeName { get; set; } public string EmployeeStatus { get; set; } public bool IsActive { get; set; } } public class BadgeSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } public string Icon { get; set; } @@ -1173,12 +1123,11 @@ public class BadgeSeedDto public class CostCenterSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } - public string ParentCostCenterCode { get; set; } + public string ParentCostCenterName { get; set; } public string ResponsibleEmployeeCode { get; set; } - public string DepartmentCode { get; set; } + public string DepartmentName { get; set; } public string CostCenterType { get; set; } public decimal BudgetedAmount { get; set; } public decimal ActualAmount { get; set; } @@ -1189,23 +1138,21 @@ public class CostCenterSeedDto public class DepartmentSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } - public string ParentDepartmentCode { get; set; } + public string ParentDepartmentName { get; set; } public List SubDepartments { get; set; } public string ManagerCode { get; set; } - public string CostCenterCode { get; set; } + public string CostCenterName { get; set; } public decimal Budget { get; set; } public bool IsActive { get; set; } } public class JobPositionSeedDto { - public string Code { get; set; } public string Name { get; set; } public string Description { get; set; } - public string DepartmentCode { get; set; } + public string DepartmentName { get; set; } public string Level { get; set; } public decimal MinSalary { get; set; } public decimal MaxSalary { get; set; } diff --git a/ui/src/proxy/intranet/models.ts b/ui/src/proxy/intranet/models.ts index e1e00459..0b6dc590 100644 --- a/ui/src/proxy/intranet/models.ts +++ b/ui/src/proxy/intranet/models.ts @@ -106,7 +106,6 @@ export interface EmployeeDto { export interface DepartmentDto { // İnsan Kaynakları Departmanı id: string - code: string name: string description?: string parentDepartmentId?: string @@ -125,7 +124,6 @@ export interface DepartmentDto { export interface JobPositionDto { // İnsan Kaynakları İş Pozisyonu id: string - code: string name: string description?: string departmentId: string