From d4e3ddb6f05baed419e146748acf395aed35ee80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Sun, 14 Dec 2025 23:06:09 +0300 Subject: [PATCH] =?UTF-8?q?Menu=20ShortName=20s=C3=BCtunu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Menus/MenuDto.cs | 1 + .../Seeds/HostDataSeeder.cs | 2 + .../Seeds/ListFormSeeder_Saas.cs | 19 +- .../Seeds/ListFormSeeder_SupplyChain.cs | 37 +- .../Seeds/MenusData.json | 65 +- .../Seeds/PermissionsData.json | 204 ++- .../Enums/MenuPrefixEnum.cs | 2 - .../TableNameResolver.cs | 40 +- .../Erp.Platform.Domain/Entities/Host/Menu.cs | 1 + ....cs => 20251214195617_Initial.Designer.cs} | 41 +- ...6_Initial.cs => 20251214195617_Initial.cs} | 1457 +++++++++-------- .../PlatformDbContextModelSnapshot.cs | 39 +- .../PlatformHttpApiHostModule.cs | 49 +- .../components/developerKit/EntityEditor.tsx | 49 +- ui/src/proxy/menus/models.ts | 1 + ui/src/proxy/menus/navigation.ts | 1 + ui/src/types/menu.ts | 55 - ui/src/utils/navigation.ts | 1 + 18 files changed, 1052 insertions(+), 1012 deletions(-) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251212132226_Initial.Designer.cs => 20251214195617_Initial.Designer.cs} (99%) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251212132226_Initial.cs => 20251214195617_Initial.cs} (98%) delete mode 100644 ui/src/types/menu.ts diff --git a/api/src/Erp.Platform.Application.Contracts/Menus/MenuDto.cs b/api/src/Erp.Platform.Application.Contracts/Menus/MenuDto.cs index 1d97cd92..703d75b0 100644 --- a/api/src/Erp.Platform.Application.Contracts/Menus/MenuDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Menus/MenuDto.cs @@ -13,6 +13,7 @@ public class MenuDto : FullAuditedEntityDto public string ParentCode { get; set; } public string CssClass { get; set; } public string RequiredPermissionName { get; set; } + public string ShortName { get; set; } public string Target { get; set; } public bool IsDisabled { get; set; } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs b/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs index 1e0d92e7..5ab755f0 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs @@ -70,6 +70,7 @@ public class MenuSeedDto public string Icon { get; set; } public string RequiredPermissionName { get; set; } public bool IsDisabled { get; set; } + public string ShortName { get; set; } } public class PermissionGroupDefinitionRecordSeedDto @@ -581,6 +582,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency Icon = item.Icon, RequiredPermissionName = item.RequiredPermissionName, IsDisabled = item.IsDisabled, + ShortName = item.ShortName }); } } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs index db79b9b6..3358012c 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs @@ -2196,7 +2196,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, TreeOptionJson = DefaultTreeOptionJson("Code", "ParentCode", true), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 600, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 450, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ @@ -2211,6 +2211,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 12, DataField = "ShortName", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), @@ -2434,6 +2435,22 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new ListFormField + { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "ShortName", + Width = 100, + ListOrderNo = 13, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ]); #endregion diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs index 171ac854..dc511eaf 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs @@ -192,12 +192,13 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend IsOrganizationUnit = false, Description = listFormName, SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = TableNameResolver.GetFullViewName(nameof(TableNameEnum.MaterialGroup)), + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialGroup)), KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, + TreeOptionJson = DefaultTreeOptionJson("Id", "ParentGroupId", true), HeaderFilterJson = DefaultHeaderFilterJson, SearchPanelJson = DefaultSearchPanelJson, GroupPanelJson = DefaultGroupPanelJson, @@ -302,23 +303,23 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { - ListFormCode = listForm.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "HierarchyPath", - Width = 500, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - ColumnCustomizationJson = DefaultColumnCustomizationJson, - PermissionJson = DefaultFieldPermissionJson(listForm.Name), - PivotSettingsJson = DefaultPivotSettingsJson, - } + // new() { + // ListFormCode = listForm.ListFormCode, + // CultureName = LanguageCodes.En, + // SourceDbType = DbType.String, + // FieldName = "HierarchyPath", + // Width = 500, + // ListOrderNo = 7, + // Visible = true, + // IsActive = true, + // IsDeleted = false, + // AllowSearch = true, + // SortIndex = 1, + // SortDirection = GridColumnOptions.SortOrderAsc, + // ColumnCustomizationJson = DefaultColumnCustomizationJson, + // PermissionJson = DefaultFieldPermissionJson(listForm.Name), + // PivotSettingsJson = DefaultPivotSettingsJson, + // } }); #endregion } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json b/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json index 689b5e63..cd247dfe 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json @@ -461,21 +461,23 @@ "ParentCode": null, "Code": "App.Platform", "DisplayName": "App.Platform", - "Order": 100000, + "Order": 10000, "Url": null, "Icon": "FcTabletAndroid", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Plat" }, { "ParentCode": null, "Code": "App.Saas", "DisplayName": "App.Saas", - "Order": 200, + "Order": 100, "Url": null, "Icon": "FcPodiumWithAudience", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Sas" }, { "ParentCode": "App.Saas", @@ -701,11 +703,12 @@ "ParentCode": null, "Code": "App.Administration", "DisplayName": "App.Administration", - "Order": 300, + "Order": 200, "Url": null, "Icon": "FcOrganization", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Adm" }, { "ParentCode": "App.Administration", @@ -1361,11 +1364,12 @@ "ParentCode": null, "Code": "App.Participant", "DisplayName": "App.Participant", - "Order": 500, + "Order": 300, "Url": null, "Icon": "FcBusinessman", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Prt" }, { "ParentCode": "App.Participant", @@ -1441,11 +1445,12 @@ "ParentCode": null, "Code": "App.Coordinator", "DisplayName": "App.Coordinator", - "Order": 600, + "Order": 400, "Url": null, "Icon": "FcCollaboration", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Crd" }, { "ParentCode": "App.Coordinator", @@ -1621,11 +1626,12 @@ "ParentCode": null, "Code": "App.Crm", "DisplayName": "App.Crm", - "Order": 700, + "Order": 500, "Url": null, "Icon": "FcContacts", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Crm" }, { "ParentCode": "App.Crm", @@ -1721,11 +1727,12 @@ "ParentCode": null, "Code": "App.SupplyChain", "DisplayName": "App.SupplyChain", - "Order": 800, + "Order": 600, "Url": null, "Icon": "FcProcess", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Scp" }, { "ParentCode": "App.SupplyChain", @@ -1891,11 +1898,12 @@ "ParentCode": null, "Code": "App.Maintenance", "DisplayName": "App.Maintenance", - "Order": 900, + "Order": 700, "Url": null, "Icon": "FcFactory", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Mnt" }, { "ParentCode": "App.Maintenance", @@ -2021,11 +2029,12 @@ "ParentCode": null, "Code": "App.Store", "DisplayName": "App.Store", - "Order": 1000, + "Order": 800, "Url": null, "Icon": "FcOpenedFolder", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Str" }, { "ParentCode": "App.Store", @@ -2181,11 +2190,12 @@ "ParentCode": null, "Code": "App.Project", "DisplayName": "App.Project", - "Order": 1100, + "Order": 900, "Url": null, "Icon": "FcTimeline", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Prj" }, { "ParentCode": "App.Project", @@ -2311,11 +2321,12 @@ "ParentCode": null, "Code": "App.Hr", "DisplayName": "App.Hr", - "Order": 1200, + "Order": 1000, "Url": null, "Icon": "FcManager", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Hr" }, { "ParentCode": "App.Hr", @@ -2471,11 +2482,12 @@ "ParentCode": null, "Code": "App.Mrp", "DisplayName": "App.Mrp", - "Order": 1300, + "Order": 1100, "Url": null, "Icon": "FcServices", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Mrp" }, { "ParentCode": "App.Mrp", @@ -2621,11 +2633,12 @@ "ParentCode": null, "Code": "App.Accounting", "DisplayName": "App.Accounting", - "Order": 1400, + "Order": 1200, "Url": null, "Icon": "FcMoneyTransfer", "RequiredPermissionName": null, - "IsDisabled": false + "IsDisabled": false, + "ShortName": "Acc" }, { "ParentCode": "App.Accounting", diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json b/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json index 7d66a51f..29774b09 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json @@ -8,10 +8,6 @@ "Name": "App.Administration", "DisplayName": "App.Administration" }, - { - "Name": "App.Intranet", - "DisplayName": "App.Intranet" - }, { "Name": "App.Participant", "DisplayName": "App.Participant" @@ -1564,7 +1560,7 @@ { "GroupName": "App.Administration", "Name": "App.SiteManagement", - "ParentName": null, + "ParentName": "App.Setting", "DisplayName": "App.SiteManagement", "IsEnabled": true, "MultiTenancySide": 3, @@ -1600,7 +1596,7 @@ { "GroupName": "App.Administration", "Name": "App.Sender", - "ParentName": null, + "ParentName": "App.Setting", "DisplayName": "App.Sender", "IsEnabled": true, "MultiTenancySide": 3, @@ -1645,21 +1641,12 @@ { "GroupName": "App.Administration", "Name": "Abp.Mailing", - "ParentName": null, + "ParentName": "App.Setting", "DisplayName": "Abp.Mailing", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp|Kurs" }, - { - "GroupName": "App.Administration", - "Name": "Abp.Mailing.Smtp", - "ParentName": "Abp.Mailing", - "DisplayName": "Abp.Mailing.Smtp", - "IsEnabled": true, - "MultiTenancySide": 3, - "MenuGroup": "Erp|Kurs" - }, { "GroupName": "App.Administration", "Name": "Abp.Mailing.Default", @@ -1669,6 +1656,15 @@ "MultiTenancySide": 3, "MenuGroup": "Erp|Kurs" }, + { + "GroupName": "App.Administration", + "Name": "Abp.Mailing.Smtp", + "ParentName": "Abp.Mailing", + "DisplayName": "Abp.Mailing.Smtp", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, { "GroupName": "App.Administration", "Name": "Abp.Mailing.AWS", @@ -1681,7 +1677,7 @@ { "GroupName": "App.Administration", "Name": "Abp.Account", - "ParentName": null, + "ParentName": "App.Setting", "DisplayName": "Abp.Account", "IsEnabled": true, "MultiTenancySide": 3, @@ -1717,7 +1713,7 @@ { "GroupName": "App.Administration", "Name": "Abp.Identity", - "ParentName": null, + "ParentName": "App.Setting", "DisplayName": "Abp.Identity", "IsEnabled": true, "MultiTenancySide": 3, @@ -1741,15 +1737,6 @@ "MultiTenancySide": 3, "MenuGroup": "Erp|Kurs" }, - { - "GroupName": "App.Administration", - "Name": "Abp.Identity.Lockout", - "ParentName": "Abp.Identity", - "DisplayName": "Abp.Identity.Lockout", - "IsEnabled": true, - "MultiTenancySide": 3, - "MenuGroup": "Erp|Kurs" - }, { "GroupName": "App.Administration", "Name": "Abp.Identity.SignIn", @@ -1759,6 +1746,15 @@ "MultiTenancySide": 2, "MenuGroup": "Erp|Kurs" }, + { + "GroupName": "App.Administration", + "Name": "Abp.Identity.Lockout", + "ParentName": "Abp.Identity", + "DisplayName": "Abp.Identity.Lockout", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, { "GroupName": "App.Administration", "Name": "Abp.Identity.User", @@ -10787,7 +10783,7 @@ "MenuGroup": "Erp" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventType", "ParentName": null, "DisplayName": "App.Intranet.Events.EventType", @@ -10796,7 +10792,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventType.Create", "ParentName": "App.Intranet.Events.EventType", "DisplayName": "Create", @@ -10805,7 +10801,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventType.Update", "ParentName": "App.Intranet.Events.EventType", "DisplayName": "Update", @@ -10814,7 +10810,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventType.Delete", "ParentName": "App.Intranet.Events.EventType", "DisplayName": "Delete", @@ -10823,7 +10819,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventType.Export", "ParentName": "App.Intranet.Events.EventType", "DisplayName": "Export", @@ -10832,7 +10828,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventType.Import", "ParentName": "App.Intranet.Events.EventType", "DisplayName": "Import", @@ -10841,7 +10837,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventType.Note", "ParentName": "App.Intranet.Events.EventType", "DisplayName": "Note", @@ -10850,7 +10846,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventCategory", "ParentName": null, "DisplayName": "App.Intranet.Events.EventCategory", @@ -10859,7 +10855,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventCategory.Create", "ParentName": "App.Intranet.Events.EventCategory", "DisplayName": "Create", @@ -10868,7 +10864,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventCategory.Update", "ParentName": "App.Intranet.Events.EventCategory", "DisplayName": "Update", @@ -10877,7 +10873,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventCategory.Delete", "ParentName": "App.Intranet.Events.EventCategory", "DisplayName": "Delete", @@ -10886,7 +10882,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventCategory.Export", "ParentName": "App.Intranet.Events.EventCategory", "DisplayName": "Export", @@ -10895,7 +10891,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventCategory.Import", "ParentName": "App.Intranet.Events.EventCategory", "DisplayName": "Import", @@ -10904,7 +10900,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.EventCategory.Note", "ParentName": "App.Intranet.Events.EventCategory", "DisplayName": "Note", @@ -10913,7 +10909,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.Event", "ParentName": null, "DisplayName": "App.Intranet.Events.Event", @@ -10922,7 +10918,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.Event.Create", "ParentName": "App.Intranet.Events.Event", "DisplayName": "Create", @@ -10931,7 +10927,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.Event.Update", "ParentName": "App.Intranet.Events.Event", "DisplayName": "Update", @@ -10940,7 +10936,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.Event.Delete", "ParentName": "App.Intranet.Events.Event", "DisplayName": "Delete", @@ -10949,7 +10945,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.Event.Export", "ParentName": "App.Intranet.Events.Event", "DisplayName": "Export", @@ -10958,7 +10954,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.Event.Import", "ParentName": "App.Intranet.Events.Event", "DisplayName": "Import", @@ -10967,7 +10963,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.Event.Note", "ParentName": "App.Intranet.Events.Event", "DisplayName": "Note", @@ -10976,7 +10972,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Events.Event.Widget", "ParentName": "App.Intranet.Events.Event", "DisplayName": "Widget", @@ -10985,7 +10981,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Meal", "ParentName": null, "DisplayName": "App.Intranet.Meal", @@ -10994,7 +10990,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Meal.Create", "ParentName": "App.Intranet.Meal", "DisplayName": "Create", @@ -11003,7 +10999,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Meal.Update", "ParentName": "App.Intranet.Meal", "DisplayName": "Update", @@ -11012,7 +11008,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Meal.Delete", "ParentName": "App.Intranet.Meal", "DisplayName": "Delete", @@ -11021,7 +11017,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Meal.Export", "ParentName": "App.Intranet.Meal", "DisplayName": "Export", @@ -11030,7 +11026,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Meal.Import", "ParentName": "App.Intranet.Meal", "DisplayName": "Import", @@ -11039,7 +11035,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Meal.Note", "ParentName": "App.Intranet.Meal", "DisplayName": "Note", @@ -11048,7 +11044,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Meal.Widget", "ParentName": "App.Intranet.Meal", "DisplayName": "Widget", @@ -11057,7 +11053,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Reservation", "ParentName": null, "DisplayName": "App.Intranet.Reservation", @@ -11066,7 +11062,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Reservation.Create", "ParentName": "App.Intranet.Reservation", "DisplayName": "Create", @@ -11075,7 +11071,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Reservation.Update", "ParentName": "App.Intranet.Reservation", "DisplayName": "Update", @@ -11084,7 +11080,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Reservation.Delete", "ParentName": "App.Intranet.Reservation", "DisplayName": "Delete", @@ -11093,7 +11089,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Reservation.Export", "ParentName": "App.Intranet.Reservation", "DisplayName": "Export", @@ -11102,7 +11098,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Reservation.Import", "ParentName": "App.Intranet.Reservation", "DisplayName": "Import", @@ -11111,7 +11107,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Reservation.Note", "ParentName": "App.Intranet.Reservation", "DisplayName": "Note", @@ -11120,7 +11116,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Reservation.Widget", "ParentName": "App.Intranet.Reservation", "DisplayName": "Widget", @@ -11129,7 +11125,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.ShuttleRoute", "ParentName": null, "DisplayName": "App.Intranet.ShuttleRoute", @@ -11138,7 +11134,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.ShuttleRoute.Create", "ParentName": "App.Intranet.ShuttleRoute", "DisplayName": "Create", @@ -11147,7 +11143,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.ShuttleRoute.Update", "ParentName": "App.Intranet.ShuttleRoute", "DisplayName": "Update", @@ -11156,7 +11152,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.ShuttleRoute.Delete", "ParentName": "App.Intranet.ShuttleRoute", "DisplayName": "Delete", @@ -11165,7 +11161,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.ShuttleRoute.Export", "ParentName": "App.Intranet.ShuttleRoute", "DisplayName": "Export", @@ -11174,7 +11170,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.ShuttleRoute.Import", "ParentName": "App.Intranet.ShuttleRoute", "DisplayName": "Import", @@ -11183,7 +11179,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.ShuttleRoute.Note", "ParentName": "App.Intranet.ShuttleRoute", "DisplayName": "Note", @@ -11192,7 +11188,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.ShuttleRoute.Widget", "ParentName": "App.Intranet.ShuttleRoute", "DisplayName": "Widget", @@ -11201,7 +11197,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Announcement", "ParentName": null, "DisplayName": "App.Intranet.Announcement", @@ -11210,7 +11206,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Announcement.Create", "ParentName": "App.Intranet.Announcement", "DisplayName": "Create", @@ -11219,7 +11215,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Announcement.Update", "ParentName": "App.Intranet.Announcement", "DisplayName": "Update", @@ -11228,7 +11224,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Announcement.Delete", "ParentName": "App.Intranet.Announcement", "DisplayName": "Delete", @@ -11237,7 +11233,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Announcement.Export", "ParentName": "App.Intranet.Announcement", "DisplayName": "Export", @@ -11246,7 +11242,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Announcement.Import", "ParentName": "App.Intranet.Announcement", "DisplayName": "Import", @@ -11255,7 +11251,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Announcement.Note", "ParentName": "App.Intranet.Announcement", "DisplayName": "Note", @@ -11264,7 +11260,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Announcement.Widget", "ParentName": "App.Intranet.Announcement", "DisplayName": "Widget", @@ -11273,7 +11269,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Visitor", "ParentName": null, "DisplayName": "App.Intranet.Visitor", @@ -11282,7 +11278,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Visitor.Create", "ParentName": "App.Intranet.Visitor", "DisplayName": "Create", @@ -11291,7 +11287,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Visitor.Update", "ParentName": "App.Intranet.Visitor", "DisplayName": "Update", @@ -11300,7 +11296,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Visitor.Delete", "ParentName": "App.Intranet.Visitor", "DisplayName": "Delete", @@ -11309,7 +11305,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Visitor.Export", "ParentName": "App.Intranet.Visitor", "DisplayName": "Export", @@ -11318,7 +11314,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Visitor.Import", "ParentName": "App.Intranet.Visitor", "DisplayName": "Import", @@ -11327,7 +11323,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Visitor.Note", "ParentName": "App.Intranet.Visitor", "DisplayName": "Note", @@ -11336,7 +11332,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.Visitor.Widget", "ParentName": "App.Intranet.Visitor", "DisplayName": "Widget", @@ -11345,7 +11341,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialPost", "ParentName": null, "DisplayName": "App.Intranet.SocialPost", @@ -11354,7 +11350,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialPost.Create", "ParentName": "App.Intranet.SocialPost", "DisplayName": "Create", @@ -11363,7 +11359,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialPost.Update", "ParentName": "App.Intranet.SocialPost", "DisplayName": "Update", @@ -11372,7 +11368,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialPost.Delete", "ParentName": "App.Intranet.SocialPost", "DisplayName": "Delete", @@ -11381,7 +11377,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialPost.Export", "ParentName": "App.Intranet.SocialPost", "DisplayName": "Export", @@ -11390,7 +11386,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialPost.Import", "ParentName": "App.Intranet.SocialPost", "DisplayName": "Import", @@ -11399,7 +11395,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialPost.Note", "ParentName": "App.Intranet.SocialPost", "DisplayName": "Note", @@ -11408,7 +11404,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialComment", "ParentName": null, "DisplayName": "App.Intranet.SocialComment", @@ -11417,7 +11413,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialComment.Create", "ParentName": "App.Intranet.SocialComment", "DisplayName": "Create", @@ -11426,7 +11422,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialComment.Update", "ParentName": "App.Intranet.SocialComment", "DisplayName": "Update", @@ -11435,7 +11431,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialComment.Delete", "ParentName": "App.Intranet.SocialComment", "DisplayName": "Delete", @@ -11444,7 +11440,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialComment.Export", "ParentName": "App.Intranet.SocialComment", "DisplayName": "Export", @@ -11453,7 +11449,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialComment.Import", "ParentName": "App.Intranet.SocialComment", "DisplayName": "Import", @@ -11462,7 +11458,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialComment.Note", "ParentName": "App.Intranet.SocialComment", "DisplayName": "Note", @@ -11471,7 +11467,7 @@ "MenuGroup": "Kurs" }, { - "GroupName": "App.Intranet", + "GroupName": "App.Administration", "Name": "App.Intranet.SocialPost.Widget", "ParentName": "App.Intranet.SocialPost", "DisplayName": "Widget", diff --git a/api/src/Erp.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs b/api/src/Erp.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs index dca02e0d..66a48619 100644 --- a/api/src/Erp.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs +++ b/api/src/Erp.Platform.Domain.Shared/Enums/MenuPrefixEnum.cs @@ -7,7 +7,6 @@ public enum MenuPrefix Platform, Saas, Administration, - Intranet, Participant, Coordinator, Crm, @@ -29,7 +28,6 @@ public static class MenuPrefixExtensions MenuPrefix.Platform => "Plat", MenuPrefix.Saas => "Sas", MenuPrefix.Administration => "Adm", - MenuPrefix.Intranet => "Net", MenuPrefix.Participant => "Prt", MenuPrefix.Coordinator => "Crd", MenuPrefix.Crm => "Crm", diff --git a/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs b/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs index 97d2f983..6e14515e 100644 --- a/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs +++ b/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs @@ -23,6 +23,7 @@ public static class TableNameResolver { nameof(TableNameEnum.BackgroundWorker_MailQueueEvents), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, { nameof(TableNameEnum.BackgroundWorker_MailQueueTableFormat), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, { nameof(TableNameEnum.AiBot), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, + { nameof(TableNameEnum.BackgroundWorker), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, // 🔹 PLATFORM TABLOLARI { nameof(TableNameEnum.Route), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, @@ -40,7 +41,6 @@ public static class TableNameResolver { nameof(TableNameEnum.Country), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.City), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.District), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.BackgroundWorker), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, { nameof(TableNameEnum.ForumCategory), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.ForumTopic), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.ForumPost), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, @@ -94,6 +94,24 @@ public static class TableNameResolver { nameof(TableNameEnum.PartnerBank), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.PartnerCertificate), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.PartnerContact), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.EventCategory), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.EventType), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Event), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.EventPhoto), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.EventComment), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Training), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Certificate), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Meal), (TablePrefix.BranchByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Reservation), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.ShuttleRoute), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Announcement), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Visitor), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.SocialPost), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.SocialLocation), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.SocialMedia), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.SocialPollOption), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.SocialComment), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.SocialLike), (TablePrefix.TenantByName, MenuPrefix.Administration) }, // 🔹 PARTICIPANT { nameof(TableNameEnum.Interesting), (TablePrefix.TenantByName, MenuPrefix.Participant) }, @@ -143,26 +161,6 @@ public static class TableNameResolver { nameof(TableNameEnum.SurveyAnswer), (TablePrefix.TenantByName, MenuPrefix.Hr) }, { nameof(TableNameEnum.SurveyResponse), (TablePrefix.TenantByName, MenuPrefix.Hr) }, - // 🔹 INTRANET - { nameof(TableNameEnum.EventCategory), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.EventType), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Event), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.EventPhoto), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.EventComment), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Training), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Certificate), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Meal), (TablePrefix.BranchByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Reservation), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.ShuttleRoute), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Announcement), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.Visitor), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialPost), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialLocation), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialMedia), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialPollOption), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialComment), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - { nameof(TableNameEnum.SocialLike), (TablePrefix.TenantByName, MenuPrefix.Intranet) }, - // 🔹 SUPPLY CHAIN { nameof(TableNameEnum.MaterialType), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, { nameof(TableNameEnum.MaterialGroup), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) }, diff --git a/api/src/Erp.Platform.Domain/Entities/Host/Menu.cs b/api/src/Erp.Platform.Domain/Entities/Host/Menu.cs index 0ccf6375..6acd6ace 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/Menu.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/Menu.cs @@ -13,6 +13,7 @@ public class Menu : FullAuditedEntity public string ParentCode { get; set; } public string CssClass { get; set; } public string RequiredPermissionName { get; set; } + public string ShortName { get; set; } // Örn: "HR", "INV", "CRM" public string Target { get; set; } public bool IsDisabled { get; set; } diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212132226_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251214195617_Initial.Designer.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212132226_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251214195617_Initial.Designer.cs index cf8034bc..46f9209f 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212132226_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251214195617_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251212132226_Initial")] + [Migration("20251214195617_Initial")] partial class Initial { /// @@ -838,7 +838,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("Net_T_Announcement", (string)null); + b.ToTable("Adm_T_Announcement", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Approval", b => @@ -2200,7 +2200,7 @@ namespace Erp.Platform.Migrations b.HasIndex("TrainingId"); - b.ToTable("Net_T_Certificate", (string)null); + b.ToTable("Adm_T_Certificate", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.CheckNote", b => @@ -5132,7 +5132,7 @@ namespace Erp.Platform.Migrations b.HasIndex("TypeId"); - b.ToTable("Net_T_Event", (string)null); + b.ToTable("Adm_T_Event", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.EventCategory", b => @@ -5181,7 +5181,7 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.ToTable("Net_T_EventCategory", (string)null); + b.ToTable("Adm_T_EventCategory", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.EventComment", b => @@ -5242,7 +5242,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("Net_T_EventComment", (string)null); + b.ToTable("Adm_T_EventComment", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.EventPhoto", b => @@ -5295,7 +5295,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("Net_T_EventPhoto", (string)null); + b.ToTable("Adm_T_EventPhoto", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.EventType", b => @@ -5344,7 +5344,7 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.ToTable("Net_T_EventType", (string)null); + b.ToTable("Adm_T_EventType", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Expense", b => @@ -8063,7 +8063,7 @@ namespace Erp.Platform.Migrations b.HasIndex("BranchId"); - b.ToTable("Net_B_Meal", (string)null); + b.ToTable("Adm_B_Meal", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.MeetingMethod", b => @@ -8261,6 +8261,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(256) .HasColumnType("nvarchar(256)"); + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + b.Property("Target") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13383,7 +13386,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("Net_T_Reservation", (string)null); + b.ToTable("Adm_T_Reservation", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Risk", b => @@ -14255,7 +14258,7 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.ToTable("Net_T_ShuttleRoute", (string)null); + b.ToTable("Adm_T_ShuttleRoute", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Skill", b => @@ -14488,7 +14491,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialPostId"); - b.ToTable("Net_T_SocialComment", (string)null); + b.ToTable("Adm_T_SocialComment", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialLike", b => @@ -14542,7 +14545,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialPostId"); - b.ToTable("Net_T_SocialLike", (string)null); + b.ToTable("Adm_T_SocialLike", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialLocation", b => @@ -14611,7 +14614,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialPostId") .IsUnique(); - b.ToTable("Net_T_SocialLocation", (string)null); + b.ToTable("Adm_T_SocialLocation", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialMedia", b => @@ -14684,7 +14687,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialPostId") .IsUnique(); - b.ToTable("Net_T_SocialMedia", (string)null); + b.ToTable("Adm_T_SocialMedia", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialPollOption", b => @@ -14741,7 +14744,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialMediaId"); - b.ToTable("Net_T_SocialPollOption", (string)null); + b.ToTable("Adm_T_SocialPollOption", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialPost", b => @@ -14810,7 +14813,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("Net_T_SocialPost", (string)null); + b.ToTable("Adm_T_SocialPost", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Source", b => @@ -15579,7 +15582,7 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.ToTable("Net_T_Training", (string)null); + b.ToTable("Adm_T_Training", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Type", b => @@ -16002,7 +16005,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("Net_T_Visitor", (string)null); + b.ToTable("Adm_T_Visitor", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212132226_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251214195617_Initial.cs similarity index 98% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212132226_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251214195617_Initial.cs index da8d5515..5a6e10e3 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251212132226_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251214195617_Initial.cs @@ -825,6 +825,46 @@ namespace Erp.Platform.Migrations table.PrimaryKey("PK_Adm_T_EducationStatus", x => x.Id); }); + migrationBuilder.CreateTable( + name: "Adm_T_EventCategory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + 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_Adm_T_EventCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_EventType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + 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_Adm_T_EventType", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Adm_T_InstallmentOption", columns: table => new @@ -1016,6 +1056,32 @@ namespace Erp.Platform.Migrations table.PrimaryKey("PK_Adm_T_Service", x => x.Id); }); + migrationBuilder.CreateTable( + name: "Adm_T_ShuttleRoute", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Type = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), + DepartureTime = table.Column(type: "datetime2", maxLength: 10, nullable: false), + ArrivalTime = table.Column(type: "datetime2", maxLength: 10, nullable: false), + Capacity = table.Column(type: "int", nullable: false, defaultValue: 0), + Available = table.Column(type: "int", nullable: false, defaultValue: 0), + Route = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + 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_Adm_T_ShuttleRoute", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Adm_T_SkillType", columns: table => new @@ -1036,6 +1102,38 @@ namespace Erp.Platform.Migrations table.PrimaryKey("PK_Adm_T_SkillType", x => x.Id); }); + migrationBuilder.CreateTable( + name: "Adm_T_Training", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Instructor = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Duration = table.Column(type: "int", nullable: false, defaultValue: 0), + StartDate = table.Column(type: "datetime2", nullable: false), + EndDate = table.Column(type: "datetime2", nullable: false), + MaxParticipants = table.Column(type: "int", nullable: false, defaultValue: 0), + Enrolled = table.Column(type: "int", nullable: false, defaultValue: 0), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Location = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Thumbnail = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: 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_Adm_T_Training", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Adm_T_UomCategory", columns: table => new @@ -1694,104 +1792,6 @@ namespace Erp.Platform.Migrations table.PrimaryKey("PK_Mrp_T_ProductionOrderType", x => x.Id); }); - migrationBuilder.CreateTable( - name: "Net_T_EventCategory", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - 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_Net_T_EventCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Net_T_EventType", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - 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_Net_T_EventType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Net_T_ShuttleRoute", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Type = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), - DepartureTime = table.Column(type: "datetime2", maxLength: 10, nullable: false), - ArrivalTime = table.Column(type: "datetime2", maxLength: 10, nullable: false), - Capacity = table.Column(type: "int", nullable: false, defaultValue: 0), - Available = table.Column(type: "int", nullable: false, defaultValue: 0), - Route = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - 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_Net_T_ShuttleRoute", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Net_T_Training", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Instructor = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Duration = table.Column(type: "int", nullable: false, defaultValue: 0), - StartDate = table.Column(type: "datetime2", nullable: false), - EndDate = table.Column(type: "datetime2", nullable: false), - MaxParticipants = table.Column(type: "int", nullable: false, defaultValue: 0), - Enrolled = table.Column(type: "int", nullable: false, defaultValue: 0), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Location = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Thumbnail = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: 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_Net_T_Training", x => x.Id); - }); - migrationBuilder.CreateTable( name: "OpenIddictApplications", columns: table => new @@ -2557,6 +2557,7 @@ namespace Erp.Platform.Migrations ParentCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CssClass = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), RequiredPermissionName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ShortName = table.Column(type: "nvarchar(max)", nullable: true), Target = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsDisabled = table.Column(type: "bit", nullable: false), ElementId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), @@ -4221,6 +4222,36 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Adm_B_Meal", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + Date = table.Column(type: "datetime2", nullable: false), + Type = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + TotalCalorie = table.Column(type: "decimal(9,2)", precision: 9, scale: 2, nullable: false), + Materials = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: 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_Adm_B_Meal", x => x.Id); + table.ForeignKey( + name: "FK_Adm_B_Meal_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "Crd_B_LessonPeriod", columns: table => new @@ -4324,36 +4355,6 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateTable( - name: "Net_B_Meal", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - Date = table.Column(type: "datetime2", nullable: false), - Type = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - TotalCalorie = table.Column(type: "decimal(9,2)", precision: 9, scale: 2, nullable: false), - Materials = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: 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_Net_B_Meal", x => x.Id); - table.ForeignKey( - name: "FK_Net_B_Meal_Sas_T_Branch_BranchId", - column: x => x.BranchId, - principalTable: "Sas_T_Branch", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "Sas_T_BranchUsers", columns: table => new @@ -5312,6 +5313,37 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Restrict); }); + migrationBuilder.CreateTable( + name: "Adm_T_Announcement", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Excerpt = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), + Content = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: false), + ImageUrl = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), + PublishDate = table.Column(type: "datetime2", nullable: false), + ExpiryDate = table.Column(type: "datetime2", nullable: true), + IsPinned = table.Column(type: "bit", nullable: false), + ViewCount = table.Column(type: "int", nullable: false, defaultValue: 0), + Departments = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Attachments = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: 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_Adm_T_Announcement", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Adm_T_BlogPost", columns: table => new @@ -5351,6 +5383,135 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Restrict); }); + migrationBuilder.CreateTable( + name: "Adm_T_Certificate", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TrainingId = table.Column(type: "uniqueidentifier", nullable: false), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), + Score = table.Column(type: "int", nullable: true), + IssueDate = table.Column(type: "datetime2", nullable: false), + ExpiryDate = table.Column(type: "datetime2", nullable: true), + CertificateUrl = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: 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_Adm_T_Certificate", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_Certificate_Adm_T_Training_TrainingId", + column: x => x.TrainingId, + principalTable: "Adm_T_Training", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Event", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CategoryId = table.Column(type: "uniqueidentifier", nullable: false), + TypeId = table.Column(type: "uniqueidentifier", nullable: false), + Date = table.Column(type: "datetime2", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Place = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), + ParticipantsCount = table.Column(type: "int", nullable: false), + Likes = table.Column(type: "int", nullable: false), + isPublished = table.Column(type: "bit", nullable: false, defaultValue: false), + 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_Adm_T_Event", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_Event_Adm_T_EventCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "Adm_T_EventCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Adm_T_Event_Adm_T_EventType_TypeId", + column: x => x.TypeId, + principalTable: "Adm_T_EventType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_EventComment", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EventId = table.Column(type: "uniqueidentifier", nullable: false), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), + Content = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Likes = table.Column(type: "int", nullable: false, defaultValue: 0), + 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_Adm_T_EventComment", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_EventComment_Adm_T_Event_EventId", + column: x => x.EventId, + principalTable: "Adm_T_Event", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_EventPhoto", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EventId = table.Column(type: "uniqueidentifier", nullable: false), + Url = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: 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_Adm_T_EventPhoto", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_EventPhoto_Adm_T_Event_EventId", + column: x => x.EventId, + principalTable: "Adm_T_Event", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "Adm_T_Partner", columns: table => new @@ -5648,6 +5809,180 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Adm_T_Reservation", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ResourceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), + StartDate = table.Column(type: "datetime2", nullable: false), + EndDate = table.Column(type: "datetime2", nullable: false), + Purpose = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), + Participants = table.Column(type: "int", nullable: true), + Notes = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + 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_Adm_T_Reservation", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialComment", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), + Content = table.Column(type: "nvarchar(max)", maxLength: 8192, nullable: false), + 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_Adm_T_SocialComment", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialLike", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: 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_Adm_T_SocialLike", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialLocation", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Lat = table.Column(type: "float", nullable: true), + Lng = table.Column(type: "float", nullable: true), + PlaceId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: 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_Adm_T_SocialLocation", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialMedia", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Urls = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), + PollQuestion = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PollTotalVotes = table.Column(type: "int", nullable: true), + PollEndsAt = table.Column(type: "datetime2", nullable: true), + PollUserVoteId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: 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_Adm_T_SocialMedia", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialPollOption", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + SocialMediaId = table.Column(type: "uniqueidentifier", nullable: false), + Text = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), + Votes = table.Column(type: "int", nullable: false), + 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_Adm_T_SocialPollOption", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SocialPollOption_Adm_T_SocialMedia_SocialMediaId", + column: x => x.SocialMediaId, + principalTable: "Adm_T_SocialMedia", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialPost", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), + Content = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: false), + LikeCount = table.Column(type: "int", nullable: false, defaultValue: 0), + IsLiked = table.Column(type: "bit", nullable: false, defaultValue: false), + IsOwnPost = table.Column(type: "bit", nullable: false, defaultValue: false), + 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_Adm_T_SocialPost", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Adm_T_Uom", columns: table => new @@ -5999,6 +6334,37 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Restrict); }); + migrationBuilder.CreateTable( + name: "Adm_T_Visitor", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CompanyName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), + Purpose = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + VisitDate = table.Column(type: "datetime2", nullable: false), + CheckIn = table.Column(type: "datetime2", nullable: true), + CheckOut = table.Column(type: "datetime2", nullable: true), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), + Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), + BadgeNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Photo = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: 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_Adm_T_Visitor", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Crm_T_Activity", columns: table => new @@ -6777,229 +7143,6 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "Net_T_Announcement", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Excerpt = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - Content = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: false), - ImageUrl = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), - PublishDate = table.Column(type: "datetime2", nullable: false), - ExpiryDate = table.Column(type: "datetime2", nullable: true), - IsPinned = table.Column(type: "bit", nullable: false), - ViewCount = table.Column(type: "int", nullable: false, defaultValue: 0), - Departments = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Attachments = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: 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_Net_T_Announcement", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_Announcement_Hr_T_Employee_EmployeeId", - column: x => x.EmployeeId, - principalTable: "Hr_T_Employee", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Net_T_Certificate", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - TrainingId = table.Column(type: "uniqueidentifier", nullable: false), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), - Score = table.Column(type: "int", nullable: true), - IssueDate = table.Column(type: "datetime2", nullable: false), - ExpiryDate = table.Column(type: "datetime2", nullable: true), - CertificateUrl = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: 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_Net_T_Certificate", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_Certificate_Hr_T_Employee_EmployeeId", - column: x => x.EmployeeId, - principalTable: "Hr_T_Employee", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Net_T_Certificate_Net_T_Training_TrainingId", - column: x => x.TrainingId, - principalTable: "Net_T_Training", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Net_T_Event", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), - TypeId = table.Column(type: "uniqueidentifier", nullable: false), - Date = table.Column(type: "datetime2", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Place = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), - ParticipantsCount = table.Column(type: "int", nullable: false), - Likes = table.Column(type: "int", nullable: false), - isPublished = table.Column(type: "bit", nullable: false, defaultValue: false), - 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_Net_T_Event", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_Event_Hr_T_Employee_EmployeeId", - column: x => x.EmployeeId, - principalTable: "Hr_T_Employee", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Net_T_Event_Net_T_EventCategory_CategoryId", - column: x => x.CategoryId, - principalTable: "Net_T_EventCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Net_T_Event_Net_T_EventType_TypeId", - column: x => x.TypeId, - principalTable: "Net_T_EventType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Net_T_Reservation", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ResourceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), - StartDate = table.Column(type: "datetime2", nullable: false), - EndDate = table.Column(type: "datetime2", nullable: false), - Purpose = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - Participants = table.Column(type: "int", nullable: true), - Notes = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - 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_Net_T_Reservation", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_Reservation_Hr_T_Employee_EmployeeId", - column: x => x.EmployeeId, - principalTable: "Hr_T_Employee", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Net_T_SocialPost", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), - Content = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: false), - LikeCount = table.Column(type: "int", nullable: false, defaultValue: 0), - IsLiked = table.Column(type: "bit", nullable: false, defaultValue: false), - IsOwnPost = table.Column(type: "bit", nullable: false, defaultValue: false), - 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_Net_T_SocialPost", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_SocialPost_Hr_T_Employee_EmployeeId", - column: x => x.EmployeeId, - principalTable: "Hr_T_Employee", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Net_T_Visitor", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - CompanyName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - Purpose = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - VisitDate = table.Column(type: "datetime2", nullable: false), - CheckIn = table.Column(type: "datetime2", nullable: true), - CheckOut = table.Column(type: "datetime2", nullable: true), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), - Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - BadgeNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Photo = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: 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_Net_T_Visitor", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_Visitor_Hr_T_Employee_EmployeeId", - column: x => x.EmployeeId, - principalTable: "Hr_T_Employee", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "Scp_T_Request", columns: table => new @@ -7421,192 +7564,6 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "Net_T_EventComment", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EventId = table.Column(type: "uniqueidentifier", nullable: false), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), - Content = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Likes = table.Column(type: "int", nullable: false, defaultValue: 0), - 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_Net_T_EventComment", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_EventComment_Net_T_Event_EventId", - column: x => x.EventId, - principalTable: "Net_T_Event", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Net_T_EventPhoto", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EventId = table.Column(type: "uniqueidentifier", nullable: false), - Url = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: 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_Net_T_EventPhoto", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_EventPhoto_Net_T_Event_EventId", - column: x => x.EventId, - principalTable: "Net_T_Event", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Net_T_SocialComment", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), - Content = table.Column(type: "nvarchar(max)", maxLength: 8192, nullable: false), - 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_Net_T_SocialComment", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_SocialComment_Hr_T_Employee_EmployeeId", - column: x => x.EmployeeId, - principalTable: "Hr_T_Employee", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Net_T_SocialComment_Net_T_SocialPost_SocialPostId", - column: x => x.SocialPostId, - principalTable: "Net_T_SocialPost", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Net_T_SocialLike", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), - EmployeeId = table.Column(type: "uniqueidentifier", nullable: 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_Net_T_SocialLike", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_SocialLike_Hr_T_Employee_EmployeeId", - column: x => x.EmployeeId, - principalTable: "Hr_T_Employee", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Net_T_SocialLike_Net_T_SocialPost_SocialPostId", - column: x => x.SocialPostId, - principalTable: "Net_T_SocialPost", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Net_T_SocialLocation", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Lat = table.Column(type: "float", nullable: true), - Lng = table.Column(type: "float", nullable: true), - PlaceId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: 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_Net_T_SocialLocation", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_SocialLocation_Net_T_SocialPost_SocialPostId", - column: x => x.SocialPostId, - principalTable: "Net_T_SocialPost", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Net_T_SocialMedia", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Urls = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), - PollQuestion = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - PollTotalVotes = table.Column(type: "int", nullable: true), - PollEndsAt = table.Column(type: "datetime2", nullable: true), - PollUserVoteId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: 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_Net_T_SocialMedia", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_SocialMedia_Net_T_SocialPost_SocialPostId", - column: x => x.SocialPostId, - principalTable: "Net_T_SocialPost", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "Scp_T_Quotation", columns: table => new @@ -7849,34 +7806,6 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateTable( - name: "Net_T_SocialPollOption", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialMediaId = table.Column(type: "uniqueidentifier", nullable: false), - Text = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - Votes = table.Column(type: "int", nullable: false), - 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_Net_T_SocialPollOption", x => x.Id); - table.ForeignKey( - name: "FK_Net_T_SocialPollOption_Net_T_SocialMedia_SocialMediaId", - column: x => x.SocialMediaId, - principalTable: "Net_T_SocialMedia", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "Scp_T_PurchaseOrder", columns: table => new @@ -8765,6 +8694,16 @@ namespace Erp.Platform.Migrations table: "Acc_B_WaybillItem", column: "WaybillId"); + migrationBuilder.CreateIndex( + name: "IX_Adm_B_Meal_BranchId", + table: "Adm_B_Meal", + column: "BranchId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Announcement_EmployeeId", + table: "Adm_T_Announcement", + column: "EmployeeId"); + migrationBuilder.CreateIndex( name: "IX_Adm_T_BlogCategory_Slug", table: "Adm_T_BlogCategory", @@ -8795,6 +8734,41 @@ namespace Erp.Platform.Migrations table: "Adm_T_BlogPost", column: "Slug"); + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Certificate_EmployeeId", + table: "Adm_T_Certificate", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Certificate_TrainingId", + table: "Adm_T_Certificate", + column: "TrainingId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Event_CategoryId", + table: "Adm_T_Event", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Event_EmployeeId", + table: "Adm_T_Event", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Event_TypeId", + table: "Adm_T_Event", + column: "TypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_EventComment_EventId", + table: "Adm_T_EventComment", + column: "EventId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_EventPhoto_EventId", + table: "Adm_T_EventPhoto", + column: "EventId"); + migrationBuilder.CreateIndex( name: "IX_Adm_T_OrderItem_OrderId", table: "Adm_T_OrderItem", @@ -8855,6 +8829,11 @@ namespace Erp.Platform.Migrations table: "Adm_T_PartnerContact", column: "PartnerId"); + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Reservation_EmployeeId", + table: "Adm_T_Reservation", + column: "EmployeeId"); + migrationBuilder.CreateIndex( name: "IX_Adm_T_Skill_SkillTypeId", table: "Adm_T_Skill", @@ -8865,6 +8844,48 @@ namespace Erp.Platform.Migrations table: "Adm_T_SkillLevel", column: "SkillTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialComment_EmployeeId", + table: "Adm_T_SocialComment", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialComment_SocialPostId", + table: "Adm_T_SocialComment", + column: "SocialPostId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialLike_EmployeeId", + table: "Adm_T_SocialLike", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialLike_SocialPostId", + table: "Adm_T_SocialLike", + column: "SocialPostId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialLocation_SocialPostId", + table: "Adm_T_SocialLocation", + column: "SocialPostId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialMedia_SocialPostId", + table: "Adm_T_SocialMedia", + column: "SocialPostId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialPollOption_SocialMediaId", + table: "Adm_T_SocialPollOption", + column: "SocialMediaId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialPost_EmployeeId", + table: "Adm_T_SocialPost", + column: "EmployeeId"); + migrationBuilder.CreateIndex( name: "IX_Adm_T_Uom_MaterialId", table: "Adm_T_Uom", @@ -8875,6 +8896,11 @@ namespace Erp.Platform.Migrations table: "Adm_T_Uom", column: "UomCategoryId"); + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Visitor_EmployeeId", + table: "Adm_T_Visitor", + column: "EmployeeId"); + migrationBuilder.CreateIndex( name: "IX_Crd_B_Class_BranchId", table: "Crd_B_Class", @@ -9412,103 +9438,6 @@ namespace Erp.Platform.Migrations table: "Mrp_T_ProductionWorkorder", column: "WorkcenterId"); - migrationBuilder.CreateIndex( - name: "IX_Net_B_Meal_BranchId", - table: "Net_B_Meal", - column: "BranchId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_Announcement_EmployeeId", - table: "Net_T_Announcement", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_Certificate_EmployeeId", - table: "Net_T_Certificate", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_Certificate_TrainingId", - table: "Net_T_Certificate", - column: "TrainingId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_Event_CategoryId", - table: "Net_T_Event", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_Event_EmployeeId", - table: "Net_T_Event", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_Event_TypeId", - table: "Net_T_Event", - column: "TypeId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_EventComment_EventId", - table: "Net_T_EventComment", - column: "EventId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_EventPhoto_EventId", - table: "Net_T_EventPhoto", - column: "EventId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_Reservation_EmployeeId", - table: "Net_T_Reservation", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_SocialComment_EmployeeId", - table: "Net_T_SocialComment", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_SocialComment_SocialPostId", - table: "Net_T_SocialComment", - column: "SocialPostId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_SocialLike_EmployeeId", - table: "Net_T_SocialLike", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_SocialLike_SocialPostId", - table: "Net_T_SocialLike", - column: "SocialPostId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_SocialLocation_SocialPostId", - table: "Net_T_SocialLocation", - column: "SocialPostId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_SocialMedia_SocialPostId", - table: "Net_T_SocialMedia", - column: "SocialPostId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_SocialPollOption_SocialMediaId", - table: "Net_T_SocialPollOption", - column: "SocialMediaId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_SocialPost_EmployeeId", - table: "Net_T_SocialPost", - column: "EmployeeId"); - - migrationBuilder.CreateIndex( - name: "IX_Net_T_Visitor_EmployeeId", - table: "Net_T_Visitor", - column: "EmployeeId"); - migrationBuilder.CreateIndex( name: "IX_OpenIddictApplications_ClientId", table: "OpenIddictApplications", @@ -10215,6 +10144,14 @@ namespace Erp.Platform.Migrations principalColumn: "Id", onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_Announcement_Hr_T_Employee_EmployeeId", + table: "Adm_T_Announcement", + column: "EmployeeId", + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( name: "FK_Adm_T_BlogPost_Hr_T_Employee_EmployeeId", table: "Adm_T_BlogPost", @@ -10223,6 +10160,22 @@ namespace Erp.Platform.Migrations principalColumn: "Id", onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_Certificate_Hr_T_Employee_EmployeeId", + table: "Adm_T_Certificate", + column: "EmployeeId", + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_Event_Hr_T_Employee_EmployeeId", + table: "Adm_T_Event", + column: "EmployeeId", + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( name: "FK_Adm_T_Partner_Hr_T_Employee_EmployeeId", table: "Adm_T_Partner", @@ -10238,6 +10191,70 @@ namespace Erp.Platform.Migrations principalTable: "Scp_T_Material", principalColumn: "Id"); + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_Reservation_Hr_T_Employee_EmployeeId", + table: "Adm_T_Reservation", + column: "EmployeeId", + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_SocialComment_Adm_T_SocialPost_SocialPostId", + table: "Adm_T_SocialComment", + column: "SocialPostId", + principalTable: "Adm_T_SocialPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_SocialComment_Hr_T_Employee_EmployeeId", + table: "Adm_T_SocialComment", + column: "EmployeeId", + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_SocialLike_Adm_T_SocialPost_SocialPostId", + table: "Adm_T_SocialLike", + column: "SocialPostId", + principalTable: "Adm_T_SocialPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_SocialLike_Hr_T_Employee_EmployeeId", + table: "Adm_T_SocialLike", + column: "EmployeeId", + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_SocialLocation_Adm_T_SocialPost_SocialPostId", + table: "Adm_T_SocialLocation", + column: "SocialPostId", + principalTable: "Adm_T_SocialPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_SocialMedia_Adm_T_SocialPost_SocialPostId", + table: "Adm_T_SocialMedia", + column: "SocialPostId", + principalTable: "Adm_T_SocialPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_SocialPost_Hr_T_Employee_EmployeeId", + table: "Adm_T_SocialPost", + column: "EmployeeId", + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( name: "FK_Adm_T_Uom_Scp_T_Material_MaterialId", table: "Adm_T_Uom", @@ -10245,6 +10262,14 @@ namespace Erp.Platform.Migrations principalTable: "Scp_T_Material", principalColumn: "Id"); + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_Visitor_Hr_T_Employee_EmployeeId", + table: "Adm_T_Visitor", + column: "EmployeeId", + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( name: "FK_Crm_T_Activity_Crm_T_Opportunity_OpportunityId", table: "Crm_T_Activity", @@ -10428,15 +10453,24 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Acc_B_WaybillItem"); + migrationBuilder.DropTable( + name: "Adm_B_Meal"); + migrationBuilder.DropTable( name: "Adm_T_About"); + migrationBuilder.DropTable( + name: "Adm_T_Announcement"); + migrationBuilder.DropTable( name: "Adm_T_Behavior"); migrationBuilder.DropTable( name: "Adm_T_BlogPost"); + migrationBuilder.DropTable( + name: "Adm_T_Certificate"); + migrationBuilder.DropTable( name: "Adm_T_Contact"); @@ -10452,6 +10486,12 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Adm_T_EducationStatus"); + migrationBuilder.DropTable( + name: "Adm_T_EventComment"); + + migrationBuilder.DropTable( + name: "Adm_T_EventPhoto"); + migrationBuilder.DropTable( name: "Adm_T_InstallmentOption"); @@ -10476,21 +10516,42 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Adm_T_Psychologist"); + migrationBuilder.DropTable( + name: "Adm_T_Reservation"); + migrationBuilder.DropTable( name: "Adm_T_Service"); + migrationBuilder.DropTable( + name: "Adm_T_ShuttleRoute"); + migrationBuilder.DropTable( name: "Adm_T_Skill"); migrationBuilder.DropTable( name: "Adm_T_SkillLevel"); + migrationBuilder.DropTable( + name: "Adm_T_SocialComment"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialLike"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialLocation"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialPollOption"); + migrationBuilder.DropTable( name: "Adm_T_Vaccine"); migrationBuilder.DropTable( name: "Adm_T_Vehicle"); + migrationBuilder.DropTable( + name: "Adm_T_Visitor"); + migrationBuilder.DropTable( name: "Adm_T_WorkHour"); @@ -10590,42 +10651,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Mrp_T_ProductionWorkorder"); - migrationBuilder.DropTable( - name: "Net_B_Meal"); - - migrationBuilder.DropTable( - name: "Net_T_Announcement"); - - migrationBuilder.DropTable( - name: "Net_T_Certificate"); - - migrationBuilder.DropTable( - name: "Net_T_EventComment"); - - migrationBuilder.DropTable( - name: "Net_T_EventPhoto"); - - migrationBuilder.DropTable( - name: "Net_T_Reservation"); - - migrationBuilder.DropTable( - name: "Net_T_ShuttleRoute"); - - migrationBuilder.DropTable( - name: "Net_T_SocialComment"); - - migrationBuilder.DropTable( - name: "Net_T_SocialLike"); - - migrationBuilder.DropTable( - name: "Net_T_SocialLocation"); - - migrationBuilder.DropTable( - name: "Net_T_SocialPollOption"); - - migrationBuilder.DropTable( - name: "Net_T_Visitor"); - migrationBuilder.DropTable( name: "OpenIddictScopes"); @@ -10818,12 +10843,21 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Adm_T_BlogCategory"); + migrationBuilder.DropTable( + name: "Adm_T_Training"); + + migrationBuilder.DropTable( + name: "Adm_T_Event"); + migrationBuilder.DropTable( name: "Adm_T_Order"); migrationBuilder.DropTable( name: "Adm_T_SkillType"); + migrationBuilder.DropTable( + name: "Adm_T_SocialMedia"); + migrationBuilder.DropTable( name: "Crd_B_ClassType"); @@ -10872,15 +10906,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Mrp_T_ProductionOrder"); - migrationBuilder.DropTable( - name: "Net_T_Training"); - - migrationBuilder.DropTable( - name: "Net_T_Event"); - - migrationBuilder.DropTable( - name: "Net_T_SocialMedia"); - migrationBuilder.DropTable( name: "OpenIddictAuthorizations"); @@ -10953,6 +10978,15 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Acc_T_WaybillType"); + migrationBuilder.DropTable( + name: "Adm_T_EventCategory"); + + migrationBuilder.DropTable( + name: "Adm_T_EventType"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialPost"); + migrationBuilder.DropTable( name: "Crd_B_RegistrationType"); @@ -10992,15 +11026,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Mrp_T_ProductionOrderType"); - migrationBuilder.DropTable( - name: "Net_T_EventCategory"); - - migrationBuilder.DropTable( - name: "Net_T_EventType"); - - migrationBuilder.DropTable( - name: "Net_T_SocialPost"); - migrationBuilder.DropTable( name: "OpenIddictApplications"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 7eba8c5e..f8f86f8b 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -835,7 +835,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("Net_T_Announcement", (string)null); + b.ToTable("Adm_T_Announcement", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Approval", b => @@ -2197,7 +2197,7 @@ namespace Erp.Platform.Migrations b.HasIndex("TrainingId"); - b.ToTable("Net_T_Certificate", (string)null); + b.ToTable("Adm_T_Certificate", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.CheckNote", b => @@ -5129,7 +5129,7 @@ namespace Erp.Platform.Migrations b.HasIndex("TypeId"); - b.ToTable("Net_T_Event", (string)null); + b.ToTable("Adm_T_Event", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.EventCategory", b => @@ -5178,7 +5178,7 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.ToTable("Net_T_EventCategory", (string)null); + b.ToTable("Adm_T_EventCategory", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.EventComment", b => @@ -5239,7 +5239,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("Net_T_EventComment", (string)null); + b.ToTable("Adm_T_EventComment", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.EventPhoto", b => @@ -5292,7 +5292,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("Net_T_EventPhoto", (string)null); + b.ToTable("Adm_T_EventPhoto", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.EventType", b => @@ -5341,7 +5341,7 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.ToTable("Net_T_EventType", (string)null); + b.ToTable("Adm_T_EventType", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Expense", b => @@ -8060,7 +8060,7 @@ namespace Erp.Platform.Migrations b.HasIndex("BranchId"); - b.ToTable("Net_B_Meal", (string)null); + b.ToTable("Adm_B_Meal", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.MeetingMethod", b => @@ -8258,6 +8258,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(256) .HasColumnType("nvarchar(256)"); + b.Property("ShortName") + .HasColumnType("nvarchar(max)"); + b.Property("Target") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13380,7 +13383,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("Net_T_Reservation", (string)null); + b.ToTable("Adm_T_Reservation", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Risk", b => @@ -14252,7 +14255,7 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.ToTable("Net_T_ShuttleRoute", (string)null); + b.ToTable("Adm_T_ShuttleRoute", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Skill", b => @@ -14485,7 +14488,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialPostId"); - b.ToTable("Net_T_SocialComment", (string)null); + b.ToTable("Adm_T_SocialComment", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialLike", b => @@ -14539,7 +14542,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialPostId"); - b.ToTable("Net_T_SocialLike", (string)null); + b.ToTable("Adm_T_SocialLike", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialLocation", b => @@ -14608,7 +14611,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialPostId") .IsUnique(); - b.ToTable("Net_T_SocialLocation", (string)null); + b.ToTable("Adm_T_SocialLocation", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialMedia", b => @@ -14681,7 +14684,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialPostId") .IsUnique(); - b.ToTable("Net_T_SocialMedia", (string)null); + b.ToTable("Adm_T_SocialMedia", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialPollOption", b => @@ -14738,7 +14741,7 @@ namespace Erp.Platform.Migrations b.HasIndex("SocialMediaId"); - b.ToTable("Net_T_SocialPollOption", (string)null); + b.ToTable("Adm_T_SocialPollOption", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SocialPost", b => @@ -14807,7 +14810,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("Net_T_SocialPost", (string)null); + b.ToTable("Adm_T_SocialPost", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Source", b => @@ -15576,7 +15579,7 @@ namespace Erp.Platform.Migrations b.HasKey("Id"); - b.ToTable("Net_T_Training", (string)null); + b.ToTable("Adm_T_Training", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Type", b => @@ -15999,7 +16002,7 @@ namespace Erp.Platform.Migrations b.HasIndex("EmployeeId"); - b.ToTable("Net_T_Visitor", (string)null); + b.ToTable("Adm_T_Visitor", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => diff --git a/api/src/Erp.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs b/api/src/Erp.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs index 2c897eb9..960fe1f9 100644 --- a/api/src/Erp.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs +++ b/api/src/Erp.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs @@ -54,6 +54,7 @@ using Volo.Abp.VirtualFileSystem; using Erp.Platform.DynamicServices; using static Erp.Platform.PlatformConsts; using static Erp.Settings.SettingsConsts; +using Hangfire.SqlServer; namespace Erp.Platform; @@ -109,7 +110,7 @@ public class PlatformHttpApiHostModule : AbpModule //TenantLocalization Middleware kaydı context.Services.AddTransient(); context.Services.AddTransient(); - + ConfigureAuthentication(context); ConfigureBundles(); ConfigureUrls(configuration); @@ -124,7 +125,7 @@ public class PlatformHttpApiHostModule : AbpModule ConfigureHangfire(context, configuration); ConfigureBlobStoring(configuration); ConfigureAuditing(); - + ConfigureDynamicServices(context); context.Services.AddSignalR(); @@ -314,29 +315,39 @@ public class PlatformHttpApiHostModule : AbpModule { Configure(options => { - options.ServerOptions = new BackgroundJobServerOptions() + options.ServerOptions = new BackgroundJobServerOptions { Queues = ["default", "platform"] }; }); - context.Services.AddHangfire(config => + if (DefaultDatabaseProvider == DatabaseProvider.PostgreSql) { - switch (DefaultDatabaseProvider) + context.Services.AddHangfire(options => { - case DatabaseProvider.PostgreSql: - config.UsePostgreSqlStorage(c => - c.UseNpgsqlConnection(configuration.GetConnectionString(DefaultDatabaseProvider))); - break; - case DatabaseProvider.SqlServer: - config.UseSqlServerStorage(configuration.GetConnectionString(DefaultDatabaseProvider)); - break; - default: - throw new InvalidOperationException("Unsupported database provider configured for Hangfire."); - } - }); + options.UsePostgreSqlStorage( + configuration.GetConnectionString(DefaultDatabaseProvider), + new PostgreSqlStorageOptions + { + PrepareSchemaIfNecessary = true + }); + }); + } + else if (DefaultDatabaseProvider == DatabaseProvider.SqlServer) + { + context.Services.AddHangfire(options => + { + options.UseSqlServerStorage( + configuration.GetConnectionString(DefaultDatabaseProvider), + new SqlServerStorageOptions + { + PrepareSchemaIfNecessary = true + }); + }); + } } + private void ConfigureBlobStoring(IConfiguration configuration) { Configure(options => @@ -363,14 +374,14 @@ public class PlatformHttpApiHostModule : AbpModule { // Dynamic AppService Background Service context.Services.AddHostedService(); - + // Roslyn Compiler context.Services.AddSingleton(); - + // Action descriptor change provider for runtime controller registration context.Services.AddSingleton(); context.Services.AddSingleton(sp => sp.GetRequiredService()); - + // Custom controller activator for dynamic dependency injection context.Services.AddSingleton(); } diff --git a/ui/src/components/developerKit/EntityEditor.tsx b/ui/src/components/developerKit/EntityEditor.tsx index 1037b3be..622613b0 100644 --- a/ui/src/components/developerKit/EntityEditor.tsx +++ b/ui/src/components/developerKit/EntityEditor.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import React, { useState, useEffect, useMemo } from 'react' import { useParams, useNavigate } from 'react-router-dom' import { useEntities, EntityFieldType } from '../../contexts/EntityContext' import { @@ -18,7 +18,7 @@ import { Formik, Form, Field, FieldProps, FieldArray } from 'formik' import * as Yup from 'yup' import { FormItem, Input, Select, Checkbox, FormContainer, Button } from '@/components/ui' import { SelectBoxOption } from '@/types/shared' -import { MenuPrefixEnum, menuPrefixValues, toPrefix } from '@/types/menu' +import { useStoreState } from '@/store/store' // Validation schema const validationSchema = Yup.object({ @@ -50,11 +50,38 @@ const EntityEditor: React.FC = () => { const { id } = useParams() const navigate = useNavigate() const { translate } = useLocalization() - + const { mainMenu } = useStoreState((state) => state.abpConfig.menu) const { getEntity, addEntity, updateEntity } = useEntities() const isEditing = !!id + // Convert first level menu items to select options with prefix + const menuOptions = useMemo(() => { + if (!mainMenu || mainMenu.length === 0) return [] + + const prefixMap: Record = { + 'Platform': 'Plat', + 'Saas': 'Sas', + 'Administration': 'Adm', + 'Participant': 'Prt', + 'Coordinator': 'Crd', + 'Crm': 'Crm', + 'SupplyChain': 'Scp', + 'Maintenance': 'Mnt', + 'Warehouse': 'Str', + 'Project': 'Prj', + 'Hr': 'Hr', + 'Mrp': 'Mrp', + 'Accounting': 'Acc', + } + + return mainMenu.map((menuItem) => ({ + value: menuItem.key, + label: menuItem.title, + prefix: menuItem.shortName || prefixMap[menuItem.key] || menuItem.key.substring(0, 3), + })) + }, [mainMenu]) + // Initial values for Formik const [initialValues, setInitialValues] = useState({ menu: '', @@ -154,13 +181,9 @@ const EntityEditor: React.FC = () => { // Helper function to generate table name const generateTableName = (menuValue: string, entityName: string): string => { if (!menuValue || !entityName) return '' - try { - const menuPrefix = toPrefix(menuValue as MenuPrefixEnum) - return `${menuPrefix}_D_${entityName}` - } catch (error) { - console.error('Error generating table name:', error) - return '' - } + const selectedMenu = menuOptions.find((opt) => opt.value === menuValue) + if (!selectedMenu) return '' + return `${selectedMenu.prefix}_D_${entityName}` } const fieldTypes = [ @@ -283,9 +306,9 @@ const EntityEditor: React.FC = () => {