From ff49904bb0b7c4f1ee3d841a0ea2f970cc589a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Mon, 24 Nov 2025 23:50:53 +0300 Subject: [PATCH] =?UTF-8?q?Store=20d=C3=BCzenlemeleri?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/LanguagesData.json | 71 +- .../Seeds/ListFormSeeder_Store.cs | 468 +++++++++++ .../Seeds/ListFormSeeder_Warehouse.cs | 187 ----- .../Seeds/MenusData.json | 152 ++-- .../Seeds/PermissionsData.json | 760 +++++++++++++----- .../Enums/MenuPrefixEnum.cs | 4 +- .../Enums/TableNameEnum.cs | 8 +- .../TableNameResolver.cs | 8 + .../Erp.Platform.Domain/Data/SeedConsts.cs | 11 + .../Entities/Tenant/Hr/Employee.cs | 1 + .../Entities/Tenant/Store/Location.cs | 28 + .../Entities/Tenant/Store/LocationType.cs | 19 + .../Entities/Tenant/Store/Warehouse.cs | 35 + .../Entities/Tenant/Store/WarehouseType.cs | 19 + .../Entities/Tenant/Store/Zone.cs | 27 + .../Entities/Tenant/Store/ZoneType.cs | 19 + .../EntityFrameworkCore/PlatformDbContext.cs | 133 +++ ....cs => 20251124204213_Initial.Designer.cs} | 569 ++++++++++++- ...1_Initial.cs => 20251124204213_Initial.cs} | 253 ++++++ .../PlatformDbContextModelSnapshot.cs | 567 +++++++++++++ .../Tenants/Seeds/TenantData.json | 108 +++ .../Tenants/TenantDataSeeder.cs | 56 +- .../Tenants/TenantSeederDto.cs | 32 + 23 files changed, 3083 insertions(+), 452 deletions(-) create mode 100644 api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs delete mode 100644 api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Warehouse.cs create mode 100644 api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs create mode 100644 api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs create mode 100644 api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs create mode 100644 api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs create mode 100644 api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs create mode 100644 api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251124190041_Initial.Designer.cs => 20251124204213_Initial.Designer.cs} (96%) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251124190041_Initial.cs => 20251124204213_Initial.cs} (96%) diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json index bd196f66..f5363713 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json @@ -165,8 +165,8 @@ }, { "resourceName": "Platform", - "key": "App.Warehouse", - "en": "Warehouse", + "key": "App.Store", + "en": "Store", "tr": "Depo" }, { @@ -6595,21 +6595,18 @@ "tr": "Ürünlerimizi Keşfedin", "en": "Explore Our Products" }, - { "resourceName": "Platform", "key": "Public.hero.slide1.title", "tr": "Türkiye'nin Lider Dil Kursu Yazılımı", "en": "The Turkey's Leading Language Course Software" }, - { "resourceName": "Platform", "key": "Public.hero.slide1.subtitle", "tr": "20 yılı aşkın tecrübemizle, yabancı dil okulları ve kurslar için özel olarak geliştirdiğimiz yazılım çözümlerimizle işletmenizi dijital dünyada bir adım öne taşıyoruz.", "en": "With over 20 years of experience, we help you take your business one step ahead in the digital world with our software solutions developed specifically for language schools and courses." }, - { "resourceName": "Platform", "key": "Public.hero.slide1.service1.title", @@ -6646,21 +6643,18 @@ "tr": "İnternet bağlantısının olduğu her yerden, yüksek güvenlik standartlarıyla platformunuza kesintisiz erişim sağlayın.", "en": "Access your platform securely and seamlessly from anywhere with an internet connection, supported by enterprise-grade security standards." }, - { "resourceName": "Platform", "key": "Public.hero.slide2.title", "tr": "Entegre ERP Otomasyonu", "en": "Integrated ERP Automation" }, - { "resourceName": "Platform", "key": "Public.hero.slide2.subtitle", "tr": "Operasyonel verimliliğinizi artırmak için tüm iş süreçlerinizi tek ve bütünleşik bir platformdan yönetin.", "en": "Manage all your business processes from a single, integrated platform to enhance operational efficiency." }, - { "resourceName": "Platform", "key": "Public.hero.slide2.service1.title", @@ -6697,7 +6691,6 @@ "tr": "Kurumsal güvenlik standartlarına uygun veri koruma altyapısıyla bilgilerinizi yetkisiz erişimlere ve risklere karşı güvence altına alın.", "en": "Safeguard your information against unauthorized access and risks with enterprise-grade data protection infrastructure." }, - { "resourceName": "Platform", "key": "Public.hero.slide3.title", @@ -6710,7 +6703,6 @@ "tr": "Kod yazmadan hızlı uygulama geliştirin, iş süreçlerinizi kolayca dijitalleştirin.", "en": "Build applications rapidly without coding and digitize your business processes with ease." }, - { "resourceName": "Platform", "key": "Public.hero.slide3.service1.title", @@ -6723,7 +6715,6 @@ "tr": "Sürükle-bırak bileşenlerle hızlı, esnek ve kullanıcı dostu arayüzler oluşturarak uygulama geliştirme süreçlerinizi hızlandırın.", "en": "Accelerate your development cycles by creating fast, flexible, and user-friendly interfaces using drag-and-drop components." }, - { "resourceName": "Platform", "key": "Public.hero.slide3.service2.title", @@ -6736,7 +6727,6 @@ "tr": "Veri modellerinizden otomatik olarak üretilen RESTful servislerle entegrasyon süreçlerini kolaylaştırın ve geliştirme maliyetlerini azaltın.", "en": "Simplify integrations and reduce development costs with automatically generated RESTful services based on your data models." }, - { "resourceName": "Platform", "key": "Public.hero.slide3.service3.title", @@ -6749,7 +6739,6 @@ "tr": "Aynı altyapıyla web, mobil ve masaüstü uygulamaları kolayca oluşturun ve tüm platformlarda tutarlı kullanıcı deneyimi sağlayın.", "en": "Build web, mobile, and desktop applications using a unified infrastructure while delivering a consistent user experience across all platforms." }, - { "resourceName": "Platform", "key": "Public.login.createAccount", @@ -9506,55 +9495,91 @@ }, { "resourceName": "Platform", - "key": "App.Warehouse.Definitions", + "key": "App.Store.WarehouseType", + "tr": "Depo Tipleri", + "en": "Warehouse Types" + }, + { + "resourceName": "Platform", + "key": "App.Store.Warehouse", + "tr": "Depolar", + "en": "Warehouses" + }, + { + "resourceName": "Platform", + "key": "App.Store.ZoneType", + "tr": "Bölge Tipleri", + "en": "Zone Types" + }, + { + "resourceName": "Platform", + "key": "App.Store.Zone", + "tr": "Bölgeler", + "en": "Zones" + }, + { + "resourceName": "Platform", + "key": "App.Store.LocationType", + "tr": "Lokasyon Tipleri", + "en": "Location Types" + }, + { + "resourceName": "Platform", + "key": "App.Store.Location", + "tr": "Lokasyonlar", + "en": "Locations" + }, + { + "resourceName": "Platform", + "key": "App.Store.Definitions", "tr": "Depo Tanımları", "en": "Warehouse Definitions" }, { "resourceName": "Platform", - "key": "App.Warehouse.Tracking", + "key": "App.Store.Tracking", "tr": "Lokasyon Takibi", "en": "Location Tracking" }, { "resourceName": "Platform", - "key": "App.Warehouse.Putaway", + "key": "App.Store.Putaway", "tr": "Yerleştirme", "en": "Putaway" }, { "resourceName": "Platform", - "key": "App.Warehouse.Receipt", + "key": "App.Store.Receipt", "tr": "Stok Girişi", "en": "Stock Receipt" }, { "resourceName": "Platform", - "key": "App.Warehouse.Issue", + "key": "App.Store.Issue", "tr": "Stok Çıkışı", "en": "Stock Issue" }, { "resourceName": "Platform", - "key": "App.Warehouse.Transfer", + "key": "App.Store.Transfer", "tr": "Stok Transferi", "en": "Stock Transfer" }, { "resourceName": "Platform", - "key": "App.Warehouse.Inventory", + "key": "App.Store.Inventory", "tr": "Stok Durumu", "en": "Stock Status" }, { "resourceName": "Platform", - "key": "App.Warehouse.Movements", + "key": "App.Store.Movements", "tr": "Stok Hareketleri", "en": "Stock Movements" }, { "resourceName": "Platform", - "key": "App.Warehouse.Stocklevel", + "key": "App.Store.Stocklevel", "tr": "Lot ve Seri No Takibi", "en": "Lot and Serial Number Tracking" }, @@ -9817,4 +9842,4 @@ "en": "Check & Notes" } ] -} +} \ No newline at end of file diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs new file mode 100644 index 00000000..011b2e83 --- /dev/null +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs @@ -0,0 +1,468 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Text.Json; +using System.Threading.Tasks; +using Erp.Languages.Languages; +using Erp.Platform.Entities; +using Erp.Platform.Enums; +using Erp.Platform.ListForms; +using Erp.Platform.Queries; +using Microsoft.Extensions.Configuration; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Identity; +using AppCodes = Erp.Platform.Data.Seeds.SeedConsts.AppCodes; +using static Erp.Platform.PlatformConsts; +using static Erp.Platform.PlatformSeeder.SeederDefaults; + +namespace Erp.Platform.Data.Seeds; + +public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependency +{ + private readonly IRepository _listFormRepository; + private readonly IRepository _listFormFieldRepository; + private readonly IdentityUserManager _identityUserManager; + private readonly IdentityRoleManager _identityRoleManager; + private readonly IConfiguration _configuration; + + public ListFormSeeder_Warehouse( + IRepository listFormRepository, + IRepository listFormFieldRepository, + IdentityUserManager userManager, + IdentityRoleManager roleManager, + IConfiguration configuration) + { + _listFormRepository = listFormRepository; + _listFormFieldRepository = listFormFieldRepository; + _identityUserManager = userManager; + _identityRoleManager = roleManager; + _configuration = configuration; + } + + public async Task SeedAsync(DataSeedContext context) + { + var listFormName = String.Empty; + + #region Warehouse Type + listFormName = AppCodes.Store.WarehouseType; + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) + { + var listForm = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + ShowNote = true, + LayoutJson = DefaultLayoutJson, + CultureName = LanguageCodes.En, + ListFormCode = listFormName, + Name = listFormName, + Title = listFormName, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = listFormName, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WarehouseType)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = DefaultFilterJson, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = DefaultFilterRowJson, + HeaderFilterJson = DefaultHeaderFilterJson, + SearchPanelJson = DefaultSearchPanelJson, + GroupPanelJson = DefaultGroupPanelJson, + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(listFormName), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WarehouseType)), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, 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 = "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 }, + ]} + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region WarehouseType Fields + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + 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, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 350, + ListOrderNo = 3, + 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 = "Description", + Width = 500, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsActive", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + } + ]); + #endregion + } + #endregion + + #region Zone Type + listFormName = AppCodes.Store.ZoneType; + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) + { + var listForm = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + ShowNote = true, + LayoutJson = DefaultLayoutJson, + CultureName = LanguageCodes.En, + ListFormCode = listFormName, + Name = listFormName, + Title = listFormName, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = listFormName, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ZoneType)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = DefaultFilterJson, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = DefaultFilterRowJson, + HeaderFilterJson = DefaultHeaderFilterJson, + SearchPanelJson = DefaultSearchPanelJson, + GroupPanelJson = DefaultGroupPanelJson, + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(listFormName), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ZoneType)), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, 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 = "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 }, + ]} + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region ZoneType Fields + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + 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, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 350, + ListOrderNo = 3, + 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 = "Description", + Width = 500, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsActive", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + } + ]); + #endregion + } + #endregion + + #region Location Type + listFormName = AppCodes.Store.LocationType; + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) + { + var listForm = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + ShowNote = true, + LayoutJson = DefaultLayoutJson, + CultureName = LanguageCodes.En, + ListFormCode = listFormName, + Name = listFormName, + Title = listFormName, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = listFormName, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.LocationType)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = DefaultFilterJson, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = DefaultFilterRowJson, + HeaderFilterJson = DefaultHeaderFilterJson, + SearchPanelJson = DefaultSearchPanelJson, + GroupPanelJson = DefaultGroupPanelJson, + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(listFormName), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LocationType)), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, 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 = "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 }, + ]} + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region ZoneType Fields + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + 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, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 350, + ListOrderNo = 3, + 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 = "Description", + Width = 500, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsActive", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + } + ]); + #endregion + } + #endregion + } +} diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Warehouse.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Warehouse.cs deleted file mode 100644 index bcaef12f..00000000 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Warehouse.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Text.Json; -using System.Threading.Tasks; -using Erp.Languages.Languages; -using Erp.Platform.Entities; -using Erp.Platform.Enums; -using Erp.Platform.ListForms; -using Erp.Platform.Queries; -using Microsoft.Extensions.Configuration; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.Identity; -using Volo.Abp.TenantManagement; -using AbpIdentity = Erp.Platform.Data.Seeds.SeedConsts.AbpIdentity; -using AppCodes = Erp.Platform.Data.Seeds.SeedConsts.AppCodes; -using static Erp.Platform.PlatformConsts; -using static Erp.Platform.PlatformSeeder.SeederDefaults; - -namespace Erp.Platform.Data.Seeds; - -public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependency -{ - private readonly IRepository _listFormRepository; - private readonly IRepository _listFormFieldRepository; - private readonly IdentityUserManager _identityUserManager; - private readonly IdentityRoleManager _identityRoleManager; - private readonly IConfiguration _configuration; - - public ListFormSeeder_Warehouse( - IRepository listFormRepository, - IRepository listFormFieldRepository, - IdentityUserManager userManager, - IdentityRoleManager roleManager, - IConfiguration configuration) - { - _listFormRepository = listFormRepository; - _listFormFieldRepository = listFormFieldRepository; - _identityUserManager = userManager; - _identityRoleManager = roleManager; - _configuration = configuration; - } - - public async Task SeedAsync(DataSeedContext context) - { - var listFormName = String.Empty; - - // #region Workcenter Type - // if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == AppCodes.SupplyChain.MaterialType)) - // { - // var listFormMaterialType = await _listFormRepository.InsertAsync( - // new ListForm() - // { - // ListFormType = ListFormTypeEnum.List, - // IsSubForm = false, - // LayoutJson = DefaultLayoutJson, - // CultureName = LanguageCodes.En, - // ListFormCode = AppCodes.SupplyChain.MaterialType, - // Name = AppCodes.SupplyChain.MaterialType, - // Title = AppCodes.SupplyChain.MaterialType, - // DataSourceCode = SeedConsts.DataSources.DefaultCode, - // IsTenant = true, - // IsBranch = false, - // IsOrganizationUnit = false, - // Description = AppCodes.SupplyChain.MaterialType, - // SelectCommandType = SelectCommandTypeEnum.Table, - // SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType)), - // KeyFieldName = "Id", - // KeyFieldDbSourceType = DbType.Guid, - // DefaultFilter = DefaultFilterJson, - // SortMode = GridOptions.SortModeSingle, - // FilterRowJson = DefaultFilterRowJson, - // HeaderFilterJson = DefaultHeaderFilterJson, - // SearchPanelJson= DefaultSearchPanelJson, - // GroupPanelJson = DefaultGroupPanelJson, - // SelectionJson = DefaultSelectionSingleJson, - // ColumnOptionJson = DefaultColumnOptionJson, - // PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.MaterialType), - // DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaterialType)), - // DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - // PagerOptionJson = DefaultPagerOptionJson, - // EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.MaterialType, 500, 250, 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 = "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 }, - // ]} - // }), - // InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, - // FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - // new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } - // }), - // } - // ); - - // #region MaterialType Fields - // await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - // new() { - // ListFormCode = listFormMaterialType.ListFormCode, - // CultureName = LanguageCodes.En, - // SourceDbType = DbType.Guid, - // FieldName = "Id", - // Width = 100, - // ListOrderNo = 1, - // Visible = false, - // IsActive = true, - // IsDeleted = false, - // ValidationRuleJson = DefaultValidationRuleRequiredJson, - // ColumnCustomizationJson = DefaultColumnCustomizationJson, - // PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType), - // PivotSettingsJson = DefaultPivotSettingsJson - // }, - // new() { - // ListFormCode = listFormMaterialType.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(AppCodes.SupplyChain.MaterialType), - // PivotSettingsJson = DefaultPivotSettingsJson - // }, - // new() { - // ListFormCode = listFormMaterialType.ListFormCode, - // CultureName = LanguageCodes.En, - // SourceDbType = DbType.String, - // FieldName = "Name", - // Width = 350, - // ListOrderNo = 3, - // Visible = true, - // IsActive = true, - // IsDeleted = false, - // SortIndex = 1, - // SortDirection = GridColumnOptions.SortOrderAsc, - // AllowSearch = true, - // ValidationRuleJson = DefaultValidationRuleRequiredJson, - // ColumnCustomizationJson = DefaultColumnCustomizationJson, - // PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType), - // PivotSettingsJson = DefaultPivotSettingsJson - // }, - // new() { - // ListFormCode = listFormMaterialType.ListFormCode, - // CultureName = LanguageCodes.En, - // SourceDbType = DbType.String, - // FieldName = "Description", - // Width = 500, - // ListOrderNo = 4, - // Visible = true, - // IsActive = true, - // IsDeleted = false, - // AllowSearch = true, - // ColumnCustomizationJson = DefaultColumnCustomizationJson, - // PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType), - // PivotSettingsJson = DefaultPivotSettingsJson - // }, - - // new() { - // ListFormCode = listFormMaterialType.ListFormCode, - // CultureName = LanguageCodes.En, - // SourceDbType = DbType.Boolean, - // FieldName = "IsActive", - // Width = 100, - // ListOrderNo = 5, - // Visible = true, - // IsActive = true, - // IsDeleted = false, - // AllowSearch = true, - // ColumnCustomizationJson = DefaultColumnCustomizationJson, - // PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType), - // PivotSettingsJson = DefaultPivotSettingsJson - // } - // }); - // #endregion - // } - // #endregion - } -} diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json b/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json index 1f1fd8b3..4b001a44 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json @@ -2507,8 +2507,8 @@ }, { "ParentCode": null, - "Code": "App.Warehouse", - "DisplayName": "App.Warehouse", + "Code": "App.Store", + "DisplayName": "App.Store", "Order": 1000, "Url": null, "Icon": "FcOpenedFolder", @@ -2516,93 +2516,153 @@ "IsDisabled": false }, { - "ParentCode": "App.Warehouse", - "Code": "App.Warehouse.Definitions", - "DisplayName": "App.Warehouse.Definitions", + "ParentCode": "App.Store", + "Code": "App.Store.WarehouseType", + "DisplayName": "App.Store.WarehouseType", "Order": 1, + "Url": "/admin/list/App.Store.WarehouseType", + "Icon": "FcFactory", + "RequiredPermissionName": "App.Store.WarehouseType", + "IsDisabled": false + }, + { + "ParentCode": "App.Store", + "Code": "App.Store.Warehouse", + "DisplayName": "App.Store.Warehouse", + "Order": 2, + "Url": "/admin/list/App.Store.Warehouse", + "Icon": "FcDepartment", + "RequiredPermissionName": "App.Store.Warehouse", + "IsDisabled": false + }, + { + "ParentCode": "App.Store", + "Code": "App.Store.ZoneType", + "DisplayName": "App.Store.ZoneType", + "Order": 3, + "Url": "/admin/list/App.Store.ZoneType", + "Icon": "FcTreeStructure", + "RequiredPermissionName": "App.Store.ZoneType", + "IsDisabled": false + }, + { + "ParentCode": "App.Store", + "Code": "App.Store.Zone", + "DisplayName": "App.Store.Zone", + "Order": 4, + "Url": "/admin/list/App.Store.Zone", + "Icon": "FcOvertime", + "RequiredPermissionName": "App.Store.Zone", + "IsDisabled": false + }, + { + "ParentCode": "App.Store", + "Code": "App.Store.LocationType", + "DisplayName": "App.Store.LocationType", + "Order": 5, + "Url": "/admin/list/App.Store.LocationType", + "Icon": "FcInspection", + "RequiredPermissionName": "App.Store.LocationType", + "IsDisabled": false + }, + { + "ParentCode": "App.Store", + "Code": "App.Store.Location", + "DisplayName": "App.Store.Location", + "Order": 6, + "Url": "/admin/list/App.Store.Location", + "Icon": "FcGrid", + "RequiredPermissionName": "App.Store.Location", + "IsDisabled": false + }, + { + "ParentCode": "App.Store", + "Code": "App.Store.Definitions", + "DisplayName": "App.Store.Definitions", + "Order": 7, "Url": "/admin/warehouse/definitions", "Icon": "FcTodoList", - "RequiredPermissionName": "App.Warehouse.Definitions", + "RequiredPermissionName": "App.Store.Definitions", "IsDisabled": false }, { - "ParentCode": "App.Warehouse", - "Code": "App.Warehouse.Tracking", - "DisplayName": "App.Warehouse.Tracking", - "Order": 2, + "ParentCode": "App.Store", + "Code": "App.Store.Tracking", + "DisplayName": "App.Store.Tracking", + "Order": 8, "Url": "/admin/warehouse/tracking", "Icon": "FcSearch", - "RequiredPermissionName": "App.Warehouse.Tracking", + "RequiredPermissionName": "App.Store.Tracking", "IsDisabled": false }, { - "ParentCode": "App.Warehouse", - "Code": "App.Warehouse.Putaway", - "DisplayName": "App.Warehouse.Putaway", - "Order": 3, + "ParentCode": "App.Store", + "Code": "App.Store.Putaway", + "DisplayName": "App.Store.Putaway", + "Order": 9, "Url": "/admin/warehouse/putaway", "Icon": "FcCompactCamera", - "RequiredPermissionName": "App.Warehouse.Putaway", + "RequiredPermissionName": "App.Store.Putaway", "IsDisabled": false }, { - "ParentCode": "App.Warehouse", - "Code": "App.Warehouse.Receipt", - "DisplayName": "App.Warehouse.Receipt", - "Order": 4, + "ParentCode": "App.Store", + "Code": "App.Store.Receipt", + "DisplayName": "App.Store.Receipt", + "Order": 10, "Url": "/admin/warehouse/receipt", "Icon": "FcImport", - "RequiredPermissionName": "App.Warehouse.Receipt", + "RequiredPermissionName": "App.Store.Receipt", "IsDisabled": false }, { - "ParentCode": "App.Warehouse", - "Code": "App.Warehouse.Issue", - "DisplayName": "App.Warehouse.Issue", - "Order": 5, + "ParentCode": "App.Store", + "Code": "App.Store.Issue", + "DisplayName": "App.Store.Issue", + "Order": 11, "Url": "/admin/warehouse/issue", "Icon": "FcExport", - "RequiredPermissionName": "App.Warehouse.Issue", + "RequiredPermissionName": "App.Store.Issue", "IsDisabled": false }, { - "ParentCode": "App.Warehouse", - "Code": "App.Warehouse.Transfer", - "DisplayName": "App.Warehouse.Transfer", - "Order": 6, + "ParentCode": "App.Store", + "Code": "App.Store.Transfer", + "DisplayName": "App.Store.Transfer", + "Order": 12, "Url": "/admin/warehouse/transfer", "Icon": "FcSynchronize", - "RequiredPermissionName": "App.Warehouse.Transfer", + "RequiredPermissionName": "App.Store.Transfer", "IsDisabled": false }, { - "ParentCode": "App.Warehouse", - "Code": "App.Warehouse.Inventory", - "DisplayName": "App.Warehouse.Inventory", - "Order": 7, + "ParentCode": "App.Store", + "Code": "App.Store.Inventory", + "DisplayName": "App.Store.Inventory", + "Order": 13, "Url": "/admin/warehouse/inventory", "Icon": "FcInspection", - "RequiredPermissionName": "App.Warehouse.Inventory", + "RequiredPermissionName": "App.Store.Inventory", "IsDisabled": false }, { - "ParentCode": "App.Warehouse", - "Code": "App.Warehouse.Movements", - "DisplayName": "App.Warehouse.Movements", - "Order": 8, + "ParentCode": "App.Store", + "Code": "App.Store.Movements", + "DisplayName": "App.Store.Movements", + "Order": 14, "Url": "/admin/warehouse/movements", "Icon": "FcParallelTasks", - "RequiredPermissionName": "App.Warehouse.Movements", + "RequiredPermissionName": "App.Store.Movements", "IsDisabled": false }, { - "ParentCode": "App.Warehouse", - "Code": "App.Warehouse.Stocklevel", - "DisplayName": "App.Warehouse.Stocklevel", - "Order": 9, + "ParentCode": "App.Store", + "Code": "App.Store.Stocklevel", + "DisplayName": "App.Store.Stocklevel", + "Order": 15, "Url": "/admin/warehouse/stocklevel", "Icon": "FcViewDetails", - "RequiredPermissionName": "App.Warehouse.Stocklevel", + "RequiredPermissionName": "App.Store.Stocklevel", "IsDisabled": false }, { diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json b/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json index 70596777..b0bf7188 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json @@ -37,8 +37,8 @@ "DisplayName": "App.Maintenance" }, { - "Name": "App.Warehouse", - "DisplayName": "App.Warehouse" + "Name": "App.Store", + "DisplayName": "App.Store" }, { "Name": "App.Projects", @@ -7196,567 +7196,945 @@ "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Definitions", + "GroupName": "App.Store", + "Name": "App.Store.WarehouseType", "ParentName": null, - "DisplayName": "App.Warehouse.Definitions", + "DisplayName": "App.Store.WarehouseType", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Definitions.Create", - "ParentName": "App.Warehouse.Definitions", + "GroupName": "App.Store", + "Name": "App.Store.WarehouseType.Create", + "ParentName": "App.Store.WarehouseType", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Definitions.Update", - "ParentName": "App.Warehouse.Definitions", + "GroupName": "App.Store", + "Name": "App.Store.WarehouseType.Update", + "ParentName": "App.Store.WarehouseType", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Definitions.Delete", - "ParentName": "App.Warehouse.Definitions", + "GroupName": "App.Store", + "Name": "App.Store.WarehouseType.Delete", + "ParentName": "App.Store.WarehouseType", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Definitions.Export", - "ParentName": "App.Warehouse.Definitions", + "GroupName": "App.Store", + "Name": "App.Store.WarehouseType.Export", + "ParentName": "App.Store.WarehouseType", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Definitions.Import", - "ParentName": "App.Warehouse.Definitions", + "GroupName": "App.Store", + "Name": "App.Store.WarehouseType.Import", + "ParentName": "App.Store.WarehouseType", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Definitions.Note", - "ParentName": "App.Warehouse.Definitions", + "GroupName": "App.Store", + "Name": "App.Store.WarehouseType.Note", + "ParentName": "App.Store.WarehouseType", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Tracking", + "GroupName": "App.Store", + "Name": "App.Store.Warehouse", "ParentName": null, - "DisplayName": "App.Warehouse.Tracking", + "DisplayName": "App.Store.Warehouse", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Tracking.Create", - "ParentName": "App.Warehouse.Tracking", + "GroupName": "App.Store", + "Name": "App.Store.Warehouse.Create", + "ParentName": "App.Store.Warehouse", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Tracking.Update", - "ParentName": "App.Warehouse.Tracking", + "GroupName": "App.Store", + "Name": "App.Store.Warehouse.Update", + "ParentName": "App.Store.Warehouse", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Tracking.Delete", - "ParentName": "App.Warehouse.Tracking", + "GroupName": "App.Store", + "Name": "App.Store.Warehouse.Delete", + "ParentName": "App.Store.Warehouse", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Tracking.Export", - "ParentName": "App.Warehouse.Tracking", + "GroupName": "App.Store", + "Name": "App.Store.Warehouse.Export", + "ParentName": "App.Store.Warehouse", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Tracking.Import", - "ParentName": "App.Warehouse.Tracking", + "GroupName": "App.Store", + "Name": "App.Store.Warehouse.Import", + "ParentName": "App.Store.Warehouse", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Tracking.Note", - "ParentName": "App.Warehouse.Tracking", + "GroupName": "App.Store", + "Name": "App.Store.Warehouse.Note", + "ParentName": "App.Store.Warehouse", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Putaway", + "GroupName": "App.Store", + "Name": "App.Store.ZoneType", "ParentName": null, - "DisplayName": "App.Warehouse.Putaway", + "DisplayName": "App.Store.ZoneType", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Putaway.Create", - "ParentName": "App.Warehouse.Putaway", + "GroupName": "App.Store", + "Name": "App.Store.ZoneType.Create", + "ParentName": "App.Store.ZoneType", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Putaway.Update", - "ParentName": "App.Warehouse.Putaway", + "GroupName": "App.Store", + "Name": "App.Store.ZoneType.Update", + "ParentName": "App.Store.ZoneType", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Putaway.Delete", - "ParentName": "App.Warehouse.Putaway", + "GroupName": "App.Store", + "Name": "App.Store.ZoneType.Delete", + "ParentName": "App.Store.ZoneType", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Putaway.Export", - "ParentName": "App.Warehouse.Putaway", + "GroupName": "App.Store", + "Name": "App.Store.ZoneType.Export", + "ParentName": "App.Store.ZoneType", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Putaway.Import", - "ParentName": "App.Warehouse.Putaway", + "GroupName": "App.Store", + "Name": "App.Store.ZoneType.Import", + "ParentName": "App.Store.ZoneType", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Putaway.Note", - "ParentName": "App.Warehouse.Putaway", + "GroupName": "App.Store", + "Name": "App.Store.ZoneType.Note", + "ParentName": "App.Store.ZoneType", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Receipt", + "GroupName": "App.Store", + "Name": "App.Store.Zone", "ParentName": null, - "DisplayName": "App.Warehouse.Receipt", + "DisplayName": "App.Store.Zone", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Receipt.Create", - "ParentName": "App.Warehouse.Receipt", + "GroupName": "App.Store", + "Name": "App.Store.Zone.Create", + "ParentName": "App.Store.Zone", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Receipt.Update", - "ParentName": "App.Warehouse.Receipt", + "GroupName": "App.Store", + "Name": "App.Store.Zone.Update", + "ParentName": "App.Store.Zone", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Receipt.Delete", - "ParentName": "App.Warehouse.Receipt", + "GroupName": "App.Store", + "Name": "App.Store.Zone.Delete", + "ParentName": "App.Store.Zone", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Receipt.Export", - "ParentName": "App.Warehouse.Receipt", + "GroupName": "App.Store", + "Name": "App.Store.Zone.Export", + "ParentName": "App.Store.Zone", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Receipt.Import", - "ParentName": "App.Warehouse.Receipt", + "GroupName": "App.Store", + "Name": "App.Store.Zone.Import", + "ParentName": "App.Store.Zone", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Receipt.Note", - "ParentName": "App.Warehouse.Receipt", + "GroupName": "App.Store", + "Name": "App.Store.Zone.Note", + "ParentName": "App.Store.Zone", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Issue", + "GroupName": "App.Store", + "Name": "App.Store.LocationType", "ParentName": null, - "DisplayName": "App.Warehouse.Issue", + "DisplayName": "App.Store.LocationType", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Issue.Create", - "ParentName": "App.Warehouse.Issue", + "GroupName": "App.Store", + "Name": "App.Store.LocationType.Create", + "ParentName": "App.Store.LocationType", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Issue.Update", - "ParentName": "App.Warehouse.Issue", + "GroupName": "App.Store", + "Name": "App.Store.LocationType.Update", + "ParentName": "App.Store.LocationType", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Issue.Delete", - "ParentName": "App.Warehouse.Issue", + "GroupName": "App.Store", + "Name": "App.Store.LocationType.Delete", + "ParentName": "App.Store.LocationType", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Issue.Export", - "ParentName": "App.Warehouse.Issue", + "GroupName": "App.Store", + "Name": "App.Store.LocationType.Export", + "ParentName": "App.Store.LocationType", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Issue.Import", - "ParentName": "App.Warehouse.Issue", + "GroupName": "App.Store", + "Name": "App.Store.LocationType.Import", + "ParentName": "App.Store.LocationType", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Issue.Note", - "ParentName": "App.Warehouse.Issue", + "GroupName": "App.Store", + "Name": "App.Store.LocationType.Note", + "ParentName": "App.Store.LocationType", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Transfer", + "GroupName": "App.Store", + "Name": "App.Store.Location", "ParentName": null, - "DisplayName": "App.Warehouse.Transfer", + "DisplayName": "App.Store.Location", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Transfer.Create", - "ParentName": "App.Warehouse.Transfer", + "GroupName": "App.Store", + "Name": "App.Store.Location.Create", + "ParentName": "App.Store.Location", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Transfer.Update", - "ParentName": "App.Warehouse.Transfer", + "GroupName": "App.Store", + "Name": "App.Store.Location.Update", + "ParentName": "App.Store.Location", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Transfer.Delete", - "ParentName": "App.Warehouse.Transfer", + "GroupName": "App.Store", + "Name": "App.Store.Location.Delete", + "ParentName": "App.Store.Location", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Transfer.Export", - "ParentName": "App.Warehouse.Transfer", + "GroupName": "App.Store", + "Name": "App.Store.Location.Export", + "ParentName": "App.Store.Location", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Transfer.Import", - "ParentName": "App.Warehouse.Transfer", + "GroupName": "App.Store", + "Name": "App.Store.Location.Import", + "ParentName": "App.Store.Location", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Transfer.Note", - "ParentName": "App.Warehouse.Transfer", + "GroupName": "App.Store", + "Name": "App.Store.Location.Note", + "ParentName": "App.Store.Location", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Inventory", + "GroupName": "App.Store", + "Name": "App.Store.Definitions", "ParentName": null, - "DisplayName": "App.Warehouse.Inventory", + "DisplayName": "App.Store.Definitions", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Inventory.Create", - "ParentName": "App.Warehouse.Inventory", + "GroupName": "App.Store", + "Name": "App.Store.Definitions.Create", + "ParentName": "App.Store.Definitions", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Inventory.Update", - "ParentName": "App.Warehouse.Inventory", + "GroupName": "App.Store", + "Name": "App.Store.Definitions.Update", + "ParentName": "App.Store.Definitions", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Inventory.Delete", - "ParentName": "App.Warehouse.Inventory", + "GroupName": "App.Store", + "Name": "App.Store.Definitions.Delete", + "ParentName": "App.Store.Definitions", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Inventory.Export", - "ParentName": "App.Warehouse.Inventory", + "GroupName": "App.Store", + "Name": "App.Store.Definitions.Export", + "ParentName": "App.Store.Definitions", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Inventory.Import", - "ParentName": "App.Warehouse.Inventory", + "GroupName": "App.Store", + "Name": "App.Store.Definitions.Import", + "ParentName": "App.Store.Definitions", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Inventory.Note", - "ParentName": "App.Warehouse.Inventory", + "GroupName": "App.Store", + "Name": "App.Store.Definitions.Note", + "ParentName": "App.Store.Definitions", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Movements", + "GroupName": "App.Store", + "Name": "App.Store.Tracking", "ParentName": null, - "DisplayName": "App.Warehouse.Movements", + "DisplayName": "App.Store.Tracking", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Movements.Create", - "ParentName": "App.Warehouse.Movements", + "GroupName": "App.Store", + "Name": "App.Store.Tracking.Create", + "ParentName": "App.Store.Tracking", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Movements.Update", - "ParentName": "App.Warehouse.Movements", + "GroupName": "App.Store", + "Name": "App.Store.Tracking.Update", + "ParentName": "App.Store.Tracking", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Movements.Delete", - "ParentName": "App.Warehouse.Movements", + "GroupName": "App.Store", + "Name": "App.Store.Tracking.Delete", + "ParentName": "App.Store.Tracking", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Movements.Export", - "ParentName": "App.Warehouse.Movements", + "GroupName": "App.Store", + "Name": "App.Store.Tracking.Export", + "ParentName": "App.Store.Tracking", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Movements.Import", - "ParentName": "App.Warehouse.Movements", + "GroupName": "App.Store", + "Name": "App.Store.Tracking.Import", + "ParentName": "App.Store.Tracking", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Movements.Note", - "ParentName": "App.Warehouse.Movements", + "GroupName": "App.Store", + "Name": "App.Store.Tracking.Note", + "ParentName": "App.Store.Tracking", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Stocklevel", + "GroupName": "App.Store", + "Name": "App.Store.Putaway", "ParentName": null, - "DisplayName": "App.Warehouse.Stocklevel", + "DisplayName": "App.Store.Putaway", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Stocklevel.Create", - "ParentName": "App.Warehouse.Stocklevel", + "GroupName": "App.Store", + "Name": "App.Store.Putaway.Create", + "ParentName": "App.Store.Putaway", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Stocklevel.Update", - "ParentName": "App.Warehouse.Stocklevel", + "GroupName": "App.Store", + "Name": "App.Store.Putaway.Update", + "ParentName": "App.Store.Putaway", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Stocklevel.Delete", - "ParentName": "App.Warehouse.Stocklevel", + "GroupName": "App.Store", + "Name": "App.Store.Putaway.Delete", + "ParentName": "App.Store.Putaway", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Stocklevel.Export", - "ParentName": "App.Warehouse.Stocklevel", + "GroupName": "App.Store", + "Name": "App.Store.Putaway.Export", + "ParentName": "App.Store.Putaway", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Stocklevel.Import", - "ParentName": "App.Warehouse.Stocklevel", + "GroupName": "App.Store", + "Name": "App.Store.Putaway.Import", + "ParentName": "App.Store.Putaway", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { - "GroupName": "App.Warehouse", - "Name": "App.Warehouse.Stocklevel.Note", - "ParentName": "App.Warehouse.Stocklevel", + "GroupName": "App.Store", + "Name": "App.Store.Putaway.Note", + "ParentName": "App.Store.Putaway", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Receipt", + "ParentName": null, + "DisplayName": "App.Store.Receipt", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Receipt.Create", + "ParentName": "App.Store.Receipt", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Receipt.Update", + "ParentName": "App.Store.Receipt", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Receipt.Delete", + "ParentName": "App.Store.Receipt", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Receipt.Export", + "ParentName": "App.Store.Receipt", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Receipt.Import", + "ParentName": "App.Store.Receipt", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Receipt.Note", + "ParentName": "App.Store.Receipt", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Issue", + "ParentName": null, + "DisplayName": "App.Store.Issue", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Issue.Create", + "ParentName": "App.Store.Issue", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Issue.Update", + "ParentName": "App.Store.Issue", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Issue.Delete", + "ParentName": "App.Store.Issue", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Issue.Export", + "ParentName": "App.Store.Issue", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Issue.Import", + "ParentName": "App.Store.Issue", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Issue.Note", + "ParentName": "App.Store.Issue", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Transfer", + "ParentName": null, + "DisplayName": "App.Store.Transfer", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Transfer.Create", + "ParentName": "App.Store.Transfer", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Transfer.Update", + "ParentName": "App.Store.Transfer", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Transfer.Delete", + "ParentName": "App.Store.Transfer", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Transfer.Export", + "ParentName": "App.Store.Transfer", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Transfer.Import", + "ParentName": "App.Store.Transfer", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Transfer.Note", + "ParentName": "App.Store.Transfer", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Inventory", + "ParentName": null, + "DisplayName": "App.Store.Inventory", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Inventory.Create", + "ParentName": "App.Store.Inventory", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Inventory.Update", + "ParentName": "App.Store.Inventory", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Inventory.Delete", + "ParentName": "App.Store.Inventory", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Inventory.Export", + "ParentName": "App.Store.Inventory", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Inventory.Import", + "ParentName": "App.Store.Inventory", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Inventory.Note", + "ParentName": "App.Store.Inventory", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Movements", + "ParentName": null, + "DisplayName": "App.Store.Movements", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Movements.Create", + "ParentName": "App.Store.Movements", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Movements.Update", + "ParentName": "App.Store.Movements", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Movements.Delete", + "ParentName": "App.Store.Movements", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Movements.Export", + "ParentName": "App.Store.Movements", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Movements.Import", + "ParentName": "App.Store.Movements", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Movements.Note", + "ParentName": "App.Store.Movements", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Stocklevel", + "ParentName": null, + "DisplayName": "App.Store.Stocklevel", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Stocklevel.Create", + "ParentName": "App.Store.Stocklevel", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Stocklevel.Update", + "ParentName": "App.Store.Stocklevel", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Stocklevel.Delete", + "ParentName": "App.Store.Stocklevel", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Stocklevel.Export", + "ParentName": "App.Store.Stocklevel", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Stocklevel.Import", + "ParentName": "App.Store.Stocklevel", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Store", + "Name": "App.Store.Stocklevel.Note", + "ParentName": "App.Store.Stocklevel", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, diff --git a/api/src/Erp.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs b/api/src/Erp.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs index e272b9f3..dca02e0d 100644 --- a/api/src/Erp.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs +++ b/api/src/Erp.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs @@ -13,7 +13,7 @@ public enum MenuPrefix Crm, SupplyChain, Maintenance, - Warehouse, + Store, Project, Hr, Mrp, @@ -35,7 +35,7 @@ public static class MenuPrefixExtensions MenuPrefix.Crm => "Crm", MenuPrefix.SupplyChain => "Scp", MenuPrefix.Maintenance => "Mnt", - MenuPrefix.Warehouse => "Wh", + MenuPrefix.Store => "Str", MenuPrefix.Project => "Prj", MenuPrefix.Hr => "Hr", MenuPrefix.Mrp => "Mrp", diff --git a/api/src/Erp.Platform.Domain.Shared/Enums/TableNameEnum.cs b/api/src/Erp.Platform.Domain.Shared/Enums/TableNameEnum.cs index 1590f659..05c34e2b 100644 --- a/api/src/Erp.Platform.Domain.Shared/Enums/TableNameEnum.cs +++ b/api/src/Erp.Platform.Domain.Shared/Enums/TableNameEnum.cs @@ -170,5 +170,11 @@ public enum TableNameEnum FaultType, WorkorderType, WorkorderStatus, - Workorder + Workorder, + WarehouseType, + Warehouse, + ZoneType, + Zone, + LocationType, + Location, } diff --git a/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs b/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs index f269f8ac..f3a71fac 100644 --- a/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs +++ b/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs @@ -205,6 +205,14 @@ public static class TableNameResolver { nameof(TableNameEnum.Bank), (TablePrefix.TenantByName, MenuPrefix.Accounting) }, { nameof(TableNameEnum.BankAccount), (TablePrefix.TenantByName, MenuPrefix.Accounting) }, + // 🔹 STORE + { nameof(TableNameEnum.WarehouseType), (TablePrefix.TenantByName, MenuPrefix.Store) }, + { nameof(TableNameEnum.Warehouse), (TablePrefix.TenantByName, MenuPrefix.Store) }, + { nameof(TableNameEnum.ZoneType), (TablePrefix.TenantByName, MenuPrefix.Store) }, + { nameof(TableNameEnum.Zone), (TablePrefix.TenantByName, MenuPrefix.Store) }, + { nameof(TableNameEnum.LocationType), (TablePrefix.TenantByName, MenuPrefix.Store) }, + { nameof(TableNameEnum.Location), (TablePrefix.TenantByName, MenuPrefix.Store) }, + }; public static string GetFullTableName(string tableName) diff --git a/api/src/Erp.Platform.Domain/Data/SeedConsts.cs b/api/src/Erp.Platform.Domain/Data/SeedConsts.cs index b4560c7f..22a9d6f1 100644 --- a/api/src/Erp.Platform.Domain/Data/SeedConsts.cs +++ b/api/src/Erp.Platform.Domain/Data/SeedConsts.cs @@ -543,6 +543,17 @@ public static class SeedConsts public const string Bank = Default + ".Bank"; public const string BankAccount = Default + ".BankAccount"; } + + public static class Store + { + public const string Default = Prefix.App + ".Store"; + public const string WarehouseType = Default + ".WarehouseType"; + public const string Warehouse = Default + ".Warehouse"; + public const string ZoneType = Default + ".ZoneType"; + public const string Zone = Default + ".Zone"; + public const string LocationType = Default + ".LocationType"; + public const string Location = Default + ".Location"; + } } public static class DataSources 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 531b63b0..9491cd4c 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs @@ -76,6 +76,7 @@ public class Employee : FullAuditedEntity, IMultiTenant public ICollection Partners { get; set; } public ICollection BlogPosts { get; set; } public ICollection Opportunities { get; set; } + public ICollection Warehouses { 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 new file mode 100644 index 00000000..e998949f --- /dev/null +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs @@ -0,0 +1,28 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Erp.Platform.Entities; + +public class Location : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public Guid WarehouseId { get; set; } + public Warehouse Warehouse { get; set; } + + public Guid ZoneId { get; set; } + public Zone Zone { get; set; } + + public string Code { get; set; } + public string Name { get; set; } + public string Description { get; set; } + + public Guid LocationTypeId { get; set; } + public LocationType LocationType { get; set; } + + public int Capacity { get; set; } + public int CurrentStock { get; set; } + + public bool IsActive { 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 new file mode 100644 index 00000000..5be20a4e --- /dev/null +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Erp.Platform.Entities; + +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; } + + public ICollection Locations { 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 new file mode 100644 index 00000000..775940f7 --- /dev/null +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Erp.Platform.Entities; + +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; } + public Guid EmployeeId { get; set; } + public Employee Employee { get; set; } + + public string Country { get; set; } + public string City { get; set; } + public string District { get; set; } + public string Township { get; set; } + public string PostalCode { get; set; } + + public Guid WarehouseTypeId { get; set; } + public WarehouseType WarehouseType { get; set; } + + public bool IsMainWarehouse { get; set; } + public int Capacity { get; set; } + public bool IsActive { get; set; } + public bool TemperatureControlled { get; set; } + public int SecurityLevel { get; set; } + + public ICollection Zones { get; set; } + public ICollection Locations { 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 new file mode 100644 index 00000000..5ccb92e2 --- /dev/null +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Erp.Platform.Entities; + +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; } + + public ICollection Warehouses { 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 new file mode 100644 index 00000000..1eb40b30 --- /dev/null +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Erp.Platform.Entities; + +public class Zone : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public Guid WarehouseId { get; set; } + public Warehouse Warehouse { get; set; } + + public string Code { get; set; } + public string Name { get; set; } + public string Description { get; set; } + + public Guid ZoneTypeId { get; set; } + public ZoneType ZoneType { get; set; } + + public int? Temperature { get; set; } //Sıcaklık + public int? Humidity { get; set; } //Nem + public bool IsActive { get; set; } + + public ICollection Locations { 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 new file mode 100644 index 00000000..9ae38a2c --- /dev/null +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Erp.Platform.Entities; + +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; } + + public ICollection Zones { get; set; } +} + diff --git a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 1892d054..80c11b19 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -230,6 +230,15 @@ public class PlatformDbContext : public DbSet BankAccounts { get; set; } #endregion + #region Store + public DbSet WarehouseTypes { get; set; } + public DbSet Warehouses { get; set; } + public DbSet ZoneTypes { get; set; } + public DbSet Zones { get; set; } + public DbSet LocationTypes { get; set; } + public DbSet Locations { get; set; } + #endregion + #region Maintenance public DbSet WorkcenterTypes { get; set; } public DbSet WorkcenterStatuses { get; set; } @@ -2868,5 +2877,129 @@ public class PlatformDbContext : b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WarehouseType)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Name).IsRequired().HasMaxLength(50); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.IsActive).HasDefaultValue(true); + }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Warehouse)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Name).IsRequired().HasMaxLength(200); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.EmployeeId).IsRequired(); + + b.Property(x => x.WarehouseTypeId).IsRequired(); + + b.Property(x => x.Country).HasMaxLength(100); + b.Property(x => x.City).HasMaxLength(100); + b.Property(x => x.District).HasMaxLength(200); + b.Property(x => x.Township).HasMaxLength(100); + b.Property(x => x.PostalCode).HasMaxLength(20); + + b.Property(x => x.IsMainWarehouse).HasDefaultValue(false); + b.Property(x => x.Capacity).HasDefaultValue(0); + b.Property(x => x.IsActive).HasDefaultValue(true); + b.Property(x => x.TemperatureControlled).HasDefaultValue(false); + b.Property(x => x.SecurityLevel).HasDefaultValue(1); + + b.HasOne(x => x.WarehouseType) + .WithMany(x => x.Warehouses) + .HasForeignKey(x => x.WarehouseTypeId) + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Employee) + .WithMany(x => x.Warehouses) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); + }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ZoneType)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Name).IsRequired().HasMaxLength(50); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.IsActive).HasDefaultValue(true); + }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Zone)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.WarehouseId).IsRequired(); + b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Name).IsRequired().HasMaxLength(50); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.ZoneTypeId).IsRequired(); + b.Property(x => x.Temperature).HasDefaultValue(0); + b.Property(x => x.Humidity).HasDefaultValue(0); + b.Property(x => x.IsActive).HasDefaultValue(true); + + b.HasOne(x => x.ZoneType) + .WithMany(x => x.Zones) + .HasForeignKey(x => x.ZoneTypeId) + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Warehouse) + .WithMany(x => x.Zones) + .HasForeignKey(x => x.WarehouseId) + .OnDelete(DeleteBehavior.Restrict); + }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.LocationType)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Name).IsRequired().HasMaxLength(50); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.IsActive).HasDefaultValue(true); + }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Location)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.WarehouseId).IsRequired(); + b.Property(x => x.ZoneId).IsRequired(); + b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Name).IsRequired().HasMaxLength(50); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.LocationTypeId).IsRequired(); + b.Property(x => x.Capacity).HasDefaultValue(0); + b.Property(x => x.CurrentStock).HasDefaultValue(0); + b.Property(x => x.IsActive).HasDefaultValue(true); + + b.HasOne(x => x.LocationType) + .WithMany(x => x.Locations) + .HasForeignKey(x => x.LocationTypeId) + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Warehouse) + .WithMany(x => x.Locations) + .HasForeignKey(x => x.WarehouseId) + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Zone) + .WithMany(x => x.Locations) + .HasForeignKey(x => x.ZoneId) + .OnDelete(DeleteBehavior.Restrict); + }); } } diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124190041_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124204213_Initial.Designer.cs similarity index 96% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124190041_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124204213_Initial.Designer.cs index a181c6f0..131117b1 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124190041_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124204213_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251124190041_Initial")] + [Migration("20251124204213_Initial")] partial class Initial { /// @@ -6075,6 +6075,157 @@ namespace Erp.Platform.Migrations b.ToTable("Sas_H_ListFormImportExecute", (string)null); }); + modelBuilder.Entity("Erp.Platform.Entities.Location", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Capacity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrentStock") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseId") + .HasColumnType("uniqueidentifier"); + + b.Property("ZoneId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("LocationTypeId"); + + b.HasIndex("WarehouseId"); + + b.HasIndex("ZoneId"); + + b.ToTable("Str_T_Location", (string)null); + }); + + modelBuilder.Entity("Erp.Platform.Entities.LocationType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Str_T_LocationType", (string)null); + }); + modelBuilder.Entity("Erp.Platform.Entities.LogEntry", b => { b.Property("Id") @@ -11869,6 +12020,182 @@ namespace Erp.Platform.Migrations b.ToTable("Net_T_Visitor", (string)null); }); + modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Capacity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("City") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Country") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("District") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsMainWarehouse") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("PostalCode") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("SecurityLevel") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("TemperatureControlled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Township") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("WarehouseTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("WarehouseTypeId"); + + b.ToTable("Str_T_Warehouse", (string)null); + }); + + modelBuilder.Entity("Erp.Platform.Entities.WarehouseType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Str_T_WarehouseType", (string)null); + }); + modelBuilder.Entity("Erp.Platform.Entities.WorkHour", b => { b.Property("Id") @@ -12257,6 +12584,152 @@ namespace Erp.Platform.Migrations b.ToTable("Mnt_T_WorkcenterType", (string)null); }); + modelBuilder.Entity("Erp.Platform.Entities.Zone", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Humidity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Temperature") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseId") + .HasColumnType("uniqueidentifier"); + + b.Property("ZoneTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("WarehouseId"); + + b.HasIndex("ZoneTypeId"); + + b.ToTable("Str_T_Zone", (string)null); + }); + + modelBuilder.Entity("Erp.Platform.Entities.ZoneType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Str_T_ZoneType", (string)null); + }); + modelBuilder.Entity("Erp.Platform.Forum.ForumCategory", b => { b.Property("Id") @@ -14997,6 +15470,33 @@ namespace Erp.Platform.Migrations .IsRequired(); }); + modelBuilder.Entity("Erp.Platform.Entities.Location", b => + { + b.HasOne("Erp.Platform.Entities.LocationType", "LocationType") + .WithMany("Locations") + .HasForeignKey("LocationTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse") + .WithMany("Locations") + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Erp.Platform.Entities.Zone", "Zone") + .WithMany("Locations") + .HasForeignKey("ZoneId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("LocationType"); + + b.Navigation("Warehouse"); + + b.Navigation("Zone"); + }); + modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlan", b => { b.HasOne("Erp.Platform.Entities.Workcenter", "WorkCenter") @@ -15666,6 +16166,25 @@ namespace Erp.Platform.Migrations b.Navigation("Employee"); }); + modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => + { + b.HasOne("Erp.Platform.Entities.Employee", "Employee") + .WithMany("Warehouses") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Erp.Platform.Entities.WarehouseType", "WarehouseType") + .WithMany("Warehouses") + .HasForeignKey("WarehouseTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("WarehouseType"); + }); + modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") @@ -15708,6 +16227,25 @@ namespace Erp.Platform.Migrations b.Navigation("Workcenter"); }); + modelBuilder.Entity("Erp.Platform.Entities.Zone", b => + { + b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse") + .WithMany("Zones") + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Erp.Platform.Entities.ZoneType", "ZoneType") + .WithMany("Zones") + .HasForeignKey("ZoneTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Warehouse"); + + b.Navigation("ZoneType"); + }); + modelBuilder.Entity("Erp.Platform.Forum.ForumPost", b => { b.HasOne("Erp.Platform.Forum.ForumPost", "ParentPost") @@ -16006,6 +16544,8 @@ namespace Erp.Platform.Migrations b.Navigation("SurveyResponses"); b.Navigation("Visitors"); + + b.Navigation("Warehouses"); }); modelBuilder.Entity("Erp.Platform.Entities.Event", b => @@ -16035,6 +16575,11 @@ namespace Erp.Platform.Migrations b.Navigation("Faults"); }); + modelBuilder.Entity("Erp.Platform.Entities.LocationType", b => + { + b.Navigation("Locations"); + }); + modelBuilder.Entity("Erp.Platform.Entities.LossReason", b => { b.Navigation("Opportunities"); @@ -16234,6 +16779,18 @@ namespace Erp.Platform.Migrations b.Navigation("Uoms"); }); + modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => + { + b.Navigation("Locations"); + + b.Navigation("Zones"); + }); + + modelBuilder.Entity("Erp.Platform.Entities.WarehouseType", b => + { + b.Navigation("Warehouses"); + }); + modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { b.Navigation("Specifications"); @@ -16249,6 +16806,16 @@ namespace Erp.Platform.Migrations b.Navigation("Workcenters"); }); + modelBuilder.Entity("Erp.Platform.Entities.Zone", b => + { + b.Navigation("Locations"); + }); + + modelBuilder.Entity("Erp.Platform.Entities.ZoneType", b => + { + b.Navigation("Zones"); + }); + modelBuilder.Entity("Erp.Platform.Forum.ForumCategory", b => { b.Navigation("Topics"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124190041_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124204213_Initial.cs similarity index 96% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124190041_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124204213_Initial.cs index 3f4c5ed1..aa1accc7 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124190041_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251124204213_Initial.cs @@ -2569,6 +2569,75 @@ namespace Erp.Platform.Migrations table.PrimaryKey("PK_Scp_T_SupplyType", x => x.Id); }); + migrationBuilder.CreateTable( + name: "Str_T_LocationType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Str_T_LocationType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Str_T_WarehouseType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Str_T_WarehouseType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Str_T_ZoneType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Str_T_ZoneType", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AbpAuditLogActions", columns: table => new @@ -5581,6 +5650,52 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Str_T_Warehouse", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), + Country = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + City = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + District = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Township = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + PostalCode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + WarehouseTypeId = table.Column(type: "uniqueidentifier", nullable: false), + IsMainWarehouse = table.Column(type: "bit", nullable: false, defaultValue: false), + Capacity = table.Column(type: "int", nullable: false, defaultValue: 0), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + TemperatureControlled = table.Column(type: "bit", nullable: false, defaultValue: false), + SecurityLevel = table.Column(type: "int", nullable: false, defaultValue: 1), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Str_T_Warehouse", x => x.Id); + table.ForeignKey( + name: "FK_Str_T_Warehouse_Hr_T_Employee_EmployeeId", + column: x => x.EmployeeId, + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Str_T_Warehouse_Str_T_WarehouseType_WarehouseTypeId", + column: x => x.WarehouseTypeId, + principalTable: "Str_T_WarehouseType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "Mnt_T_PlanEmployee", columns: table => new @@ -5962,6 +6077,45 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Str_T_Zone", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + WarehouseId = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + ZoneTypeId = table.Column(type: "uniqueidentifier", nullable: false), + Temperature = table.Column(type: "int", nullable: true, defaultValue: 0), + Humidity = table.Column(type: "int", nullable: true, defaultValue: 0), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Str_T_Zone", x => x.Id); + table.ForeignKey( + name: "FK_Str_T_Zone_Str_T_Warehouse_WarehouseId", + column: x => x.WarehouseId, + principalTable: "Str_T_Warehouse", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Str_T_Zone_Str_T_ZoneType_ZoneTypeId", + column: x => x.ZoneTypeId, + principalTable: "Str_T_ZoneType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "MaintenanceWorkorderActivity", columns: table => new @@ -6059,6 +6213,52 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Str_T_Location", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + WarehouseId = table.Column(type: "uniqueidentifier", nullable: false), + ZoneId = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + LocationTypeId = table.Column(type: "uniqueidentifier", nullable: false), + Capacity = table.Column(type: "int", nullable: false, defaultValue: 0), + CurrentStock = table.Column(type: "int", nullable: false, defaultValue: 0), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Str_T_Location", x => x.Id); + table.ForeignKey( + name: "FK_Str_T_Location_Str_T_LocationType_LocationTypeId", + column: x => x.LocationTypeId, + principalTable: "Str_T_LocationType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Str_T_Location_Str_T_Warehouse_WarehouseId", + column: x => x.WarehouseId, + principalTable: "Str_T_Warehouse", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Str_T_Location_Str_T_Zone_ZoneId", + column: x => x.ZoneId, + principalTable: "Str_T_Zone", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateIndex( name: "IX_AbpAuditLogActions_AuditLogId", table: "AbpAuditLogActions", @@ -7115,6 +7315,41 @@ namespace Erp.Platform.Migrations table: "Scp_T_RequestItem", column: "UomId"); + migrationBuilder.CreateIndex( + name: "IX_Str_T_Location_LocationTypeId", + table: "Str_T_Location", + column: "LocationTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Str_T_Location_WarehouseId", + table: "Str_T_Location", + column: "WarehouseId"); + + migrationBuilder.CreateIndex( + name: "IX_Str_T_Location_ZoneId", + table: "Str_T_Location", + column: "ZoneId"); + + migrationBuilder.CreateIndex( + name: "IX_Str_T_Warehouse_EmployeeId", + table: "Str_T_Warehouse", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Str_T_Warehouse_WarehouseTypeId", + table: "Str_T_Warehouse", + column: "WarehouseTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Str_T_Zone_WarehouseId", + table: "Str_T_Zone", + column: "WarehouseId"); + + migrationBuilder.CreateIndex( + name: "IX_Str_T_Zone_ZoneTypeId", + table: "Str_T_Zone", + column: "ZoneTypeId"); + migrationBuilder.CreateIndex( name: "IX_Workorders_MaintenanceWorkorderStatusId", table: "Workorders", @@ -7612,6 +7847,9 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Scp_T_RequestItem"); + migrationBuilder.DropTable( + name: "Str_T_Location"); + migrationBuilder.DropTable( name: "AbpEntityChanges"); @@ -7720,6 +7958,12 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Scp_T_Request"); + migrationBuilder.DropTable( + name: "Str_T_LocationType"); + + migrationBuilder.DropTable( + name: "Str_T_Zone"); + migrationBuilder.DropTable( name: "AbpAuditLogs"); @@ -7795,6 +8039,12 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Scp_T_RequestType"); + migrationBuilder.DropTable( + name: "Str_T_Warehouse"); + + migrationBuilder.DropTable( + name: "Str_T_ZoneType"); + migrationBuilder.DropTable( name: "Sas_T_Branch"); @@ -7804,6 +8054,9 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Sas_H_CountryGroup"); + migrationBuilder.DropTable( + name: "Str_T_WarehouseType"); + migrationBuilder.DropTable( name: "Mnt_T_WorkcenterStatus"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 7fd4eff8..e0e710d9 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -6072,6 +6072,157 @@ namespace Erp.Platform.Migrations b.ToTable("Sas_H_ListFormImportExecute", (string)null); }); + modelBuilder.Entity("Erp.Platform.Entities.Location", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Capacity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrentStock") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseId") + .HasColumnType("uniqueidentifier"); + + b.Property("ZoneId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("LocationTypeId"); + + b.HasIndex("WarehouseId"); + + b.HasIndex("ZoneId"); + + b.ToTable("Str_T_Location", (string)null); + }); + + modelBuilder.Entity("Erp.Platform.Entities.LocationType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Str_T_LocationType", (string)null); + }); + modelBuilder.Entity("Erp.Platform.Entities.LogEntry", b => { b.Property("Id") @@ -11866,6 +12017,182 @@ namespace Erp.Platform.Migrations b.ToTable("Net_T_Visitor", (string)null); }); + modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Capacity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("City") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Country") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("District") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsMainWarehouse") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("PostalCode") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("SecurityLevel") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("TemperatureControlled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Township") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("WarehouseTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("WarehouseTypeId"); + + b.ToTable("Str_T_Warehouse", (string)null); + }); + + modelBuilder.Entity("Erp.Platform.Entities.WarehouseType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Str_T_WarehouseType", (string)null); + }); + modelBuilder.Entity("Erp.Platform.Entities.WorkHour", b => { b.Property("Id") @@ -12254,6 +12581,152 @@ namespace Erp.Platform.Migrations b.ToTable("Mnt_T_WorkcenterType", (string)null); }); + modelBuilder.Entity("Erp.Platform.Entities.Zone", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Humidity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Temperature") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseId") + .HasColumnType("uniqueidentifier"); + + b.Property("ZoneTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("WarehouseId"); + + b.HasIndex("ZoneTypeId"); + + b.ToTable("Str_T_Zone", (string)null); + }); + + modelBuilder.Entity("Erp.Platform.Entities.ZoneType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Str_T_ZoneType", (string)null); + }); + modelBuilder.Entity("Erp.Platform.Forum.ForumCategory", b => { b.Property("Id") @@ -14994,6 +15467,33 @@ namespace Erp.Platform.Migrations .IsRequired(); }); + modelBuilder.Entity("Erp.Platform.Entities.Location", b => + { + b.HasOne("Erp.Platform.Entities.LocationType", "LocationType") + .WithMany("Locations") + .HasForeignKey("LocationTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse") + .WithMany("Locations") + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Erp.Platform.Entities.Zone", "Zone") + .WithMany("Locations") + .HasForeignKey("ZoneId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("LocationType"); + + b.Navigation("Warehouse"); + + b.Navigation("Zone"); + }); + modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlan", b => { b.HasOne("Erp.Platform.Entities.Workcenter", "WorkCenter") @@ -15663,6 +16163,25 @@ namespace Erp.Platform.Migrations b.Navigation("Employee"); }); + modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => + { + b.HasOne("Erp.Platform.Entities.Employee", "Employee") + .WithMany("Warehouses") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Erp.Platform.Entities.WarehouseType", "WarehouseType") + .WithMany("Warehouses") + .HasForeignKey("WarehouseTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("WarehouseType"); + }); + modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") @@ -15705,6 +16224,25 @@ namespace Erp.Platform.Migrations b.Navigation("Workcenter"); }); + modelBuilder.Entity("Erp.Platform.Entities.Zone", b => + { + b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse") + .WithMany("Zones") + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Erp.Platform.Entities.ZoneType", "ZoneType") + .WithMany("Zones") + .HasForeignKey("ZoneTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Warehouse"); + + b.Navigation("ZoneType"); + }); + modelBuilder.Entity("Erp.Platform.Forum.ForumPost", b => { b.HasOne("Erp.Platform.Forum.ForumPost", "ParentPost") @@ -16003,6 +16541,8 @@ namespace Erp.Platform.Migrations b.Navigation("SurveyResponses"); b.Navigation("Visitors"); + + b.Navigation("Warehouses"); }); modelBuilder.Entity("Erp.Platform.Entities.Event", b => @@ -16032,6 +16572,11 @@ namespace Erp.Platform.Migrations b.Navigation("Faults"); }); + modelBuilder.Entity("Erp.Platform.Entities.LocationType", b => + { + b.Navigation("Locations"); + }); + modelBuilder.Entity("Erp.Platform.Entities.LossReason", b => { b.Navigation("Opportunities"); @@ -16231,6 +16776,18 @@ namespace Erp.Platform.Migrations b.Navigation("Uoms"); }); + modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => + { + b.Navigation("Locations"); + + b.Navigation("Zones"); + }); + + modelBuilder.Entity("Erp.Platform.Entities.WarehouseType", b => + { + b.Navigation("Warehouses"); + }); + modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { b.Navigation("Specifications"); @@ -16246,6 +16803,16 @@ namespace Erp.Platform.Migrations b.Navigation("Workcenters"); }); + modelBuilder.Entity("Erp.Platform.Entities.Zone", b => + { + b.Navigation("Locations"); + }); + + modelBuilder.Entity("Erp.Platform.Entities.ZoneType", b => + { + b.Navigation("Zones"); + }); + modelBuilder.Entity("Erp.Platform.Forum.ForumCategory", b => { b.Navigation("Topics"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json index 012fd384..4f60a97e 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json @@ -5208,5 +5208,113 @@ "description": "İş emri iptal edildi ve işlem sona erdi", "isActive": true } + ], + "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 + } + ], + "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 + } + ], + "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 + } ] } \ No newline at end of file diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs index 39816fbc..bbfd5f4d 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs @@ -115,6 +115,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _faultTypeRepository; private readonly IRepository _workorderTypeRepository; private readonly IRepository _workorderStatusRepository; + private readonly IRepository _warehouseTypeRepository; + private readonly IRepository _zoneTypeRepository; + private readonly IRepository _locationTypeRepository; public TenantDataSeeder( IClock clock, @@ -212,7 +215,10 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository faultStatusRepository, IRepository faultTypeRepository, IRepository workorderTypeRepository, - IRepository workorderStatusRepository + IRepository workorderStatusRepository, + IRepository warehouseTypeRepository, + IRepository zoneTypeRepository, + IRepository locationTypeRepository ) { _clock = clock; @@ -312,6 +318,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency _faultTypeRepository = faultTypeRepository; _workorderTypeRepository = workorderTypeRepository; _workorderStatusRepository = workorderStatusRepository; + _warehouseTypeRepository = warehouseTypeRepository; + _zoneTypeRepository = zoneTypeRepository; + _locationTypeRepository = locationTypeRepository; } private static IConfigurationRoot BuildConfiguration() @@ -2102,6 +2111,51 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IsActive = item.IsActive }, autoSave: true); } + + foreach (var item in items.WarehouseTypes) + { + var exists = await _warehouseTypeRepository.AnyAsync(x => x.Code == item.Code); + if (exists) + continue; + + await _warehouseTypeRepository.InsertAsync(new WarehouseType + { + Code = item.Code, + Name = item.Name, + Description = item.Description, + IsActive = item.IsActive + }, autoSave: true); + } + + foreach (var item in items.ZoneTypes) + { + var exists = await _zoneTypeRepository.AnyAsync(x => x.Code == item.Code); + if (exists) + continue; + + await _zoneTypeRepository.InsertAsync(new ZoneType + { + Code = item.Code, + Name = item.Name, + Description = item.Description, + IsActive = item.IsActive + }, autoSave: true); + } + + foreach (var item in items.LocationTypes) + { + var exists = await _locationTypeRepository.AnyAsync(x => x.Code == item.Code); + if (exists) + continue; + + await _locationTypeRepository.InsertAsync(new LocationType + { + Code = item.Code, + Name = item.Name, + Description = item.Description, + IsActive = item.IsActive + }, autoSave: true); + } } } diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs index 5d3f2d2f..5b97786b 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs @@ -107,6 +107,38 @@ public class TenantSeederDto public List FaultTypes { get; set; } public List WorkorderTypes { get; set; } public List WorkorderStatuses { get; set; } + + //Store + public List WarehouseTypes { get; set; } + // public List Warehouses { get; set; } + public List ZoneTypes { get; set; } + // public List Zones { get; set; } + public List LocationTypes { get; set; } + // public List Locations { get; set; } +} + +public class WarehouseTypeSeedDto +{ + public string Code { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public bool IsActive { get; set; } +} + +public class ZoneTypeSeedDto +{ + public string Code { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public bool IsActive { get; set; } +} + +public class LocationTypeSeedDto +{ + public string Code { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public bool IsActive { get; set; } } public class WorkorderTypeSeedDto