From 906e54d80b5e4b0ba0fc712418a1394de210ef5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:59:44 +0300 Subject: [PATCH] =?UTF-8?q?Tan=C4=B1mlamalar=C4=B1n=20Guid=20->=20string?= =?UTF-8?q?=20d=C3=B6n=C3=BC=C5=9Ft=C3=BCr=C3=BCld=C3=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Intranet/CurrencyDto.cs | 2 +- .../Public/PaymentMethodDto.cs | 2 +- .../Uom/UomDto.cs | 2 +- .../Public/PublicAppService.cs | 4 +- .../Seeds/HostData.json | 338 +++--- .../Seeds/HostDataSeeder.cs | 23 +- .../Seeds/ListFormSeeder_Accounting.cs | 125 +- .../Seeds/ListFormSeeder_Administration.cs | 118 +- .../Seeds/ListFormSeeder_Coordinator.cs | 48 +- .../Seeds/ListFormSeeder_Crm.cs | 74 +- .../Seeds/ListFormSeeder_Hr.cs | 72 +- .../Seeds/ListFormSeeder_Intranet.cs | 40 +- .../Seeds/ListFormSeeder_Maintenance.cs | 86 +- .../Seeds/ListFormSeeder_Mrp.cs | 88 +- .../Seeds/ListFormSeeder_Participant.cs | 24 +- .../Seeds/ListFormSeeder_Project.cs | 74 +- .../Seeds/ListFormSeeder_Saas.cs | 72 +- .../Seeds/ListFormSeeder_Store.cs | 164 +-- .../Seeds/ListFormSeeder_SupplyChain.cs | 156 +-- .../Seeds/SeederDefaults.cs | 8 +- .../Entities/Branch/Accounting/CheckNote.cs | 4 +- .../Branch/Accounting/CurrentAccount.cs | 2 +- .../Entities/Branch/Accounting/Invoice.cs | 6 +- .../Entities/Branch/Accounting/InvoiceItem.cs | 4 +- .../Entities/Branch/Accounting/Waybill.cs | 4 +- .../Entities/Branch/Accounting/WaybillItem.cs | 4 +- .../Entities/Host/Country.cs | 4 +- .../Entities/Host/CountryGroup.cs | 4 +- .../Entities/Host/Currency.cs | 8 +- .../Entities/Host/ForumTopic.cs | 3 +- .../Entities/Tenant/Accounting/CheckStatus.cs | 7 +- .../Entities/Tenant/Accounting/CheckType.cs | 7 +- .../Tenant/Accounting/InvoiceStatus.cs | 7 +- .../Entities/Tenant/Accounting/InvoiceType.cs | 7 +- .../Tenant/Accounting/PaymentStatus.cs | 7 +- .../Tenant/Accounting/WaybillStatus.cs | 7 +- .../Entities/Tenant/Accounting/WaybillType.cs | 7 +- .../Tenant/Administration/BlogPost.cs | 4 +- .../Tenant/Administration/PaymentMethod.cs | 8 +- .../Entities/Tenant/Administration/Sector.cs | 10 +- .../Entities/Tenant/Administration/Uom.cs | 24 +- .../Tenant/Administration/UomCategory.cs | 7 +- .../Entities/Tenant/Crm/SalesOrder.cs | 5 +- .../Entities/Tenant/Crm/SalesOrderItem.cs | 3 +- .../Entities/Tenant/Crm/SalesOrderStatus.cs | 7 +- .../Entities/Tenant/Hr/CostCenter.cs | 3 +- .../Entities/Tenant/Hr/Department.cs | 9 +- .../Entities/Tenant/Hr/Employee.cs | 17 +- .../Entities/Tenant/Maintenance/Fault.cs | 6 +- .../Tenant/Maintenance/FaultStatus.cs | 7 +- .../Entities/Tenant/Maintenance/FaultType.cs | 7 +- .../Entities/Tenant/Maintenance/PlanWizard.cs | 4 +- .../Entities/Tenant/Maintenance/Workcenter.cs | 19 +- .../Maintenance/WorkcenterSpecification.cs | 12 +- .../Tenant/Maintenance/WorkcenterStatus.cs | 7 +- .../Tenant/Maintenance/WorkcenterType.cs | 7 +- .../Entities/Tenant/Maintenance/Workorder.cs | 5 +- .../Tenant/Maintenance/WorkorderStatus.cs | 7 +- .../Tenant/Maintenance/WorkorderType.cs | 7 +- .../Entities/Tenant/Mrp/Bom.cs | 2 +- .../Entities/Tenant/Mrp/BomComponent.cs | 3 +- .../Entities/Tenant/Mrp/BomOperation.cs | 2 +- .../Entities/Tenant/Mrp/BomType.cs | 7 +- .../Entities/Tenant/Mrp/Operation.cs | 2 +- .../Entities/Tenant/Mrp/ProductionOrder.cs | 9 +- .../Tenant/Mrp/ProductionOrderItem.cs | 3 +- .../Tenant/Mrp/ProductionOrderStatus.cs | 7 +- .../Tenant/Mrp/ProductionOrderType.cs | 7 +- .../Tenant/Mrp/ProductionWorkorder.cs | 4 +- .../Entities/Tenant/Project/Category.cs | 7 +- .../Entities/Tenant/Project/Project.cs | 4 +- .../Entities/Tenant/Project/ProjectPhase.cs | 4 +- .../Entities/Tenant/Project/ProjectRisk.cs | 2 +- .../Entities/Tenant/Project/ProjectTask.cs | 5 +- .../Tenant/Project/ProjectTaskDaily.cs | 4 +- .../Entities/Tenant/Project/Risk.cs | 7 +- .../Entities/Tenant/Project/Status.cs | 7 +- .../Entities/Tenant/Project/TaskType.cs | 7 +- .../Entities/Tenant/Project/Type.cs | 7 +- .../Entities/Tenant/Project/WorkType.cs | 8 +- .../Entities/Tenant/Store/Inventory.cs | 10 +- .../Entities/Tenant/Store/Location.cs | 16 +- .../Entities/Tenant/Store/LocationType.cs | 7 +- .../Entities/Tenant/Store/Movement.cs | 2 +- .../Entities/Tenant/Store/MovementItem.cs | 10 +- .../Entities/Tenant/Store/MovementType.cs | 7 +- .../Entities/Tenant/Store/Putaway.cs | 6 +- .../Entities/Tenant/Store/ReferenceType.cs | 7 +- .../Entities/Tenant/Store/Warehouse.cs | 10 +- .../Entities/Tenant/Store/WarehouseType.cs | 7 +- .../Entities/Tenant/Store/Zone.cs | 12 +- .../Entities/Tenant/Store/ZoneType.cs | 7 +- .../Tenant/SupplyChain/CustomerSegment.cs | 7 +- .../Tenant/SupplyChain/CustomerType.cs | 6 +- .../Tenant/SupplyChain/DeliveryTerm.cs | 7 +- .../Entities/Tenant/SupplyChain/Material.cs | 7 +- .../SupplyChain/MaterialSpecification.cs | 7 +- .../Tenant/SupplyChain/OrderStatus.cs | 8 +- .../Entities/Tenant/SupplyChain/Partner.cs | 12 +- .../Tenant/SupplyChain/PaymentTerm.cs | 7 +- .../Tenant/SupplyChain/PurchaseOrder.cs | 2 +- .../Tenant/SupplyChain/PurchaseOrderItem.cs | 5 +- .../Entities/Tenant/SupplyChain/Quotation.cs | 9 +- .../Tenant/SupplyChain/QuotationItem.cs | 3 +- .../Tenant/SupplyChain/QuotationStatus.cs | 7 +- .../Entities/Tenant/SupplyChain/Request.cs | 2 +- .../Tenant/SupplyChain/RequestItem.cs | 5 +- .../Tenant/SupplyChain/RequestType.cs | 7 +- .../Tenant/SupplyChain/SupplyCardType.cs | 7 +- .../Entities/Tenant/SupplyChain/SupplyType.cs | 7 +- .../EntityFrameworkCore/PlatformDbContext.cs | 285 ++++- ....cs => 20251211134804_Initial.Designer.cs} | 988 ++++++++++------ ...2_Initial.cs => 20251211134804_Initial.cs} | 1033 ++++++++++------- .../PlatformDbContextModelSnapshot.cs | 986 ++++++++++------ .../Tenants/Seeds/TenantData.json | 51 +- .../Tenants/TenantDataSeeder.cs | 292 ++--- .../Tenants/TenantDatabaseViewCreator.cs | 4 +- .../Tenants/TenantSeederDto.cs | 10 +- 118 files changed, 3508 insertions(+), 2262 deletions(-) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251210125522_Initial.Designer.cs => 20251211134804_Initial.Designer.cs} (96%) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251210125522_Initial.cs => 20251211134804_Initial.cs} (96%) diff --git a/api/src/Erp.Platform.Application.Contracts/Intranet/CurrencyDto.cs b/api/src/Erp.Platform.Application.Contracts/Intranet/CurrencyDto.cs index 317d8530..b3957dd0 100644 --- a/api/src/Erp.Platform.Application.Contracts/Intranet/CurrencyDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Intranet/CurrencyDto.cs @@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos; namespace Erp.Platform.Intranet; -public class CurrencyDto : FullAuditedEntityDto +public class CurrencyDto : FullAuditedEntityDto { public string Code { get; set; } // TRY, USD, EUR public string Symbol { get; set; } // ₺, $, etc. diff --git a/api/src/Erp.Platform.Application.Contracts/Public/PaymentMethodDto.cs b/api/src/Erp.Platform.Application.Contracts/Public/PaymentMethodDto.cs index 2c056f14..dcda103c 100644 --- a/api/src/Erp.Platform.Application.Contracts/Public/PaymentMethodDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Public/PaymentMethodDto.cs @@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos; namespace Erp.Platform.Public; -public class PaymentMethodDto : EntityDto +public class PaymentMethodDto : EntityDto { public Guid? TenantId { get; set; } diff --git a/api/src/Erp.Platform.Application.Contracts/Uom/UomDto.cs b/api/src/Erp.Platform.Application.Contracts/Uom/UomDto.cs index caf1a04b..4fade321 100644 --- a/api/src/Erp.Platform.Application.Contracts/Uom/UomDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Uom/UomDto.cs @@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos; namespace Erp.Platform.Uoms; -public class UomDto : AuditedEntityDto +public class UomDto : AuditedEntityDto { public string Name { get; set; } public UomType Type { get; set; } diff --git a/api/src/Erp.Platform.Application/Public/PublicAppService.cs b/api/src/Erp.Platform.Application/Public/PublicAppService.cs index 9c327347..e9feeba0 100644 --- a/api/src/Erp.Platform.Application/Public/PublicAppService.cs +++ b/api/src/Erp.Platform.Application/Public/PublicAppService.cs @@ -25,7 +25,7 @@ public class PublicAppService : PlatformAppService private readonly IRepository _postRepository; private readonly IRepository _categoryRepository; private readonly IRepository _productRepository; - private readonly IRepository _paymentMethodRepository; + private readonly IRepository _paymentMethodRepository; private readonly IRepository _installmentOptionRepository; private readonly IRepository _orderRepository; private readonly IRepository _aboutRepository; @@ -40,7 +40,7 @@ public class PublicAppService : PlatformAppService IRepository postRepository, IRepository categoryRepository, IRepository productRepository, - IRepository paymentMethodRepository, + IRepository paymentMethodRepository, IRepository installmentOptionRepository, IRepository orderRepository, IRepository aboutRepository, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/HostData.json b/api/src/Erp.Platform.DbMigrator/Seeds/HostData.json index 73feb639..e612162e 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/HostData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/HostData.json @@ -1091,1183 +1091,1183 @@ ], "Currencies": [ { - "Code": "TRY", + "Id": "TRY", "Symbol": "₺", "Name": "Turkish lira", "Rate": 1.0, "IsActive": true }, { - "Code": "USD", + "Id": "USD", "Symbol": "$", "Name": "United States dollar", "Rate": 1.0, "IsActive": true }, { - "Code": "AED", + "Id": "AED", "Symbol": "د.إ", "Name": "United Arab Emirates dirham", "Rate": 1.0, "IsActive": false }, { - "Code": "AFN", + "Id": "AFN", "Symbol": "Afs", "Name": "Afghan afghani", "Rate": 1.0, "IsActive": false }, { - "Code": "ALL", + "Id": "ALL", "Symbol": "L", "Name": "Albanian lek", "Rate": 1.0, "IsActive": false }, { - "Code": "AMD", + "Id": "AMD", "Symbol": "դր.", "Name": "Armenian dram", "Rate": 1.0, "IsActive": false }, { - "Code": "ANG", + "Id": "ANG", "Symbol": "ƒ", "Name": "Netherlands Antillean guilder", "Rate": 1.0, "IsActive": false }, { - "Code": "AOA", + "Id": "AOA", "Symbol": "Kz", "Name": "Angolan kwanza", "Rate": 1.0, "IsActive": false }, { - "Code": "ARS", + "Id": "ARS", "Symbol": "$", "Name": "Argentine peso", "Rate": 1.0, "IsActive": false }, { - "Code": "AUD", + "Id": "AUD", "Symbol": "$", "Name": "Australian dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "AWG", + "Id": "AWG", "Symbol": "Afl.", "Name": "Aruban florin", "Rate": 1.0, "IsActive": false }, { - "Code": "AZN", + "Id": "AZN", "Symbol": "m", "Name": "Azerbaijani manat", "Rate": 1.0, "IsActive": false }, { - "Code": "BAM", + "Id": "BAM", "Symbol": "KM", "Name": "Bosnia and Herzegovina convertible mark", "Rate": 1.0, "IsActive": false }, { - "Code": "BBD", + "Id": "BBD", "Symbol": "Bds$", "Name": "Barbados dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "BDT", + "Id": "BDT", "Symbol": "৳", "Name": "Bangladeshi taka", "Rate": 1.0, "IsActive": false }, { - "Code": "BGN", + "Id": "BGN", "Symbol": "лв", "Name": "Bulgarian lev", "Rate": 1.0, "IsActive": false }, { - "Code": "BHD", + "Id": "BHD", "Symbol": "BD", "Name": "Bahraini dinar", "Rate": 1.0, "IsActive": false }, { - "Code": "BIF", + "Id": "BIF", "Symbol": "FBu", "Name": "Burundian franc", "Rate": 1.0, "IsActive": false }, { - "Code": "BMD", + "Id": "BMD", "Symbol": "BD$", "Name": "Bermudian dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "BND", + "Id": "BND", "Symbol": "$", "Name": "Brunei dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "BOB", + "Id": "BOB", "Symbol": "Bs.", "Name": "Boliviano", "Rate": 1.0, "IsActive": false }, { - "Code": "BRL", + "Id": "BRL", "Symbol": "R$", "Name": "Brazilian real", "Rate": 1.0, "IsActive": false }, { - "Code": "BSD", + "Id": "BSD", "Symbol": "B$", "Name": "Bahamian dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "BTN", + "Id": "BTN", "Symbol": "Nu.", "Name": "Bhutanese ngultrum", "Rate": 1.0, "IsActive": false }, { - "Code": "BWP", + "Id": "BWP", "Symbol": "P", "Name": "Botswana pula", "Rate": 1.0, "IsActive": false }, { - "Code": "BYN", + "Id": "BYN", "Symbol": "Br", "Name": "Belarusian ruble", "Rate": 1.0, "IsActive": false }, { - "Code": "BYR", + "Id": "BYR", "Symbol": "BR", "Name": "Belarusian ruble", "Rate": 1.0, "IsActive": false }, { - "Code": "BZD", + "Id": "BZD", "Symbol": "BZ$", "Name": "Belize dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "CAD", + "Id": "CAD", "Symbol": "$", "Name": "Canadian dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "CDF", + "Id": "CDF", "Symbol": "Fr", "Name": "Congolese franc", "Rate": 1.0, "IsActive": false }, { - "Code": "CHF", + "Id": "CHF", "Symbol": "CHF", "Name": "Swiss franc", "Rate": 1.0, "IsActive": false }, { - "Code": "CLF", + "Id": "CLF", "Symbol": "$", "Name": "Unidad de Fomento", "Rate": 1.0, "IsActive": false }, { - "Code": "CLP", + "Id": "CLP", "Symbol": "$", "Name": "Chilean peso", "Rate": 1.0, "IsActive": false }, { - "Code": "CNH", + "Id": "CNH", "Symbol": "¥", "Name": "Chinese yuan - Offshore", "Rate": 1.0, "IsActive": false }, { - "Code": "CNY", + "Id": "CNY", "Symbol": "¥", "Name": "Chinese yuan", "Rate": 1.0, "IsActive": false }, { - "Code": "COP", + "Id": "COP", "Symbol": "$", "Name": "Colombian peso", "Rate": 1.0, "IsActive": false }, { - "Code": "COU", + "Id": "COU", "Symbol": "$", "Name": "Unidad de Valor Real", "Rate": 1.0, "IsActive": false }, { - "Code": "CRC", + "Id": "CRC", "Symbol": "₡", "Name": "Costa Rican colón", "Rate": 1.0, "IsActive": false }, { - "Code": "CUC", + "Id": "CUC", "Symbol": "$", "Name": "Cuban convertible peso", "Rate": 1.0, "IsActive": false }, { - "Code": "CUP", + "Id": "CUP", "Symbol": "$", "Name": "Cuban peso", "Rate": 1.0, "IsActive": false }, { - "Code": "CVE", + "Id": "CVE", "Symbol": "$", "Name": "Cape Verdean escudo", "Rate": 1.0, "IsActive": false }, { - "Code": "CZK", + "Id": "CZK", "Symbol": "Kč", "Name": "Czech koruna", "Rate": 1.0, "IsActive": false }, { - "Code": "DJF", + "Id": "DJF", "Symbol": "Fdj", "Name": "Djiboutian franc", "Rate": 1.0, "IsActive": false }, { - "Code": "DKK", + "Id": "DKK", "Symbol": "kr", "Name": "Danish krone", "Rate": 1.0, "IsActive": false }, { - "Code": "DOP", + "Id": "DOP", "Symbol": "RD$", "Name": "Dominican peso", "Rate": 1.0, "IsActive": false }, { - "Code": "DZD", + "Id": "DZD", "Symbol": "DA", "Name": "Algerian dinar", "Rate": 1.0, "IsActive": false }, { - "Code": "EGP", + "Id": "EGP", "Symbol": "LE", "Name": "Egyptian pound", "Rate": 1.0, "IsActive": false }, { - "Code": "ERN", + "Id": "ERN", "Symbol": "Nfk", "Name": "Eritrean nakfa", "Rate": 1.0, "IsActive": false }, { - "Code": "ETB", + "Id": "ETB", "Symbol": "Br", "Name": "Ethiopian birr", "Rate": 1.0, "IsActive": false }, { - "Code": "EUR", + "Id": "EUR", "Symbol": "€", "Name": "Euro", "Rate": 1.0, "IsActive": false }, { - "Code": "FJD", + "Id": "FJD", "Symbol": "FJ$", "Name": "Fiji dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "FKP", + "Id": "FKP", "Symbol": "£", "Name": "Falkland Islands pound", "Rate": 1.0, "IsActive": false }, { - "Code": "GBP", + "Id": "GBP", "Symbol": "£", "Name": "Pound sterling", "Rate": 1.0, "IsActive": false }, { - "Code": "GEL", + "Id": "GEL", "Symbol": "ლ", "Name": "Georgian lari", "Rate": 1.0, "IsActive": false }, { - "Code": "GHS", + "Id": "GHS", "Symbol": "GH¢", "Name": "Ghanaian cedi", "Rate": 1.0, "IsActive": false }, { - "Code": "GIP", + "Id": "GIP", "Symbol": "£", "Name": "Gibraltar pound", "Rate": 1.0, "IsActive": false }, { - "Code": "GMD", + "Id": "GMD", "Symbol": "D", "Name": "Gambian dalasi", "Rate": 1.0, "IsActive": false }, { - "Code": "GNF", + "Id": "GNF", "Symbol": "FG", "Name": "Guinean franc", "Rate": 1.0, "IsActive": false }, { - "Code": "GTQ", + "Id": "GTQ", "Symbol": "Q", "Name": "Guatemalan Quetzal", "Rate": 1.0, "IsActive": false }, { - "Code": "GYD", + "Id": "GYD", "Symbol": "$", "Name": "Guyanese dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "HKD", + "Id": "HKD", "Symbol": "$", "Name": "Hong Kong dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "HNL", + "Id": "HNL", "Symbol": "L", "Name": "Honduran lempira", "Rate": 1.0, "IsActive": false }, { - "Code": "HRK", + "Id": "HRK", "Symbol": "kn", "Name": "Croatian kuna", "Rate": 1.0, "IsActive": false }, { - "Code": "HTG", + "Id": "HTG", "Symbol": "G", "Name": "Haitian gourde", "Rate": 1.0, "IsActive": false }, { - "Code": "HUF", + "Id": "HUF", "Symbol": "Ft", "Name": "Hungarian forint", "Rate": 1.0, "IsActive": false }, { - "Code": "IDR", + "Id": "IDR", "Symbol": "Rp", "Name": "Indonesian rupiah", "Rate": 1.0, "IsActive": false }, { - "Code": "ILS", + "Id": "ILS", "Symbol": "₪", "Name": "Israeli new shekel", "Rate": 1.0, "IsActive": false }, { - "Code": "INR", + "Id": "INR", "Symbol": "₹", "Name": "Indian rupee", "Rate": 1.0, "IsActive": false }, { - "Code": "IQD", + "Id": "IQD", "Symbol": "ع.د", "Name": "Iraqi dinar", "Rate": 1.0, "IsActive": false }, { - "Code": "IRR", + "Id": "IRR", "Symbol": "﷼", "Name": "Iranian rial", "Rate": 1.0, "IsActive": false }, { - "Code": "ISK", + "Id": "ISK", "Symbol": "kr", "Name": "Icelandic króna", "Rate": 1.0, "IsActive": false }, { - "Code": "JMD", + "Id": "JMD", "Symbol": "$", "Name": "Jamaican dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "JOD", + "Id": "JOD", "Symbol": "د.ا", "Name": "Jordanian dinar", "Rate": 1.0, "IsActive": false }, { - "Code": "JPY", + "Id": "JPY", "Symbol": "¥", "Name": "Japanese yen", "Rate": 1.0, "IsActive": false }, { - "Code": "KES", + "Id": "KES", "Symbol": "KSh", "Name": "Kenyan shilling", "Rate": 1.0, "IsActive": false }, { - "Code": "KGS", + "Id": "KGS", "Symbol": "лв", "Name": "Kyrgyzstani som", "Rate": 1.0, "IsActive": false }, { - "Code": "KHR", + "Id": "KHR", "Symbol": "៛", "Name": "Cambodian riel", "Rate": 1.0, "IsActive": false }, { - "Code": "KMF", + "Id": "KMF", "Symbol": "CF", "Name": "Comorian franc", "Rate": 1.0, "IsActive": false }, { - "Code": "KPW", + "Id": "KPW", "Symbol": "₩", "Name": "North Korean won", "Rate": 1.0, "IsActive": false }, { - "Code": "KRW", + "Id": "KRW", "Symbol": "₩", "Name": "South Korean won", "Rate": 1.0, "IsActive": false }, { - "Code": "KWD", + "Id": "KWD", "Symbol": "د.ك", "Name": "Kuwaiti dinar", "Rate": 1.0, "IsActive": false }, { - "Code": "KYD", + "Id": "KYD", "Symbol": "$", "Name": "Cayman Islands dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "KZT", + "Id": "KZT", "Symbol": "₸", "Name": "Kazakhstani tenge", "Rate": 1.0, "IsActive": false }, { - "Code": "LAK", + "Id": "LAK", "Symbol": "₭", "Name": "Lao kip", "Rate": 1.0, "IsActive": false }, { - "Code": "LBP", + "Id": "LBP", "Symbol": "ل.ل", "Name": "Lebanese pound", "Rate": 1.0, "IsActive": false }, { - "Code": "LKR", + "Id": "LKR", "Symbol": "Rs", "Name": "Sri Lankan rupee", "Rate": 1.0, "IsActive": false }, { - "Code": "LRD", + "Id": "LRD", "Symbol": "L$", "Name": "Liberian dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "LSL", + "Id": "LSL", "Symbol": "M", "Name": "Lesotho loti", "Rate": 1.0, "IsActive": false }, { - "Code": "LTL", + "Id": "LTL", "Symbol": "Lt", "Name": "Lithuanian litas", "Rate": 1.0, "IsActive": false }, { - "Code": "LVL", + "Id": "LVL", "Symbol": "Ls", "Name": "Latvian lats", "Rate": 1.0, "IsActive": false }, { - "Code": "LYD", + "Id": "LYD", "Symbol": "ل.د", "Name": "Libyan dinar", "Rate": 1.0, "IsActive": false }, { - "Code": "MAD", + "Id": "MAD", "Symbol": "DH", "Name": "Moroccan dirham", "Rate": 1.0, "IsActive": false }, { - "Code": "MDL", + "Id": "MDL", "Symbol": "L", "Name": "Moldovan leu", "Rate": 1.0, "IsActive": false }, { - "Code": "MGA", + "Id": "MGA", "Symbol": "Ar", "Name": "Malagasy ariary", "Rate": 1.0, "IsActive": false }, { - "Code": "MKD", + "Id": "MKD", "Symbol": "ден", "Name": "Macedonian denar", "Rate": 1.0, "IsActive": false }, { - "Code": "MMK", + "Id": "MMK", "Symbol": "K", "Name": "Myanmar kyat", "Rate": 1.0, "IsActive": false }, { - "Code": "MNT", + "Id": "MNT", "Symbol": "₮", "Name": "Mongolian tögrög", "Rate": 1.0, "IsActive": false }, { - "Code": "MOP", + "Id": "MOP", "Symbol": "MOP$", "Name": "Macanese pataca", "Rate": 1.0, "IsActive": false }, { - "Code": "MRO", + "Id": "MRO", "Symbol": "UM", "Name": "Mauritanian ouguiya (old)", "Rate": 1.0, "IsActive": false }, { - "Code": "MRU", + "Id": "MRU", "Symbol": "UM", "Name": "Mauritanian ouguiya", "Rate": 1.0, "IsActive": false }, { - "Code": "MUR", + "Id": "MUR", "Symbol": "Rs", "Name": "Mauritian rupee", "Rate": 1.0, "IsActive": false }, { - "Code": "MVR", + "Id": "MVR", "Symbol": "Rf", "Name": "Maldivian rufiyaa", "Rate": 1.0, "IsActive": false }, { - "Code": "MWK", + "Id": "MWK", "Symbol": "MK", "Name": "Malawian kwacha", "Rate": 1.0, "IsActive": false }, { - "Code": "MXN", + "Id": "MXN", "Symbol": "$", "Name": "Mexican peso", "Rate": 1.0, "IsActive": false }, { - "Code": "MYR", + "Id": "MYR", "Symbol": "RM", "Name": "Malaysian ringgit", "Rate": 1.0, "IsActive": false }, { - "Code": "MZN", + "Id": "MZN", "Symbol": "MT", "Name": "Mozambican metical", "Rate": 1.0, "IsActive": false }, { - "Code": "NAD", + "Id": "NAD", "Symbol": "$", "Name": "Namibian dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "NGN", + "Id": "NGN", "Symbol": "₦", "Name": "Nigerian naira", "Rate": 1.0, "IsActive": false }, { - "Code": "NIO", + "Id": "NIO", "Symbol": "C$", "Name": "Nicaraguan córdoba", "Rate": 1.0, "IsActive": false }, { - "Code": "NOK", + "Id": "NOK", "Symbol": "kr", "Name": "Norwegian krone", "Rate": 1.0, "IsActive": false }, { - "Code": "NPR", + "Id": "NPR", "Symbol": "₨", "Name": "Nepalese rupee", "Rate": 1.0, "IsActive": false }, { - "Code": "NZD", + "Id": "NZD", "Symbol": "$", "Name": "New Zealand dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "OMR", + "Id": "OMR", "Symbol": "ر.ع.", "Name": "Omani rial", "Rate": 1.0, "IsActive": false }, { - "Code": "PAB", + "Id": "PAB", "Symbol": "B/.", "Name": "Panamanian balboa", "Rate": 1.0, "IsActive": false }, { - "Code": "PEN", + "Id": "PEN", "Symbol": "S/", "Name": "Peruvian sol", "Rate": 1.0, "IsActive": false }, { - "Code": "PGK", + "Id": "PGK", "Symbol": "K", "Name": "Papua New Guinean kina", "Rate": 1.0, "IsActive": false }, { - "Code": "PHP", + "Id": "PHP", "Symbol": "₱", "Name": "Philippine peso", "Rate": 1.0, "IsActive": false }, { - "Code": "PKR", + "Id": "PKR", "Symbol": "Rs.", "Name": "Pakistani rupee", "Rate": 1.0, "IsActive": false }, { - "Code": "PLN", + "Id": "PLN", "Symbol": "zł", "Name": "Polish złoty", "Rate": 1.0, "IsActive": false }, { - "Code": "PYG", + "Id": "PYG", "Symbol": "₲", "Name": "Paraguayan guaraní", "Rate": 1.0, "IsActive": false }, { - "Code": "QAR", + "Id": "QAR", "Symbol": "QR", "Name": "Qatari riyal", "Rate": 1.0, "IsActive": false }, { - "Code": "RON", + "Id": "RON", "Symbol": "lei", "Name": "Romanian leu", "Rate": 1.0, "IsActive": false }, { - "Code": "RSD", + "Id": "RSD", "Symbol": "din.", "Name": "Serbian dinar", "Rate": 1.0, "IsActive": false }, { - "Code": "RUB", + "Id": "RUB", "Symbol": "руб", "Name": "Russian ruble", "Rate": 1.0, "IsActive": false }, { - "Code": "RWF", + "Id": "RWF", "Symbol": "RF", "Name": "Rwandan franc", "Rate": 1.0, "IsActive": false }, { - "Code": "SAR", + "Id": "SAR", "Symbol": "SR", "Name": "Saudi riyal", "Rate": 1.0, "IsActive": false }, { - "Code": "SBD", + "Id": "SBD", "Symbol": "SI$", "Name": "Solomon Islands dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "SCR", + "Id": "SCR", "Symbol": "SR", "Name": "Seychellois rupee", "Rate": 1.0, "IsActive": false }, { - "Code": "SDG", + "Id": "SDG", "Symbol": "ج.س.", "Name": "Sudanese pound", "Rate": 1.0, "IsActive": false }, { - "Code": "SEK", + "Id": "SEK", "Symbol": "kr", "Name": "Swedish krona", "Rate": 1.0, "IsActive": false }, { - "Code": "SGD", + "Id": "SGD", "Symbol": "S$", "Name": "Singapore dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "SHP", + "Id": "SHP", "Symbol": "£", "Name": "Saint Helena pound", "Rate": 1.0, "IsActive": false }, { - "Code": "SLE", + "Id": "SLE", "Symbol": "Le", "Name": "Sierra Leonean leone", "Rate": 1.0, "IsActive": false }, { - "Code": "SLL", + "Id": "SLL", "Symbol": "Le", "Name": "Sierra Leonean leone", "Rate": 1.0, "IsActive": false }, { - "Code": "SOS", + "Id": "SOS", "Symbol": "Sh.", "Name": "Somali shilling", "Rate": 1.0, "IsActive": false }, { - "Code": "SRD", + "Id": "SRD", "Symbol": "$", "Name": "Surinamese dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "SSP", + "Id": "SSP", "Symbol": "£", "Name": "South Sudanese pound", "Rate": 1.0, "IsActive": false }, { - "Code": "STD", + "Id": "STD", "Symbol": "Db", "Name": "São Tomé and Príncipe dobra", "Rate": 1.0, "IsActive": false }, { - "Code": "STN", + "Id": "STN", "Symbol": "Db", "Name": "São Tomé and Príncipe dobra", "Rate": 1.0, "IsActive": false }, { - "Code": "SVC", + "Id": "SVC", "Symbol": "¢", "Name": "Salvadoran Colon", "Rate": 1.0, "IsActive": false }, { - "Code": "SYP", + "Id": "SYP", "Symbol": "£", "Name": "Syrian pound", "Rate": 1.0, "IsActive": false }, { - "Code": "SZL", + "Id": "SZL", "Symbol": "E", "Name": "Swazi lilangeni", "Rate": 1.0, "IsActive": false }, { - "Code": "THB", + "Id": "THB", "Symbol": "฿", "Name": "Thai baht", "Rate": 1.0, "IsActive": false }, { - "Code": "TJS", + "Id": "TJS", "Symbol": "TJS", "Name": "Tajikistani somoni", "Rate": 1.0, "IsActive": false }, { - "Code": "TMT", + "Id": "TMT", "Symbol": "T", "Name": "Turkmenistan manat", "Rate": 1.0, "IsActive": false }, { - "Code": "TND", + "Id": "TND", "Symbol": "DT", "Name": "Tunisian dinar", "Rate": 1.0, "IsActive": false }, { - "Code": "TOP", + "Id": "TOP", "Symbol": "T$", "Name": "Tongan paʻanga", "Rate": 1.0, "IsActive": false }, { - "Code": "TTD", + "Id": "TTD", "Symbol": "$", "Name": "Trinidad and Tobago dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "TWD", + "Id": "TWD", "Symbol": "NT$", "Name": "New Taiwan dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "TZS", + "Id": "TZS", "Symbol": "TSh", "Name": "Tanzanian shilling", "Rate": 1.0, "IsActive": false }, { - "Code": "UAH", + "Id": "UAH", "Symbol": "₴", "Name": "Ukraine Hryvnia", "Rate": 1.0, "IsActive": false }, { - "Code": "UGX", + "Id": "UGX", "Symbol": "USh", "Name": "Ugandan shilling", "Rate": 1.0, "IsActive": false }, { - "Code": "UYI", + "Id": "UYI", "Symbol": "$", "Name": "Uruguay Peso en Unidades Indexadas", "Rate": 1.0, "IsActive": false }, { - "Code": "UYU", + "Id": "UYU", "Symbol": "$", "Name": "Uruguayan peso", "Rate": 1.0, "IsActive": false }, { - "Code": "UYW", + "Id": "UYW", "Symbol": "$", "Name": "Unidad previsional", "Rate": 1.0, "IsActive": false }, { - "Code": "UZS", + "Id": "UZS", "Symbol": "лв", "Name": "Uzbekistan som", "Rate": 1.0, "IsActive": false }, { - "Code": "VEF", + "Id": "VEF", "Symbol": "Bs.F", "Name": "Venezuelan bolívar fuerte", "Rate": 1.0, "IsActive": false }, { - "Code": "VES", + "Id": "VES", "Symbol": "Bs", "Name": "Venezuelan bolívar soberano", "Rate": 1.0, "IsActive": false }, { - "Code": "VND", + "Id": "VND", "Symbol": "₫", "Name": "Vietnamese đồng", "Rate": 1.0, "IsActive": false }, { - "Code": "VUV", + "Id": "VUV", "Symbol": "VT", "Name": "Vanuatu vatu", "Rate": 1.0, "IsActive": false }, { - "Code": "WST", + "Id": "WST", "Symbol": "WS$", "Name": "Samoan tālā", "Rate": 1.0, "IsActive": false }, { - "Code": "XAF", + "Id": "XAF", "Symbol": "FCFA", "Name": "CFA franc BEAC", "Rate": 1.0, "IsActive": false }, { - "Code": "XCD", + "Id": "XCD", "Symbol": "$", "Name": "East Caribbean dollar", "Rate": 1.0, "IsActive": false }, { - "Code": "XOF", + "Id": "XOF", "Symbol": "CFA", "Name": "CFA franc BCEAO", "Rate": 1.0, "IsActive": false }, { - "Code": "XPF", + "Id": "XPF", "Symbol": "XPF", "Name": "CFP franc", "Rate": 1.0, "IsActive": false }, { - "Code": "YER", + "Id": "YER", "Symbol": "﷼", "Name": "Yemeni rial", "Rate": 1.0, "IsActive": false }, { - "Code": "ZAR", + "Id": "ZAR", "Symbol": "R", "Name": "South African rand", "Rate": 1.0, "IsActive": false }, { - "Code": "ZIG", + "Id": "ZIG", "Symbol": "ZiG", "Name": "Zimbabwe Gold", "Rate": 1.0, "IsActive": false }, { - "Code": "ZMW", + "Id": "ZMW", "Symbol": "ZK", "Name": "Zambian kwacha", "Rate": 1.0, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs b/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs index fceaa6aa..3e113796 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/HostDataSeeder.cs @@ -91,7 +91,7 @@ public class PermissionDefinitionRecordSeedDto public class CurrencySeedDto { - public string Code { get; set; } + public string Id { get; set; } public string Symbol { get; set; } public string Name { get; set; } public bool IsActive { get; set; } @@ -149,9 +149,9 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _menuRepository; private readonly IRepository _permissionGroupRepository; private readonly IRepository _permissionRepository; - private readonly IRepository _currencyRepository; - private readonly IRepository _countryGroupRepository; - private readonly IRepository _countryRepository; + private readonly IRepository _currencyRepository; + private readonly IRepository _countryGroupRepository; + private readonly IRepository _countryRepository; private readonly IRepository _cityRepository; private readonly IRepository _districtRepository; private readonly IRepository _contactTagRepository; @@ -169,9 +169,9 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency IRepository menuRepository, IRepository permissionGroupRepository, IRepository permissionRepository, - IRepository currencyRepository, - IRepository countryGroupRepository, - IRepository countryRepository, + IRepository currencyRepository, + IRepository countryGroupRepository, + IRepository countryRepository, IRepository cityRepository, IRepository districtRepository, IRepository contactTagRepository, @@ -236,7 +236,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency continue; buffer.Add(new CountryGroup( - Guid.NewGuid(), + item.Name, item.Name )); @@ -289,7 +289,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency continue; buffer.Add(new Country( - Guid.NewGuid(), + item.Code, item.Code, item.Name, item.GroupName, @@ -626,13 +626,12 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Currencies) { - var exists = await _currencyRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _currencyRepository.AnyAsync(x => x.Id == item.Id); if (!exists) { - await _currencyRepository.InsertAsync(new Currency + await _currencyRepository.InsertAsync(new Currency(item.Id) { - Code = item.Code, Symbol = item.Symbol, Name = item.Name, IsActive = item.IsActive diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs index dd233a43..3f88ec23 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs @@ -82,7 +82,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Bank)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -102,7 +102,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new EditingFormItemDto { Order = 12, DataField = "Email", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { Hint = "Manage", @@ -383,9 +383,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.BankAccount)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -468,7 +468,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -549,7 +549,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Cash)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -564,7 +564,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } @@ -672,7 +672,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -751,7 +751,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CurrentAccount)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -772,7 +772,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new EditingFormItemDto { Order = 12, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "CreditLimit", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -964,7 +964,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -1001,7 +1001,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "PaymentTermId", Width = 100, ListOrderNo = 13, @@ -1057,7 +1057,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WaybillStatus)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -1068,9 +1068,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WaybillStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1180,7 +1180,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WaybillType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -1191,9 +1191,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WaybillType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1303,7 +1303,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.InvoiceType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -1314,9 +1314,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.InvoiceType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1426,7 +1426,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.InvoiceStatus)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -1437,9 +1437,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.InvoiceStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1549,7 +1549,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.PaymentStatus)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -1560,9 +1560,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PaymentStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1672,7 +1672,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CheckStatus)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -1683,9 +1683,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CheckStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1795,7 +1795,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CheckType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -1806,9 +1806,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CheckType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1929,9 +1929,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CheckNote)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2022,7 +2022,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "TypeId", Width = 150, ListOrderNo = 3, @@ -2038,7 +2038,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "StatusId", Width = 150, ListOrderNo = 4, @@ -2168,7 +2168,6 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.CurrentAccount), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2184,7 +2183,6 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.CurrentAccount), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2202,7 +2200,6 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.CurrentAccount), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2218,7 +2215,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2278,9 +2275,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Invoice)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2364,7 +2361,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "InvoiceTypeId", Width = 150, ListOrderNo = 3, @@ -2395,7 +2392,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "StatusId", Width = 150, ListOrderNo = 5, @@ -2464,7 +2461,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2473,7 +2470,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "PaymentStatusId", Width = 150, ListOrderNo = 10, @@ -2636,15 +2633,15 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.InvoiceItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 470, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ new EditingFormItemDto { Order = 1, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "UomId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Quantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 4, DataField = "UnitPrice", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 5, DataField = "LineTotal", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, @@ -2657,7 +2654,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "UnitPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "LineTotal", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -2709,14 +2706,14 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 3, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2937,9 +2934,9 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Waybill)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -3022,7 +3019,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WaybillTypeId", Width = 150, ListOrderNo = 3, @@ -3053,7 +3050,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WaybillStatusId", Width = 150, ListOrderNo = 5, @@ -3122,7 +3119,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -3246,15 +3243,15 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WaybillItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 470, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ new EditingFormItemDto { Order = 1, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "UomId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Quantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 4, DataField = "UnitPrice", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 5, DataField = "LineTotal", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, @@ -3267,7 +3264,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "UnitPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "LineTotal", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -3319,14 +3316,14 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 3, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index 15a044e9..ddb9736a 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -754,7 +754,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, listFormName, PlatformConsts.IdentityPermissions.Users.Update, PlatformConsts.IdentityPermissions.Users.Delete, PlatformConsts.IdentityPermissions.Users.Export, PlatformConsts.IdentityPermissions.Users.Import, PlatformConsts.IdentityPermissions.Users.Note), DeleteCommand = $"UPDATE \"AbpUsers\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new () { Order=1,ColCount=1,ColSpan=1,ItemType="group",Items=[ @@ -960,7 +960,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.IpRestriction)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -972,7 +972,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 3, DataField = "IP", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -1286,7 +1286,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.CustomEndpoint)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -1301,7 +1301,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { ButtonPosition= UiCommandButtonPositionTypeEnum.Toolbar, @@ -1516,8 +1516,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ]} }), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.ReportCategory)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }); #region Report Categories Fields @@ -1639,8 +1639,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep } }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.About)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }); #region About Fields @@ -1764,8 +1764,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep } }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Service)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }); #region Services Fields @@ -1931,7 +1931,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Product)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -1949,7 +1949,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsQuantityBased", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }) @@ -2170,8 +2170,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep } }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PaymentMethod)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Commission", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value } }), @@ -2299,8 +2299,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep } }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.InstallmentOption)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Commission", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value } }), @@ -2416,7 +2416,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Order)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -2451,7 +2451,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -2792,7 +2792,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "PaymentMethodId", Width = 150, ListOrderNo = 18, @@ -2879,7 +2879,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.BlogCategory)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -2895,7 +2895,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }) @@ -3071,7 +3071,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.BlogPost)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 700, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -3095,7 +3095,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsPublished", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "PublishedAt", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -3428,8 +3428,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep } }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Demo)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "NumberOfBranches", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "NumberOfUsers", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -3649,8 +3649,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep } }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Contact)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }); #region Contact Fields @@ -3852,7 +3852,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkHour)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -3871,7 +3871,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 10, DataField = "Sunday", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Monday", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Tuesday", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -4085,7 +4085,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Sector)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -4096,8 +4096,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Sector)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 150, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { @@ -4108,7 +4109,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson }); #region Sector Fields @@ -4186,7 +4186,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SkillType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -4198,7 +4198,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { Hint = "Manage", @@ -4284,7 +4284,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SkillLevel)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -4296,7 +4296,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsDefault", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }), @@ -4408,7 +4408,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Skill)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.SkillLevel, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -4416,7 +4416,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }, autoSave: true ); @@ -4526,7 +4526,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.UomCategory)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, false, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -4538,7 +4538,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { Hint = "Manage", @@ -4624,7 +4624,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Uom)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, false, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -4637,7 +4637,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }), @@ -4824,7 +4824,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Behavior)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -4833,7 +4833,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }); #region Behavior Fields @@ -4911,7 +4911,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Disease)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, false, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -4922,7 +4922,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -5000,7 +5000,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Document)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -5008,7 +5008,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -5086,7 +5086,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EducationStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -5096,7 +5096,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 2, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -5190,7 +5190,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Vaccine)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -5198,7 +5198,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -5277,7 +5277,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Vehicle)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -5298,7 +5298,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -5551,7 +5551,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Psychologist)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -5566,7 +5566,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -5728,7 +5728,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Lawyer)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -5748,7 +5748,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs index 7c7e561e..9379949a 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs @@ -80,7 +80,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Program)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -89,7 +89,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -195,7 +195,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Schedule)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 750, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -222,7 +222,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 19, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IncludeLunch", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Monday", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -590,7 +590,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RegistrationType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -603,7 +603,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 4, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -737,7 +737,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RegistrationMethod)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 550, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -751,7 +751,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -911,7 +911,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ClassType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -927,7 +927,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 7, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -1120,7 +1120,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Class)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 550, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -1134,7 +1134,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -1294,7 +1294,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Level)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 650, 450, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -1313,7 +1313,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 9, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -1568,7 +1568,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ClassCancellationReason)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -1577,7 +1577,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -1683,7 +1683,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LessonPeriod)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -1700,7 +1700,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 8, DataField = "Lesson4", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -1923,7 +1923,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionTag)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -1935,7 +1935,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 3, DataField = "Color", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxColorBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }, autoSave: true ); @@ -2044,7 +2044,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionPool)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -2055,7 +2055,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 3, DataField = "Tags", ColSpan = 1, EditorType2=EditorTypes.dxTagBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { Hint = "Questions", @@ -2175,10 +2175,10 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Question)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { Hint = "Answers", diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs index 1f5fe6f6..2b1043db 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs @@ -71,7 +71,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomerType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -82,10 +82,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CustomerType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -194,7 +194,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomerSegment)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -205,10 +205,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CustomerSegment)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -327,7 +327,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -380,7 +380,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "PartyType", FieldDbType = DbType.String, Value = "Customer", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -542,7 +542,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -551,7 +551,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "PaymentTermId", Width = 100, ListOrderNo = 9, @@ -808,7 +808,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "CustomerTypeId", Width = 100, ListOrderNo = 23, @@ -824,7 +824,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "CustomerSegmentId", Width = 100, ListOrderNo = 24, @@ -988,10 +988,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LossReason)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1159,10 +1159,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Opportunity)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1377,7 +1377,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -1548,10 +1548,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Activity)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1834,10 +1834,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Competitor)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2017,10 +2017,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Activity)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2321,10 +2321,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SalesOrderStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2444,10 +2444,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SalesOrder)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2606,7 +2606,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.SalesOrderStatus), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.SalesOrderStatus), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2623,7 +2623,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2632,7 +2632,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "PaymentTermId", Width = 150, ListOrderNo = 9, @@ -2649,7 +2649,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "DeliveryTermId", Width = 150, ListOrderNo = 10, @@ -2787,10 +2787,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SalesOrderItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2813,7 +2813,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "UnitPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "TotalAmount", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "DiscountRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "DiscountAmount", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "TaxRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -2916,14 +2916,14 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 150, ListOrderNo = 6, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -3011,7 +3011,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.SalesOrderStatus), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.SalesOrderStatus), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs index 6a7616c5..ef902260 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs @@ -82,10 +82,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EmploymentType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 200, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -173,10 +173,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.JobPosition)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -360,7 +360,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -466,10 +466,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency TreeOptionJson = DefaultTreeOptionJson("Id", "ParentDepartmentId", true), PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Department)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -676,10 +676,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Badge)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -986,10 +986,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency PermissionJson = DefaultPermissionJson(listFormName), TreeOptionJson = DefaultTreeOptionJson("Id", "ParentCostCenterId", true), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CostCenter)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1207,7 +1207,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -1286,10 +1286,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency TreeOptionJson = DefaultTreeOptionJson("Id", "ManagerId", true), PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Employee)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1914,7 +1914,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2034,10 +2034,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Leave)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2366,10 +2366,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Overtime)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2696,10 +2696,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Expense)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 450, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2836,7 +2836,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2985,10 +2985,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Payroll)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -3358,10 +3358,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Template360)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -3509,10 +3509,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Performance360)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 520, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -3742,10 +3742,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Training)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -4076,10 +4076,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Survey)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 450, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -4256,10 +4256,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -4421,10 +4421,10 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyResponse)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs index f5bd14db..6eafbeb9 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs @@ -80,7 +80,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EventType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -88,7 +88,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -166,7 +166,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EventCategory)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -174,7 +174,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -252,7 +252,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Event)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -271,7 +271,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc new EditingFormItemDto { Order = 9, DataField = "Likes", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -501,9 +501,9 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Meal)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -691,10 +691,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Reservation)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -941,10 +941,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ShuttleRoute)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1168,10 +1168,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Announcement)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1439,10 +1439,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Visitor)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 450, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1694,10 +1694,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialPost)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 600, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1863,7 +1863,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialComment)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -1872,7 +1872,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc new EditingFormItemDto { Order = 2, DataField = "SocialPostId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs index 8b233b95..cd80f7ba 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs @@ -70,7 +70,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkcenterType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -81,9 +81,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkcenterType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -204,9 +204,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkcenterStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -327,9 +327,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workcenter)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -432,7 +432,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkcenterTypeId", Width = 150, ListOrderNo = 5, @@ -564,7 +564,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkcenterStatus), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkcenterStatus), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -701,9 +701,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanWizard)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 550, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -795,7 +795,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkcenterId", Width = 150, ListOrderNo = 3, @@ -1051,9 +1051,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanWizardMaterial)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1160,9 +1160,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanWizardEmployee)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1328,9 +1328,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Fault)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1427,7 +1427,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkcenterId", Width = 150, ListOrderNo = 5, @@ -1459,7 +1459,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "FaultTypeId", Width = 100, ListOrderNo = 7, @@ -1568,7 +1568,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.FaultStatus), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.FaultStatus), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -1628,9 +1628,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.FaultType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1752,9 +1752,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.FaultStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1876,9 +1876,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2000,9 +2000,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2124,9 +2124,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workorder)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2216,7 +2216,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkcenterId", Width = 150, ListOrderNo = 3, @@ -2233,7 +2233,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkorderTypeId", Width = 150, ListOrderNo = 4, @@ -2286,7 +2286,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2494,9 +2494,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderMaterial)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2644,9 +2644,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderActivity)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2814,9 +2814,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workorder)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2877,7 +2877,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkcenterId", Width = 150, ListOrderNo = 3, @@ -2894,7 +2894,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkorderTypeId", Width = 150, ListOrderNo = 4, @@ -2947,7 +2947,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs index bdd988c8..197e27aa 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs @@ -81,9 +81,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.OperationCategory)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -204,9 +204,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.OperationType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -434,9 +434,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Operation)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -556,7 +556,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkcenterId", Width = 150, ListOrderNo = 6, @@ -745,9 +745,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.BomType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -868,9 +868,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Bom)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -940,7 +940,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "BomTypeId", Width = 250, ListOrderNo = 3, @@ -1090,9 +1090,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.BomComponent)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1100,7 +1100,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 1, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "OperationId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Quantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 4, DataField = "Uom", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "UomId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField = "ScrapPercentage", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 6, DataField = "IsPhantom", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 7, DataField = "Position", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox }, @@ -1115,7 +1115,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { FieldName = "IsPhantom", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "ScrapPercentage", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value } + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value } }), }, autoSave: true ); @@ -1198,7 +1198,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -1336,9 +1336,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.BomOperation)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1405,7 +1405,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkcenterId", Width = 150, ListOrderNo = 3, @@ -1609,9 +1609,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProductionOrderType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1721,7 +1721,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.OrderStatus)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -1732,9 +1732,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.OrderStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1855,9 +1855,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProductionOrder)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1874,7 +1874,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 10, DataField = "ConfirmedQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 11, DataField = "RequiredQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 12, DataField = "ScrapQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 13, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 13, DataField = "UomId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 14, DataField = "Currency", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 15, DataField = "PlannedCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 16, DataField = "ActualCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, @@ -1890,7 +1890,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { FieldName = "ConfirmedQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "RequiredQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "ScrapQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "PlannedCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "ActualCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -1955,7 +1955,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "OrderTypeId", Width = 150, ListOrderNo = 3, @@ -1972,7 +1972,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "StatusId", Width = 100, ListOrderNo = 4, @@ -2149,14 +2149,14 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 14, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2207,7 +2207,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2268,16 +2268,16 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProductionOrderItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ new EditingFormItemDto { Order = 1, DataField = "SalesOrderId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "UomId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 4, DataField = "PlannedQuantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 5, DataField = "ConfirmedQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, new EditingFormItemDto { Order = 6, DataField = "RequiredQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, @@ -2285,7 +2285,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "PlannedQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "ConfirmedQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "RequiredQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -2349,14 +2349,14 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 4, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2493,9 +2493,9 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProductionWorkorder)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2900,10 +2900,10 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ScaleType = "weeks" }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProductionOrder)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs index 76744b50..bfb5c067 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs @@ -79,7 +79,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MeetingMethod)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -89,7 +89,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -223,7 +223,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MeetingResult)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -233,7 +233,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -356,7 +356,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Source)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -365,7 +365,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -471,7 +471,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Interesting)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -480,7 +480,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -586,7 +586,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SalesRejectionReason)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -596,7 +596,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value }, }), @@ -733,9 +733,9 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.NoteType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs index c47f8432..6a3a93e9 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs @@ -70,7 +70,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Type)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -81,10 +81,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Type)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -194,7 +194,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Status)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -205,10 +205,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Status)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -329,10 +329,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Risk)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -453,10 +453,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Category)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -577,10 +577,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.TaskType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -690,7 +690,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -701,10 +701,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -825,10 +825,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Projects)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 550, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -937,7 +937,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ProjectTypeId", Width = 100, ListOrderNo = 4, @@ -954,7 +954,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "StatusId", Width = 100, ListOrderNo = 5, @@ -1090,7 +1090,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -1236,10 +1236,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectRisk)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1270,7 +1270,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "RiskId", Width = 300, ListOrderNo = 2, @@ -1323,10 +1323,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTeam)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 200, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), TreeOptionJson = DefaultTreeOptionJson("EmployeeId", "ManagerId", true), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -1460,10 +1460,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectPhase)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1600,7 +1600,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "StatusId", Width = 100, ListOrderNo = 7, @@ -1815,10 +1815,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTask)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1975,7 +1975,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "StatusId", Width = 100, ListOrderNo = 7, @@ -2120,10 +2120,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ScaleType = "weeks" }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTask)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2297,10 +2297,10 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTaskDaily)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2395,7 +2395,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkedTypeId", Width = 100, ListOrderNo = 5, @@ -2490,7 +2490,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "StatusId", Width = 100, ListOrderNo = 10, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs index 81c1d42a..657b7000 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs @@ -588,8 +588,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency } }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Branch)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value } @@ -1019,7 +1019,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.SettingDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -1040,7 +1040,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 14, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsVisibleToClients", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsInherited", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -1686,9 +1686,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Language)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1837,7 +1837,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LanguageText)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -1850,7 +1850,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }, autoSave: true ); @@ -2018,7 +2018,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Route)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -2034,7 +2034,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "RouteType", FieldDbType = DbType.String, Value = "public", CustomValueType = FieldCustomValueTypeEnum.Value } }) @@ -2193,7 +2193,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Menu)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, TreeOptionJson = DefaultTreeOptionJson("Code", "ParentCode", true), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 600, true, true, true, true, false), @@ -2213,7 +2213,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsDisabled", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value } }) @@ -2475,7 +2475,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.DataSource)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -2486,7 +2486,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 3, DataField = "ConnectionString", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -2606,7 +2606,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency SelectionJson = DefaultSelectionMultipleJson, ColumnOptionJson = DefaultColumnOptionJson, DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.ListForm)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PermissionJson = DefaultPermissionJson(listFormName), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 500, true, true, true, true, false), @@ -2639,7 +2639,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 4, DataField = "PermissionJson:D", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { Hint = "Manage Listform", @@ -3079,7 +3079,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.NotificationRule)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -3093,7 +3093,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 7, DataField = "IsCustomized", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsFixed", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -3311,7 +3311,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Notification)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 300, true, true, true, true, false), } @@ -3529,7 +3529,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency }), PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.BackgroundWorker)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 650, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -3549,7 +3549,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 4, DataField = "Options:Tablo", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }) @@ -3730,7 +3730,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ContactTag)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -3743,7 +3743,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }); #region ContactTag Fields @@ -3839,7 +3839,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ContactTitle)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -3852,7 +3852,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }); #region ContactTitle Fields @@ -3948,7 +3948,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Currency)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -3964,7 +3964,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }); #region Currency Fields @@ -4105,7 +4105,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CountryGroup)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -4117,7 +4117,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }); #region CountryGroup Fields @@ -4192,7 +4192,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Country)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -4211,7 +4211,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value } }) @@ -4293,7 +4293,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), }, @@ -4396,7 +4396,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.City)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -4411,7 +4411,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value } }) @@ -4544,7 +4544,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.District)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List @@ -4559,7 +4559,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value } }) diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs index f58b310a..7b37c645 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs @@ -70,7 +70,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WarehouseType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -81,9 +81,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WarehouseType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -211,7 +211,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ZoneType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -222,9 +222,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ZoneType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -352,7 +352,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.LocationType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -363,9 +363,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LocationType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -493,7 +493,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Warehouse)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -504,9 +504,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Warehouse)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -624,7 +624,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WarehouseTypeId", Width = 150, ListOrderNo = 5, @@ -873,7 +873,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Zone)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -884,9 +884,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Zone)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -978,7 +978,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WarehouseId", Width = 150, ListOrderNo = 5, @@ -994,7 +994,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ZoneTypeId", Width = 150, ListOrderNo = 5, @@ -1089,7 +1089,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Location)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -1100,9 +1100,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Location)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1193,7 +1193,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WarehouseId", Width = 150, ListOrderNo = 5, @@ -1216,7 +1216,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ZoneId", Width = 150, ListOrderNo = 5, @@ -1241,7 +1241,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "LocationTypeId", Width = 150, ListOrderNo = 6, @@ -1293,14 +1293,14 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 9, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -1375,9 +1375,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Putaway)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1542,7 +1542,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WarehouseId", Width = 150, ListOrderNo = 7, @@ -1597,7 +1597,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "TargetZoneId", Width = 150, ListOrderNo = 10, @@ -1623,7 +1623,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "TargetLocationId", Width = 150, ListOrderNo = 11, @@ -1685,9 +1685,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PutawayCondition)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1850,9 +1850,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Inventory)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, false, false, false, false, false), } ); @@ -1893,7 +1893,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WarehouseId", Width = 200, ListOrderNo = 3, @@ -1908,7 +1908,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ZoneId", Width = 150, ListOrderNo = 4, @@ -1924,7 +1924,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "LocationId", Width = 200, ListOrderNo = 5, @@ -1995,14 +1995,14 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 9, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -2122,9 +2122,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MovementType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2246,9 +2246,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ReferenceType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2389,9 +2389,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MovementItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, false, false, false, false, false), } ); @@ -2512,7 +2512,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WarehouseId", Width = 150, ListOrderNo = 8, @@ -2528,7 +2528,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ZoneId", Width = 200, ListOrderNo = 9, @@ -2544,7 +2544,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "LocationId", Width = 200, ListOrderNo = 10, @@ -2595,14 +2595,14 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 13, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -2666,7 +2666,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson - }, + }, ]); #endregion } @@ -2707,9 +2707,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Movement)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Giriş' WHERE \"Id\" = @Id;", EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -2817,7 +2817,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ReferenceTypeId", Width = 200, ListOrderNo = 5, @@ -2922,9 +2922,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MovementItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2934,14 +2934,14 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new EditingFormItemDto { Order = 3, DataField = "LocationId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField = "Quantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 6, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 6, DataField = "UomId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 7, DataField = "LotNumber", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, }), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { @@ -2976,7 +2976,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WarehouseId", Width = 150, ListOrderNo = 2, @@ -2999,7 +2999,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ZoneId", Width = 150, ListOrderNo = 3, @@ -3025,7 +3025,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "LocationId", Width = 150, ListOrderNo = 4, @@ -3087,14 +3087,14 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 7, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -3189,9 +3189,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Movement)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Çıkış' WHERE \"Id\" = @Id;", EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -3299,7 +3299,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ReferenceTypeId", Width = 200, ListOrderNo = 5, @@ -3404,9 +3404,9 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MovementItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, false, false, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -3416,14 +3416,14 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new EditingFormItemDto { Order = 3, DataField = "LocationId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 5, DataField = "Quantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 6, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 6, DataField = "UomId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 7, DataField = "LotNumber", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, }), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { @@ -3459,7 +3459,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WarehouseId", Width = 150, ListOrderNo = 2, @@ -3482,7 +3482,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ZoneId", Width = 150, ListOrderNo = 3, @@ -3508,7 +3508,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "LocationId", Width = 150, ListOrderNo = 4, @@ -3570,14 +3570,14 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 7, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -3672,7 +3672,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Movement)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, false, false, true, false), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { @@ -3789,7 +3789,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WarehouseId", Width = 150, ListOrderNo = 7, @@ -3805,7 +3805,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "ZoneId", Width = 200, ListOrderNo = 8, @@ -3821,7 +3821,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "LocationId", Width = 200, ListOrderNo = 9, @@ -3872,14 +3872,14 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 12, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs index 61464f7e..08f1262c 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs @@ -81,9 +81,9 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaterialType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -222,7 +222,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaterialGroup)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -234,7 +234,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 5, DataField = "ParentGroupId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }), @@ -392,7 +392,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Material)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -412,21 +412,21 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new EditingFormItemDto { Order = 8, DataField = "MaterialGroupId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 9, DataField = "TrackingType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 10, DataField = "TotalStock", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.Disabled }, - new EditingFormItemDto { Order = 11, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 11, DataField = "UomId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 12, DataField = "Barcode", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 13, DataField = "IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "CostPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "SalesPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value } + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value } }), }); @@ -546,7 +546,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -632,13 +632,13 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 120, ListOrderNo = 11, Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -702,7 +702,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.PaymentTerm)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -713,10 +713,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PaymentTerm)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -825,7 +825,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SupplyType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -836,10 +836,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SupplyType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -950,7 +950,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SupplyCardType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -961,10 +961,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SupplyCardType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1086,7 +1086,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -1139,7 +1139,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "PartyType", FieldDbType = DbType.String, Value = "Supplier", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -1301,7 +1301,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -1310,7 +1310,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "PaymentTermId", Width = 100, ListOrderNo = 9, @@ -1566,7 +1566,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "SupplierTypeId", Width = 100, ListOrderNo = 23, @@ -1582,7 +1582,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "SupplyCardTypeId", Width = 100, ListOrderNo = 24, @@ -1741,10 +1741,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PartnerBank)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -1925,7 +1925,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2055,10 +2055,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PartnerCertificate)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2194,10 +2194,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PartnerContact)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2489,9 +2489,9 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Approval)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2660,9 +2660,9 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.ApprovalStep), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ApprovalStep)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.ApprovalStep, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2827,7 +2827,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.RequestType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -2838,10 +2838,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RequestType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -2963,7 +2963,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Request)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() @@ -2984,7 +2984,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "RequestNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, @@ -3041,7 +3041,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "RequestTypeId", Width = 150, ListOrderNo = 3, @@ -3232,10 +3232,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RequestItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -3253,7 +3253,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { FieldName = "Quantity", FieldDbType = DbType.Int32, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "EstimatedPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsUrgent", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value } + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value } }), }, autoSave: true ); @@ -3316,14 +3316,14 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 4, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -3440,7 +3440,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuotationStatus)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -3451,10 +3451,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuotationStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -3563,7 +3563,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.DeliveryTerm)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -3574,10 +3574,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.DeliveryTerm)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -3702,10 +3702,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Quotation)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 700, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -3845,7 +3845,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "RequestTypeId", Width = 100, ListOrderNo = 5, @@ -3917,7 +3917,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "StatusId", Width = 100, ListOrderNo = 9, @@ -3976,7 +3976,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -3985,7 +3985,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "PaymentTermId", Width = 100, ListOrderNo = 13, @@ -4002,7 +4002,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "DeliveryTermId", Width = 100, ListOrderNo = 14, @@ -4181,10 +4181,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuotationItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -4200,7 +4200,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Quantity", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "UnitPrice", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "TotalPrice", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "LeadTime", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value } @@ -4266,14 +4266,14 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 4, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -4410,10 +4410,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.OrderStatus)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -4533,10 +4533,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PurchaseOrder)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -4665,7 +4665,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "PaymentTermId", Width = 150, ListOrderNo = 6, @@ -4752,7 +4752,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -4841,7 +4841,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.OrderStatus), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.OrderStatus), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -4887,10 +4887,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PurchaseOrderItem)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { new() { @@ -4907,7 +4907,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "UnitPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "TotalPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value } + new() { FieldName = "UomId", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value } }), }, autoSave: true ); @@ -4989,14 +4989,14 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Uom", + FieldName = "UomId", Width = 100, ListOrderNo = 4, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/SeederDefaults.cs b/api/src/Erp.Platform.DbMigrator/Seeds/SeederDefaults.cs index a404eb5e..59d8410a 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/SeederDefaults.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/SeederDefaults.cs @@ -15,18 +15,18 @@ public static class SeederDefaults return $"UPDATE \"{TableNameResolver.GetFullTableName(tableName)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id"; } - public static readonly string DefaultInsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] + public static string DefaultInsertFieldsDefaultValueJson(DbType dbType = DbType.Guid) => JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@NEWID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } + new() { FieldName = "Id", FieldDbType = dbType, Value = "@NEWID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }); - public static readonly string DefaultDeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] + public static string DefaultDeleteFieldsDefaultValueJson(DbType dbType = DbType.Guid) => JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } + new() { FieldName = "Id", FieldDbType = dbType, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }); public static string DefaultEditingOptionJson( diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CheckNote.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CheckNote.cs index 85be93f3..963a46c9 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CheckNote.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CheckNote.cs @@ -9,10 +9,10 @@ public class CheckNote : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public Guid? BranchId { get; set; } - public Guid TypeId { get; set; } + public string TypeId { get; set; } public CheckType Type { get; set; } - public Guid StatusId { get; set; } + public string StatusId { get; set; } public CheckStatus Status { get; set; } public string CheckNumber { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CurrentAccount.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CurrentAccount.cs index a8c1adf1..aba5ad95 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CurrentAccount.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CurrentAccount.cs @@ -26,7 +26,7 @@ public class CurrentAccount : FullAuditedEntity, IMultiTenant public string Currency { get; set; } public string Risk { get; set; } //Low, Medium, High, Blocked - public Guid? PaymentTermId { get; set; } + public string? PaymentTermId { get; set; } public PaymentTerm? PaymentTerm { get; set; } public bool IsActive { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Invoice.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Invoice.cs index 47a4e7d0..6cea9cc1 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Invoice.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Invoice.cs @@ -10,13 +10,13 @@ public class Invoice : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public Guid? BranchId { get; set; } - public Guid InvoiceTypeId { get; set; } + public string InvoiceTypeId { get; set; } public InvoiceType InvoiceType { get; set; } public Guid? CurrentAccountId { get; set; } public CurrentAccount? CurrentAccount { get; set; } - public Guid StatusId { get; set; } + public string StatusId { get; set; } public InvoiceStatus Status { get; set; } public string InvoiceNumber { get; set; } @@ -32,7 +32,7 @@ public class Invoice : FullAuditedEntity, IMultiTenant public decimal RemainingAmount { get; set; } // Kalan Tutar public string Currency { get; set; } // Para Birimi - public Guid PaymentStatusId { get; set; } + public string PaymentStatusId { get; set; } public PaymentStatus PaymentStatus { get; set; } public Guid? WaybillId { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/InvoiceItem.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/InvoiceItem.cs index 2cf83511..d41e7911 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/InvoiceItem.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/InvoiceItem.cs @@ -13,7 +13,9 @@ public class InvoiceItem : FullAuditedEntity, IMultiTenant public Guid? MaterialId { get; set; } public Material Material { get; set; } - public string Uom { get; set; } + + public string UomId { get; set; } + public Uom Uom { get; set; } public decimal Quantity { get; set; } // Miktar public decimal UnitPrice { get; set; } // Birim Fiyat diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Waybill.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Waybill.cs index cd697434..b5e690ee 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Waybill.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/Waybill.cs @@ -10,13 +10,13 @@ public class Waybill : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public Guid? BranchId { get; set; } - public Guid WaybillTypeId { get; set; } + public string WaybillTypeId { get; set; } public WaybillType WaybillType { get; set; } public Guid? CurrentAccountId { get; set; } public CurrentAccount? CurrentAccount { get; set; } - public Guid WaybillStatusId { get; set; } + public string WaybillStatusId { get; set; } public WaybillStatus WaybillStatus { get; set; } public string WaybillNumber { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/WaybillItem.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/WaybillItem.cs index 78de1fc8..cb586502 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/WaybillItem.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/WaybillItem.cs @@ -13,7 +13,9 @@ public class WaybillItem : FullAuditedEntity, IMultiTenant public Guid? MaterialId { get; set; } public Material Material { get; set; } - public string Uom { get; set; } + + public string UomId { get; set; } + public Uom Uom { get; set; } public decimal Quantity { get; set; } public decimal UnitPrice { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Host/Country.cs b/api/src/Erp.Platform.Domain/Entities/Host/Country.cs index 707b7240..161929a0 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/Country.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/Country.cs @@ -4,7 +4,7 @@ using Volo.Abp.Domain.Entities.Auditing; namespace Erp.Platform.Entities; -public class Country : FullAuditedEntity +public class Country : FullAuditedEntity { public string Code { get; set; } // TR, US public string Name { get; set; } @@ -20,7 +20,7 @@ public class Country : FullAuditedEntity protected Country() { } public Country( - Guid id, + string id, string code, string name, string groupName, diff --git a/api/src/Erp.Platform.Domain/Entities/Host/CountryGroup.cs b/api/src/Erp.Platform.Domain/Entities/Host/CountryGroup.cs index 33c2213e..9c7a594b 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/CountryGroup.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/CountryGroup.cs @@ -3,13 +3,13 @@ using Volo.Abp.Domain.Entities.Auditing; namespace Erp.Platform.Entities; -public class CountryGroup : FullAuditedEntity +public class CountryGroup : FullAuditedEntity { public string Name { get; set; } protected CountryGroup() { } - public CountryGroup(Guid id, string name) + public CountryGroup(string id, string name) : base(id) { Name = name; diff --git a/api/src/Erp.Platform.Domain/Entities/Host/Currency.cs b/api/src/Erp.Platform.Domain/Entities/Host/Currency.cs index 0286cbc8..2880762c 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/Currency.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/Currency.cs @@ -3,13 +3,17 @@ using Volo.Abp.Domain.Entities.Auditing; namespace Erp.Platform.Entities; -public class Currency : FullAuditedEntity +public class Currency : FullAuditedEntity { - public string Code { get; set; } // TRY, USD, EUR public string Symbol { get; set; } // ₺, $, etc. public string Name { get; set; } // Turkish lira, US dollar, ... public decimal Rate { get; set; } // TRY başına değer public bool IsActive { get; set; } public DateTime? LastUpdated { get; set; } + + public Currency(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Host/ForumTopic.cs b/api/src/Erp.Platform.Domain/Entities/Host/ForumTopic.cs index ae03ec1e..8862bbc0 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/ForumTopic.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/ForumTopic.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; -using Volo.Abp.MultiTenancy; namespace Erp.Platform.Forum; @@ -10,6 +9,7 @@ public class ForumTopic : FullAuditedEntity public string Title { get; set; } public string Content { get; set; } public Guid CategoryId { get; set; } + public ForumCategory Category { get; set; } public Guid AuthorId { get; set; } public string AuthorName { get; set; } public int ViewCount { get; set; } @@ -24,7 +24,6 @@ public class ForumTopic : FullAuditedEntity public string LastPostUserName { get; set; } public Guid? TenantId { get; set; } - public ForumCategory Category { get; set; } public ICollection Posts { get; set; } protected ForumTopic() { } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/CheckStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/CheckStatus.cs index 59e75af4..34616fdc 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/CheckStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/CheckStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class CheckStatus : FullAuditedEntity, IMultiTenant +public class CheckStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class CheckStatus : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Checks { get; set; } + + public CheckStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/CheckType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/CheckType.cs index 28b88b53..87726ae3 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/CheckType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/CheckType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class CheckType : FullAuditedEntity, IMultiTenant +public class CheckType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class CheckType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Checks { get; set; } + + public CheckType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/InvoiceStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/InvoiceStatus.cs index 6c9a924f..a5451bec 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/InvoiceStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/InvoiceStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class InvoiceStatus : FullAuditedEntity, IMultiTenant +public class InvoiceStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class InvoiceStatus : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Invoices { get; set; } + + public InvoiceStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/InvoiceType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/InvoiceType.cs index 0e3388bc..3739e2b8 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/InvoiceType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/InvoiceType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class InvoiceType : FullAuditedEntity, IMultiTenant +public class InvoiceType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class InvoiceType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Invoices { get; set; } + + public InvoiceType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/PaymentStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/PaymentStatus.cs index 163f2621..15e7724e 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/PaymentStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/PaymentStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class PaymentStatus : FullAuditedEntity, IMultiTenant +public class PaymentStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class PaymentStatus : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Invoices { get; set; } + + public PaymentStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/WaybillStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/WaybillStatus.cs index 42a7a366..c66f4951 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/WaybillStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/WaybillStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class WaybillStatus : FullAuditedEntity, IMultiTenant +public class WaybillStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class WaybillStatus : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Waybills { get; set; } + + public WaybillStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/WaybillType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/WaybillType.cs index 203a9684..b12ff11b 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/WaybillType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Accounting/WaybillType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class WaybillType : FullAuditedEntity, IMultiTenant +public class WaybillType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class WaybillType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Waybills { get; set; } + + public WaybillType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/BlogPost.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/BlogPost.cs index 5ecffe66..1d7cf126 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/BlogPost.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/BlogPost.cs @@ -17,10 +17,10 @@ public class BlogPost : FullAuditedEntity, IMultiTenant public string ReadTime { get; set; } public Guid CategoryId { get; set; } - public virtual BlogCategory Category { get; set; } + public BlogCategory Category { get; set; } public Guid EmployeeId { get; set; } - public virtual Employee Employee { get; set; } + public Employee Employee { get; set; } public int? ViewCount { get; set; } = 0; public int? LikeCount { get; set; } = 0; diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/PaymentMethod.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/PaymentMethod.cs index 92adc984..39a87d78 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/PaymentMethod.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/PaymentMethod.cs @@ -1,12 +1,11 @@ using System; -using System.Collections; using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class PaymentMethod : FullAuditedEntity, IMultiTenant +public class PaymentMethod : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,5 +14,10 @@ public class PaymentMethod : FullAuditedEntity, IMultiTenant public string Logo { get; set; } public ICollection Quotations { get; set; } + + public PaymentMethod(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Sector.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Sector.cs index 2189e754..989263fe 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Sector.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Sector.cs @@ -1,14 +1,22 @@ using System; +using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Sector : FullAuditedEntity, IMultiTenant +public class Sector : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } public string Name { get; set; } Guid? IMultiTenant.TenantId => TenantId; + + public ICollection Partners { get; set; } + + public Sector(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Uom.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Uom.cs index 30310a91..1e202a21 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Uom.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Uom.cs @@ -5,10 +5,11 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Uom : FullAuditedEntity, IMultiTenant +public class Uom : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public Guid UomCategoryId { get; set; } + + public string UomCategoryId { get; set; } public UomCategory UomCategory { get; set; } public string Name { get; set; } @@ -19,8 +20,25 @@ public class Uom : FullAuditedEntity, IMultiTenant Guid? IMultiTenant.TenantId => TenantId; + public ICollection InvoiceItems { get; set; } + public ICollection WaybillItems { get; set; } + public ICollection SalesOrderItems { get; set; } + public ICollection WorkcenterSpecifications { get; set; } + public ICollection BomComponents { get; set; } + public ICollection ProductionOrders { get; set; } + public ICollection ProductionOrderItems { get; set; } + public ICollection Inventories { get; set; } + public ICollection Locations { get; set; } + public ICollection MovementItems { get; set; } public ICollection Materials { get; set; } public ICollection MaterialSpecifications { get; set; } + public ICollection PurchaseOrderItems { get; set; } + public ICollection QuotationItems { get; set; } + public ICollection RequestItems { get; set; } + + public Uom(string id) + { + Id = id; + } } - diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/UomCategory.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/UomCategory.cs index 7c387505..a25e8cc2 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/UomCategory.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/UomCategory.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class UomCategory : FullAuditedEntity, IMultiTenant +public class UomCategory : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class UomCategory : FullAuditedEntity, IMultiTenant public ICollection Uoms { get; set; } Guid? IMultiTenant.TenantId => TenantId; + + public UomCategory(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrder.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrder.cs index 4270c543..001dfdfb 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrder.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrder.cs @@ -26,10 +26,11 @@ public class SalesOrder : FullAuditedEntity, IMultiTenant public decimal TotalAmount { get; set; } public string Currency { get; set; } - public Guid PaymentTermId { get; set; } + + public string PaymentTermId { get; set; } public PaymentTerm PaymentTerm { get; set; } - public Guid DeliveryTermId { get; set; } + public string DeliveryTermId { get; set; } public DeliveryTerm DeliveryTerm { get; set; } public decimal ExchangeRate { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrderItem.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrderItem.cs index 75c3fdf0..85c89021 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrderItem.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrderItem.cs @@ -21,7 +21,8 @@ public class SalesOrderItem : FullAuditedEntity, IMultiTenant public decimal UnitPrice { get; set; } public decimal TotalAmount { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } + public Uom Uom { get; set; } public decimal DiscountRate { get; set; } public decimal DiscountAmount { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrderStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrderStatus.cs index c4e4fbd7..d96d141d 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrderStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Crm/SalesOrderStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class SalesOrderStatus : FullAuditedEntity, IMultiTenant +public class SalesOrderStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class SalesOrderStatus : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection SalesOrders { get; set; } + + public SalesOrderStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs index 3153c678..88e02049 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/CostCenter.cs @@ -15,7 +15,6 @@ public class CostCenter : FullAuditedEntity, IMultiTenant public Guid? ParentCostCenterId { get; set; } public CostCenter ParentCostCenter { get; set; } - public ICollection SubCostCenters { get; set; } public Guid? ResponsibleEmployeeId { get; set; } public Employee ResponsibleEmployee { get; set; } @@ -29,5 +28,7 @@ public class CostCenter : FullAuditedEntity, IMultiTenant public string Currency { get; set; } public string FiscalYear { get; set; } public bool IsActive { get; set; } + + public ICollection SubCostCenters { get; set; } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Department.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Department.cs index 802f1cc9..91fbace7 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Department.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Department.cs @@ -16,8 +16,7 @@ public class Department : FullAuditedEntity, IMultiTenant public Guid? ParentDepartmentId { get; set; } public Department ParentDepartment { get; set; } - public ICollection SubDepartments { get; set; } - + public Guid? ManagerId { get; set; } public Employee Manager { get; set; } @@ -27,7 +26,13 @@ public class Department : FullAuditedEntity, IMultiTenant public decimal Budget { get; set; } public bool IsActive { get; set; } + public ICollection SubDepartments { get; set; } + public ICollection CostCenters { get; set; } + public ICollection Employees { get; set; } + public ICollection JobPositions { get; set; } public ICollection Performans360s { get; set; } + public ICollection Workcenters { get; set; } + public ICollection Approvals { get; set; } public Department() { diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs index e47ebc47..63793440 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs @@ -36,7 +36,7 @@ public class Employee : FullAuditedEntity, IMultiTenant public DateTime HireDate { get; set; } public DateTime? TerminationDate { get; set; } - + public Guid? EmploymentTypeId { get; set; } public EmploymentType EmploymentType { get; set; } @@ -53,12 +53,12 @@ public class Employee : FullAuditedEntity, IMultiTenant public decimal BaseSalary { get; set; } public string Currency { get; set; } - + public string PayrollGroup { get; set; } // e.g., Monthly, Biweekly, Weekly public Guid? BankId { get; set; } public Bank Bank { get; set; } - public string IbanNumber { get; set; } + public string IbanNumber { get; set; } public Guid? BadgeId { get; set; } public Badge Badge { get; set; } @@ -79,5 +79,16 @@ public class Employee : FullAuditedEntity, IMultiTenant public ICollection Opportunities { get; set; } public ICollection Warehouses { get; set; } public ICollection Quotations { get; set; } + public ICollection CostCenters { get; set; } + public ICollection Events { get; set; } + public ICollection Requests { get; set; } + public ICollection Workorders { get; set; } + public ICollection WorkorderActivities { get; set; } + public ICollection SocialPosts { get; set; } + public ICollection SocialComments { get; set; } + public ICollection SocialLikes { get; set; } + public ICollection ProjectTasks { get; set; } + public ICollection ProjectTaskDailies { get; set; } + public ICollection ProjectTeams { get; set; } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Fault.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Fault.cs index d547d23d..9b2991af 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Fault.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Fault.cs @@ -11,10 +11,10 @@ public class Fault : FullAuditedEntity, IMultiTenant public string Code { get; set; } public string Title { get; set; } public string Description { get; set; } - public Guid? WorkcenterId { get; set; } - public Workcenter? WorkCenter { get; set; } + public string? WorkcenterId { get; set; } + public Workcenter? Workcenter { get; set; } public string Location { get; set; } - public Guid? FaultTypeId { get; set; } + public string? FaultTypeId { get; set; } public FaultType? FaultType { get; set; } public string Priority { get; set; } public string Severity { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/FaultStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/FaultStatus.cs index 33c062c5..4417ab85 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/FaultStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/FaultStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class FaultStatus : FullAuditedEntity, IMultiTenant +public class FaultStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class FaultStatus : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Faults { get; set; } + + public FaultStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/FaultType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/FaultType.cs index 86c3f754..516473e9 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/FaultType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/FaultType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class FaultType : FullAuditedEntity, IMultiTenant +public class FaultType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class FaultType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Faults { get; set; } + + public FaultType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/PlanWizard.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/PlanWizard.cs index 03d20585..8cb3f581 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/PlanWizard.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/PlanWizard.cs @@ -10,8 +10,10 @@ public class PlanWizard : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public string Code { get; set; } - public Guid? WorkcenterId { get; set; } + + public string? WorkcenterId { get; set; } public Workcenter Workcenter { get; set; } + public string PlanType { get; set; } public string Priority { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workcenter.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workcenter.cs index 3240549f..67d028ad 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workcenter.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workcenter.cs @@ -6,7 +6,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Workcenter : FullAuditedEntity, IMultiTenant +public class Workcenter : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,8 +14,10 @@ public class Workcenter : FullAuditedEntity, IMultiTenant public string Code { get; set; } public string Name { get; set; } public string? Description { get; set; } - public Guid? WorkcenterTypeId { get; set; } + + public string? WorkcenterTypeId { get; set; } public WorkcenterType? WorkcenterType { get; set; } + public string? Manufacturer { get; set; } public string? Model { get; set; } public string? SerialNumber { get; set; } @@ -33,9 +35,16 @@ public class Workcenter : FullAuditedEntity, IMultiTenant public int SetupTime { get; set; } public bool IsActive { get; set; } + public ICollection PlanWizards { get; set; } public ICollection Specifications { get; set; } + public ICollection Workorders { get; set; } + public ICollection ProductionWorkorders { get; set; } + public ICollection Faults { get; set; } + public ICollection BomOperations { get; set; } public ICollection Operations { get; set; } - public virtual ICollection PlanWizards { get; set; } - public virtual ICollection Workorders { get; set; } - public virtual ICollection ProductionWorkorders { get; set; } + + public Workcenter(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterSpecification.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterSpecification.cs index cbd05952..83179893 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterSpecification.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterSpecification.cs @@ -1,6 +1,5 @@ // Domain/Entities/PmWorkCenterSpecification.cs using System; -using Erp.Platform.Entities; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; @@ -10,13 +9,14 @@ public class WorkcenterSpecification : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - // İlişkisel alan - public Guid WorkcenterId { get; set; } - public virtual Workcenter Workcenter { get; set; } + public string WorkcenterId { get; set; } + public Workcenter Workcenter { get; set; } - // Özellik detayları public string SpecificationName { get; set; } public string SpecificationValue { get; set; } - public string Uom { get; set; } + + public string UomId { get; set; } + public Uom Uom { get; set; } + public bool IsRequired { get; set; } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterStatus.cs index 694396d0..bdfbf414 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class WorkcenterStatus : FullAuditedEntity, IMultiTenant +public class WorkcenterStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class WorkcenterStatus : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Workcenters { get; set; } + + public WorkcenterStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterType.cs index faf3a30b..400160f3 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkcenterType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class WorkcenterType : FullAuditedEntity, IMultiTenant +public class WorkcenterType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class WorkcenterType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Workcenters { get; set; } + + public WorkcenterType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workorder.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workorder.cs index 1310a6ee..f3261d09 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workorder.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workorder.cs @@ -10,13 +10,14 @@ public class Workorder : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public string WorkorderNumber { get; set; } - public Guid WorkcenterId { get; set; } + + public string WorkcenterId { get; set; } public Workcenter Workcenter { get; set; } public Guid? PlanId { get; set; } public PlanWizard PlanWizard { get; set; } - public Guid WorkorderTypeId { get; set; } //Preventive, Corrective, Emergency, Inspection, Calibration + public string WorkorderTypeId { get; set; } //Preventive, Corrective, Emergency, Inspection, Calibration public WorkorderType WorkorderType { get; set; } public string Priority { get; set; } //Low, Medium, High, Urgent diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderStatus.cs index c91a57b7..5306cd1c 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class WorkorderStatus : FullAuditedEntity, IMultiTenant +public class WorkorderStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,5 +15,10 @@ public class WorkorderStatus : FullAuditedEntity, IMultiTenant public ICollection Workorders { get; set; } public ICollection ProductionWorkorders { get; set; } + + public WorkorderStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderType.cs index 2e0482b0..69359db8 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class WorkorderType : FullAuditedEntity, IMultiTenant +public class WorkorderType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,5 +15,10 @@ public class WorkorderType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Workorders { get; set; } + + public WorkorderType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Bom.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Bom.cs index f463856b..716d1573 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Bom.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Bom.cs @@ -12,7 +12,7 @@ public class Bom : FullAuditedEntity, IMultiTenant public Guid? MaterialId { get; set; } public Material? Material { get; set; } - public Guid? BomTypeId { get; set; } + public string? BomTypeId { get; set; } public BomType? BomType { get; set; } // Production, Engineering, Planning, Costing public string Code { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomComponent.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomComponent.cs index 28912567..9bf3df3d 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomComponent.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomComponent.cs @@ -18,7 +18,8 @@ public class BomComponent : FullAuditedEntity, IMultiTenant public Operation? Operation { get; set; } public decimal Quantity { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } + public Uom Uom { get; set; } public decimal ScrapPercentage { get; set; } public bool IsPhantom { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomOperation.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomOperation.cs index 11845e30..85495fb2 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomOperation.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomOperation.cs @@ -14,7 +14,7 @@ public class BomOperation : FullAuditedEntity, IMultiTenant public Guid? OperationId { get; set; } public Operation? Operation { get; set; } - public Guid? WorkcenterId { get; set; } + public string? WorkcenterId { get; set; } public Workcenter? Workcenter { get; set; } public int Sequence { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomType.cs index 8f3623d8..f57e2b7a 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/BomType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class BomType : FullAuditedEntity, IMultiTenant +public class BomType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class BomType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Boms { get; set; } + + public BomType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Operation.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Operation.cs index 13794ada..d4113f20 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Operation.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/Operation.cs @@ -16,7 +16,7 @@ public class Operation : FullAuditedEntity, IMultiTenant public Guid? OperationTypeId { get; set; } public OperationType? OperationType { get; set; } - public Guid? WorkcenterId { get; set; } + public string? WorkcenterId { get; set; } public Workcenter? Workcenter { get; set; } public int StandardTime { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrder.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrder.cs index d23bb864..bfdb10df 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrder.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrder.cs @@ -10,10 +10,10 @@ public class ProductionOrder : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public string OrderNumber { get; set; } - public Guid OrderTypeId { get; set; } + public string OrderTypeId { get; set; } public ProductionOrderType OrderType { get; set; } - public Guid StatusId { get; set; } + public string StatusId { get; set; } public ProductionOrderStatus Status { get; set; } public string Priority { get; set; } @@ -26,7 +26,10 @@ public class ProductionOrder : FullAuditedEntity, IMultiTenant public decimal ConfirmedQuantity { get; set; } //Onaylanan miktar public decimal RequiredQuantity { get; set; } //Gereken miktar public decimal ScrapQuantity { get; set; } // Hurda miktarı - public string Uom { get; set; } + + public string UomId { get; set; } + public Uom Uom { get; set; } + public decimal PlannedCost { get; set; } //Planlanan maliyet public decimal ActualCost { get; set; } //Gerçekleşen maliyet public string Currency { get; set; } //Para birimi diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderItem.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderItem.cs index c7ab3355..436b4afe 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderItem.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderItem.cs @@ -17,7 +17,8 @@ public class ProductionOrderItem : FullAuditedEntity, IMultiTenant public Guid MaterialId { get; set; } public Material Material { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } + public Uom Uom { get; set; } public decimal PlannedQuantity { get; set; } public decimal ConfirmedQuantity { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderStatus.cs index ec2badfd..deaad395 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class ProductionOrderStatus : FullAuditedEntity, IMultiTenant +public class ProductionOrderStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class ProductionOrderStatus : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection ProductionOrders { get; set; } + + public ProductionOrderStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderType.cs index dfa148e7..87357792 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionOrderType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class ProductionOrderType : FullAuditedEntity, IMultiTenant +public class ProductionOrderType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,4 +14,9 @@ public class ProductionOrderType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection ProductionOrders { get; set; } + + public ProductionOrderType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionWorkorder.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionWorkorder.cs index 94a91262..ac74b7e9 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionWorkorder.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Mrp/ProductionWorkorder.cs @@ -19,10 +19,10 @@ public class ProductionWorkorder : FullAuditedEntity, IMultiTenant public Guid MaterialId { get; set; } public Material Material { get; set; } - public Guid WorkcenterId { get; set; } + public string WorkcenterId { get; set; } public Workcenter Workcenter { get; set; } - public Guid StatusId { get; set; } + public string StatusId { get; set; } public WorkorderStatus Status { get; set; } public int Sequence { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Category.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Category.cs index 3125d089..32cc5b28 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Category.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Category.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Category : FullAuditedEntity, IMultiTenant +public class Category : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class Category : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection ProjectPhases { get; set; } + + public Category(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Project.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Project.cs index 971f9fbf..4d8f2e35 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Project.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Project.cs @@ -14,9 +14,9 @@ public class Project : FullAuditedEntity, IMultiTenant public string Name { get; set; } public string Description { get; set; } - public Guid? ProjectTypeId { get; set; } //Dahili, Müşteri, Araştırma, Bakım, Geliştirme + public string? ProjectTypeId { get; set; } //Dahili, Müşteri, Araştırma, Bakım, Geliştirme public Type ProjectType { get; set; } - public Guid? StatusId { get; set; } //Planlanıyor, Devam Ediyor, Tamamlandı, Beklemede, İptal Edildi + public string? StatusId { get; set; } //Planlanıyor, Devam Ediyor, Tamamlandı, Beklemede, İptal Edildi public Status Status { get; set; } public string Priority { get; set; } //Düşük, Orta, Yüksek, Kritik, Acil public Guid? ManagerId { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectPhase.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectPhase.cs index 24bb6a3c..5c5027ee 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectPhase.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectPhase.cs @@ -12,7 +12,7 @@ public class ProjectPhase : FullAuditedEntity, IMultiTenant public Guid? ProjectId { get; set; } public Project? Project { get; set; } - public Guid? CategoryId { get; set; } + public string? CategoryId { get; set; } public Category? Category { get; set; } public string Code { get; set; } @@ -31,7 +31,7 @@ public class ProjectPhase : FullAuditedEntity, IMultiTenant public int Progress { get; set; } public string Risks { get; set; } - public Guid? StatusId { get; set; } + public string? StatusId { get; set; } public Status? Status { get; set; } public bool IsActive { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectRisk.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectRisk.cs index 97fe7fbc..f82e60d0 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectRisk.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectRisk.cs @@ -11,6 +11,6 @@ public class ProjectRisk : FullAuditedEntity, IMultiTenant public Guid? ProjectId { get; set; } public Project? Project { get; set; } - public Guid? RiskId { get; set; } + public string? RiskId { get; set; } public Risk? Risk { get; set; } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectTask.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectTask.cs index b5359d16..7a2b8e13 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectTask.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectTask.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; @@ -19,11 +18,11 @@ public class ProjectTask : FullAuditedEntity, IMultiTenant public string Name { get; set; } public string Description { get; set; } - public Guid? TaskTypeId { get; set; } + public string? TaskTypeId { get; set; } public TaskType? TaskType { get; set; } public string Priority { get; set; } - public Guid? StatusId { get; set; } + public string? StatusId { get; set; } public Status? Status { get; set; } public Guid? EmployeeId { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectTaskDaily.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectTaskDaily.cs index 6035ef6b..0ab0f340 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectTaskDaily.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/ProjectTaskDaily.cs @@ -16,13 +16,13 @@ public class ProjectTaskDaily : FullAuditedEntity, IMultiTenant public DateTime Date { get; set; } - public Guid WorkedTypeId { get; set; } + public string WorkedTypeId { get; set; } public WorkType WorkedType { get; set; } public int HoursWorked { get; set; } //Çalışılan Saat public int Progress { get; set; } - public Guid StatusId { get; set; } + public string StatusId { get; set; } public Status Status { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Risk.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Risk.cs index 907d6d2d..359b22d0 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Risk.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Risk.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Risk : FullAuditedEntity, IMultiTenant +public class Risk : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,5 +15,10 @@ public class Risk : FullAuditedEntity, IMultiTenant public ICollection ProjectPhases { get; set; } public ICollection ProjectRisks { get; set; } + + public Risk(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Status.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Status.cs index 90c2ffa5..6ed69625 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Status.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Status.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Status : FullAuditedEntity, IMultiTenant +public class Status : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -16,5 +16,10 @@ public class Status : FullAuditedEntity, IMultiTenant public ICollection Projects { get; set; } public ICollection ProjectPhases { get; set; } public ICollection ProjectTasks { get; set; } + + public Status(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/TaskType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/TaskType.cs index 435e9da5..aa2c78e3 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/TaskType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/TaskType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class TaskType : FullAuditedEntity, IMultiTenant +public class TaskType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class TaskType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Projects { get; set; } + + public TaskType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Type.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Type.cs index 5b624966..d47a06e9 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Type.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Type.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Type : FullAuditedEntity, IMultiTenant +public class Type : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class Type : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Projects { get; set; } + + public Type(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/WorkType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/WorkType.cs index 6726e557..fb1751fa 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/WorkType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/WorkType.cs @@ -1,11 +1,10 @@ using System; -using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class WorkType : FullAuditedEntity, IMultiTenant +public class WorkType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +13,10 @@ public class WorkType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } // public ICollection ProjectTasks { get; set; } + + public WorkType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Inventory.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Inventory.cs index 3456b7d0..fac6cd6e 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Inventory.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Inventory.cs @@ -9,15 +9,17 @@ public class Inventory : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public Guid? MaterialId { get; set; } - public Guid? WarehouseId { get; set; } - public Guid? ZoneId { get; set; } - public Guid? LocationId { get; set; } + public string? WarehouseId { get; set; } + public string? ZoneId { get; set; } + public string? LocationId { get; set; } public decimal Quantity { get; set; } public decimal ReservedQuantity { get; set; } public decimal AvailableQuantity { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } + public Uom Uom { get; set; } + public string LotNumber { get; set; } public string SerialNumber { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs index 3dad3119..0c49a76f 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Location.cs @@ -5,17 +5,17 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Location : FullAuditedEntity, IMultiTenant +public class Location : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public Guid? WarehouseId { get; set; } + public string? WarehouseId { get; set; } public Warehouse? Warehouse { get; set; } - public Guid? ZoneId { get; set; } + public string? ZoneId { get; set; } public Zone? Zone { get; set; } - public Guid? LocationTypeId { get; set; } + public string? LocationTypeId { get; set; } public LocationType? LocationType { get; set; } public string Code { get; set; } @@ -26,9 +26,15 @@ public class Location : FullAuditedEntity, IMultiTenant public decimal CurrentStock { get; set; } public int Kind { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } + public Uom Uom { get; set; } public bool IsActive { get; set; } public ICollection MovementItems { get; set; } + + public Location(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs index 5be20a4e..145c804c 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/LocationType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class LocationType : FullAuditedEntity, IMultiTenant +public class LocationType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,5 +15,10 @@ public class LocationType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Locations { get; set; } + + public LocationType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Movement.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Movement.cs index da073f2b..694353d0 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Movement.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Movement.cs @@ -17,7 +17,7 @@ public class Movement : FullAuditedEntity, IMultiTenant public Guid? PartnerId { get; set; } public Partner? Partner { get; set; } - public Guid? ReferenceTypeId { get; set; } // e.g., Sales Order, Purchase Order + public string? ReferenceTypeId { get; set; } // e.g., Sales Order, Purchase Order public ReferenceType? ReferenceType { get; set; } public string ReferenceDocument { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/MovementItem.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/MovementItem.cs index 601ec613..92dfd4fc 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/MovementItem.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/MovementItem.cs @@ -11,13 +11,13 @@ public class MovementItem : FullAuditedEntity, IMultiTenant public Guid? MovementId { get; set; } public Movement? Movement { get; set; } - public Guid? WarehouseId { get; set; } + public string? WarehouseId { get; set; } public Warehouse? Warehouse { get; set; } - public Guid? ZoneId { get; set; } + public string? ZoneId { get; set; } public Zone? Zone { get; set; } - public Guid? LocationId { get; set; } + public string? LocationId { get; set; } public Location? Location { get; set; } public Guid? MaterialId { get; set; } @@ -25,7 +25,9 @@ public class MovementItem : FullAuditedEntity, IMultiTenant public decimal Quantity { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } + public Uom Uom { get; set; } + public string LotNumber { get; set; } public string Description { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/MovementType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/MovementType.cs index e1067902..08feade4 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/MovementType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/MovementType.cs @@ -4,11 +4,16 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class MovementType : FullAuditedEntity, IMultiTenant +public class MovementType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } public string Name { get; set; } public string Description { get; set; } public bool IsActive { get; set; } + + public MovementType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs index f66bf1b3..6e4bdbbf 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs @@ -16,11 +16,11 @@ public class Putaway : FullAuditedEntity, IMultiTenant public string Strategy { get; set; } public bool IsActive { get; set; } - public Guid? WarehouseId { get; set; } public Guid? MaterialTypeId { get; set; } public Guid? MaterialGroupId { get; set; } - public Guid? TargetZoneId { get; set; } - public Guid? TargetLocationId { get; set; } + public string? WarehouseId { get; set; } + public string? TargetZoneId { get; set; } + public string? TargetLocationId { get; set; } public ICollection Conditions { get; set; } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ReferenceType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ReferenceType.cs index 5cb6a545..0d66c308 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ReferenceType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ReferenceType.cs @@ -4,7 +4,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class ReferenceType : FullAuditedEntity, IMultiTenant +public class ReferenceType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -12,4 +12,9 @@ public class ReferenceType : FullAuditedEntity, IMultiTenant public string MovementTypeName { get; set; } public string Description { get; set; } public bool IsActive { get; set; } + + public ReferenceType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs index 1703419f..4d5b8c24 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Warehouse.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Warehouse : FullAuditedEntity, IMultiTenant +public class Warehouse : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,7 +15,8 @@ public class Warehouse : FullAuditedEntity, IMultiTenant public Guid? EmployeeId { get; set; } public Employee? Employee { get; set; } - public Guid? WarehouseTypeId { get; set; } + + public string? WarehouseTypeId { get; set; } public WarehouseType? WarehouseType { get; set; } public string Country { get; set; } @@ -32,7 +33,10 @@ public class Warehouse : FullAuditedEntity, IMultiTenant public ICollection Zones { get; set; } public ICollection Locations { get; set; } - public ICollection MovementItems { get; set; } + public Warehouse(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs index 5ccb92e2..37fb04a3 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/WarehouseType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class WarehouseType : FullAuditedEntity, IMultiTenant +public class WarehouseType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,5 +15,10 @@ public class WarehouseType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Warehouses { get; set; } + + public WarehouseType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs index a477c59a..deacbcd5 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/Zone.cs @@ -5,14 +5,14 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Zone : FullAuditedEntity, IMultiTenant +public class Zone : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public Guid? WarehouseId { get; set; } + public string? WarehouseId { get; set; } public Warehouse? Warehouse { get; set; } - public Guid? ZoneTypeId { get; set; } + public string? ZoneTypeId { get; set; } public ZoneType? ZoneType { get; set; } public string Code { get; set; } @@ -24,6 +24,10 @@ public class Zone : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Locations { get; set; } - public ICollection MovementItems { get; set; } + + public Zone(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs index 9ae38a2c..2182af00 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Store/ZoneType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class ZoneType : FullAuditedEntity, IMultiTenant +public class ZoneType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,5 +15,10 @@ public class ZoneType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Zones { get; set; } + + public ZoneType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/CustomerSegment.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/CustomerSegment.cs index aa9a55d3..634ae293 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/CustomerSegment.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/CustomerSegment.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class CustomerSegment : FullAuditedEntity, IMultiTenant +public class CustomerSegment : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class CustomerSegment : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Partners { get; set; } + + public CustomerSegment(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/CustomerType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/CustomerType.cs index c2189d3f..c8ad8469 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/CustomerType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/CustomerType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class CustomerType : FullAuditedEntity, IMultiTenant +public class CustomerType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,5 +15,9 @@ public class CustomerType : FullAuditedEntity, IMultiTenant public ICollection Partners { get; set; } + public CustomerType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/DeliveryTerm.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/DeliveryTerm.cs index 79492bff..c0b99022 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/DeliveryTerm.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/DeliveryTerm.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class DeliveryTerm : FullAuditedEntity, IMultiTenant +public class DeliveryTerm : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -16,4 +16,9 @@ public class DeliveryTerm : FullAuditedEntity, IMultiTenant public ICollection Quotations { get; set; } public ICollection SalesOrders { get; set; } + + public DeliveryTerm(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Material.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Material.cs index 489d13d4..4c1a7931 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Material.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Material.cs @@ -13,11 +13,16 @@ public class Material : FullAuditedEntity, IMultiTenant public string Name { get; set; } public string Barcode { get; set; } public string Description { get; set; } + public Guid? MaterialTypeId { get; set; } public MaterialType? MaterialType { get; set; } + public Guid? MaterialGroupId { get; set; } public MaterialGroup? MaterialGroup { get; set; } - public string Uom { get; set; } + + public string UomId { get; set; } + public Uom Uom { get; set; } + public decimal CostPrice { get; set; } public decimal SalesPrice { get; set; } public string Currency { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialSpecification.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialSpecification.cs index 81686a3c..96475027 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialSpecification.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/MaterialSpecification.cs @@ -11,10 +11,13 @@ public class MaterialSpecification : FullAuditedEntity, IMultiTenant public Guid MaterialId { get; set; } public Material Material { get; set; } + public string SpecificationName { get; set; } public string SpecificationValue { get; set; } - public Guid UnitId { get; set; } - public Uom Unit { get; set; } + + public string UomId { get; set; } + public Uom Uom { get; set; } + public bool IsRequired { get; set; } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/OrderStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/OrderStatus.cs index 7c4dbc29..3d5e8df2 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/OrderStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/OrderStatus.cs @@ -1,11 +1,10 @@ using System; -using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class OrderStatus : FullAuditedEntity, IMultiTenant +public class OrderStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -13,4 +12,9 @@ public class OrderStatus : FullAuditedEntity, IMultiTenant public string Description { get; set; } public bool IsActive { get; set; } + + public OrderStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Partner.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Partner.cs index a49a51d9..a4810813 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Partner.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Partner.cs @@ -16,7 +16,7 @@ public class Partner : FullAuditedEntity, IMultiTenant public string PartyType { get; set; } - public Guid? SectorId { get; set; } + public string? SectorId { get; set; } public Sector? Sector { get; set; } public long TaxNumber { get; set; } @@ -37,7 +37,7 @@ public class Partner : FullAuditedEntity, IMultiTenant public string Currency { get; set; } - public Guid? PaymentTermId { get; set; } + public string? PaymentTermId { get; set; } public PaymentTerm? PaymentTerm { get; set; } public decimal CreditLimit { get; set; } @@ -52,10 +52,10 @@ public class Partner : FullAuditedEntity, IMultiTenant public ICollection Movements { get; set; } //Customer ile ilgil bilgiler - public Guid? CustomerTypeId { get; set; } + public string? CustomerTypeId { get; set; } public CustomerType? CustomerType { get; set; } - public Guid? CustomerSegmentId { get; set; } + public string? CustomerSegmentId { get; set; } public CustomerSegment? CustomerSegment { get; set; } public Guid? EmployeeId { get; set; } @@ -68,10 +68,10 @@ public class Partner : FullAuditedEntity, IMultiTenant public decimal LifetimeValue { get; set; } // Müşteri Ömrü Değeri //Supplier ile ilgili bilgiler - public Guid? SupplierTypeId { get; set; } + public string? SupplierTypeId { get; set; } public SupplyType? SupplierType { get; set; } - public Guid? SupplyCardTypeId { get; set; } + public string? SupplyCardTypeId { get; set; } public SupplyCardType? SupplyCardType { get; set; } public string? CardNumber { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PaymentTerm.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PaymentTerm.cs index a343b22d..6165d27e 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PaymentTerm.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PaymentTerm.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class PaymentTerm : FullAuditedEntity, IMultiTenant +public class PaymentTerm : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -17,6 +17,11 @@ public class PaymentTerm : FullAuditedEntity, IMultiTenant public ICollection Quotations { get; set; } public ICollection PurchaseOrders { get; set; } public ICollection SalesOrders { get; set; } + + public PaymentTerm(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PurchaseOrder.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PurchaseOrder.cs index 94670470..1b59bcc7 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PurchaseOrder.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PurchaseOrder.cs @@ -17,7 +17,7 @@ public class PurchaseOrder : FullAuditedEntity, IMultiTenant public DateTime OrderDate { get; set; } public DateTime? DeliveryDate { get; set; } - public Guid PaymentTermId { get; set; } + public string PaymentTermId { get; set; } public PaymentTerm PaymentTerm { get; set; } public string Terms { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PurchaseOrderItem.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PurchaseOrderItem.cs index 4e2f5922..675b5df5 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PurchaseOrderItem.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PurchaseOrderItem.cs @@ -16,7 +16,10 @@ public class PurchaseOrderItem : FullAuditedEntity, IMultiTenant public decimal UnitPrice { get; set; } public decimal Quantity { get; set; } - public string Uom { get; set; } + + public string UomId { get; set; } + public Uom Uom { get; set; } + public decimal TotalPrice { get; set; } public decimal ReceivedQuantity { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Quotation.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Quotation.cs index 0cfdca16..54afe697 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Quotation.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Quotation.cs @@ -13,7 +13,8 @@ public class Quotation : FullAuditedEntity, IMultiTenant public string QuotationNumber { get; set; } public string RequestId { get; set; } public string RequestTitle { get; set; } - public Guid RequestTypeId { get; set; } + + public string RequestTypeId { get; set; } public RequestType RequestType { get; set; } public Guid SupplierId { get; set; } @@ -22,16 +23,16 @@ public class Quotation : FullAuditedEntity, IMultiTenant public DateTime QuotationDate { get; set; } public DateTime ValidUntil { get; set; } - public Guid StatusId { get; set; } + public string StatusId { get; set; } public QuotationStatus Status { get; set; } public decimal TotalAmount { get; set; } public string Currency { get; set; } - public Guid PaymentTermId { get; set; } + public string PaymentTermId { get; set; } public PaymentTerm PaymentTerm { get; set; } - public Guid DeliveryTermId { get; set; } + public string DeliveryTermId { get; set; } public DeliveryTerm DeliveryTerm { get; set; } public int? DeliveryTime { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/QuotationItem.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/QuotationItem.cs index 93881925..8785e2fe 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/QuotationItem.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/QuotationItem.cs @@ -15,7 +15,8 @@ public class QuotationItem : FullAuditedEntity, IMultiTenant public Material Material { get; set; } public decimal Quantity { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } + public Uom Uom { get; set; } public decimal UnitPrice { get; set; } public decimal TotalPrice { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/QuotationStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/QuotationStatus.cs index 8bc8edc5..b380b91f 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/QuotationStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/QuotationStatus.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class QuotationStatus : FullAuditedEntity, IMultiTenant +public class QuotationStatus : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,4 +15,9 @@ public class QuotationStatus : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Quotations { get; set; } + + public QuotationStatus(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Request.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Request.cs index 3425de20..64b6238c 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Request.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/Request.cs @@ -11,7 +11,7 @@ public class Request : FullAuditedEntity, IMultiTenant public string RequestNumber { get; set; } - public Guid RequestTypeId { get; set; } + public string RequestTypeId { get; set; } public RequestType RequestType { get; set; } public Guid DepartmentId { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/RequestItem.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/RequestItem.cs index dac8611e..fc6dcaae 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/RequestItem.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/RequestItem.cs @@ -15,7 +15,10 @@ public class RequestItem : FullAuditedEntity, IMultiTenant public Material Material { get; set; } public decimal Quantity { get; set; } - public string Uom { get; set; } + + public string UomId { get; set; } + public Uom Uom { get; set; } + public decimal EstimatedPrice { get; set; } public string Specification { get; set; } public string Justification { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/RequestType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/RequestType.cs index d8ed5272..9afcc00f 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/RequestType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/RequestType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class RequestType : FullAuditedEntity, IMultiTenant +public class RequestType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class RequestType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection PurchaseRequests { get; set; } + + public RequestType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/SupplyCardType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/SupplyCardType.cs index 1347c641..56a34a39 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/SupplyCardType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/SupplyCardType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class SupplyCardType : FullAuditedEntity, IMultiTenant +public class SupplyCardType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class SupplyCardType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Partners { get; set; } + + public SupplyCardType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/SupplyType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/SupplyType.cs index 580a56e3..48621445 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/SupplyType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/SupplyType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class SupplyType : FullAuditedEntity, IMultiTenant +public class SupplyType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -14,5 +14,10 @@ public class SupplyType : FullAuditedEntity, IMultiTenant public bool IsActive { get; set; } public ICollection Partners { get; set; } + + public SupplyType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 24b25991..3955f821 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -893,6 +893,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Sector)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).IsRequired().HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); }); @@ -919,7 +920,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Currency)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(8); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Symbol).HasMaxLength(8); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Rate).HasPrecision(18, 6); @@ -941,6 +942,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Country)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).IsRequired().HasMaxLength(8); b.Property(x => x.Code).IsRequired().HasMaxLength(8); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.GroupName).HasMaxLength(128); @@ -1028,6 +1030,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.UomCategory)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).IsRequired().HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); }); @@ -1037,6 +1040,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Uom)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(64); b.Property(x => x.Type).IsRequired().HasConversion().HasMaxLength(32); b.Property(x => x.Ratio).HasPrecision(18, 6); @@ -1262,17 +1266,20 @@ public class PlatformDbContext : b.Property(x => x.Status).HasMaxLength(20); b.Property(x => x.isPublished).HasDefaultValue(false); - // EventCategory -> Event (1 - N) b.HasOne(x => x.Category) .WithMany(x => x.Events) .HasForeignKey(x => x.CategoryId) .OnDelete(DeleteBehavior.Cascade); - // EventType -> Event (1 - N) b.HasOne(x => x.Type) .WithMany(x => x.Events) .HasForeignKey(x => x.TypeId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Employee) + .WithMany(x => x.Events) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -1778,8 +1785,8 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Code).HasMaxLength(64); + b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Address1).HasMaxLength(256); b.Property(x => x.Address2).HasMaxLength(256); b.Property(x => x.District).HasMaxLength(128); @@ -1862,6 +1869,11 @@ public class PlatformDbContext : b.Property(x => x.MinSalary).HasPrecision(18, 2); b.Property(x => x.MaxSalary).HasPrecision(18, 2); b.Property(x => x.Currency).IsRequired().HasMaxLength(8); + + b.HasOne(x => x.Department) + .WithMany(b => b.JobPositions) + .HasForeignKey(x => x.DepartmentId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -1928,12 +1940,14 @@ public class PlatformDbContext : .HasForeignKey(x => x.ParentCostCenterId); b.HasOne(x => x.ResponsibleEmployee) - .WithMany() - .HasForeignKey(x => x.ResponsibleEmployeeId); + .WithMany(x => x.CostCenters) + .HasForeignKey(x => x.ResponsibleEmployeeId) + .OnDelete(DeleteBehavior.Restrict); b.HasOne(x => x.Department) - .WithMany() - .HasForeignKey(x => x.DepartmentId); + .WithMany(b => b.CostCenters) + .HasForeignKey(x => x.DepartmentId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -1960,8 +1974,9 @@ public class PlatformDbContext : .HasForeignKey(x => x.JobPositionId); b.HasOne(x => x.Department) - .WithMany() - .HasForeignKey(x => x.DepartmentId); + .WithMany(b => b.Employees) + .HasForeignKey(x => x.DepartmentId) + .OnDelete(DeleteBehavior.Restrict); b.HasOne(x => x.Manager) .WithMany() @@ -2310,6 +2325,11 @@ public class PlatformDbContext : b.Property(x => x.LikeCount).HasDefaultValue(0); b.Property(x => x.IsOwnPost).HasDefaultValue(false); b.Property(x => x.IsLiked).HasDefaultValue(false); + + b.HasOne(x => x.Employee) + .WithMany(b => b.SocialPosts) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2365,6 +2385,11 @@ public class PlatformDbContext : .WithMany(x => x.Comments) .HasForeignKey(x => x.SocialPostId) .OnDelete(DeleteBehavior.Cascade); + + b.HasOne(x => x.Employee) + .WithMany(b => b.SocialComments) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2376,6 +2401,11 @@ public class PlatformDbContext : .WithMany(x => x.Likes) .HasForeignKey(x => x.SocialPostId) .OnDelete(DeleteBehavior.Cascade); + + b.HasOne(x => x.Employee) + .WithMany(b => b.SocialLikes) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); //Supply Chain @@ -2421,6 +2451,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SupplyType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2431,6 +2462,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SupplyCardType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2441,6 +2473,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.RequestType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2451,6 +2484,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomerType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2461,6 +2495,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CustomerSegment)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2474,7 +2509,7 @@ public class PlatformDbContext : b.Property(p => p.Code).IsRequired().HasMaxLength(64); b.Property(p => p.Name).IsRequired().HasMaxLength(256); b.Property(p => p.PartyType).IsRequired().HasMaxLength(32); - b.Property(p => p.SectorId).IsRequired(); + b.Property(p => p.SectorId).IsRequired().HasMaxLength(128); b.Property(p => p.TaxNumber).IsRequired(); b.Property(p => p.TaxOffice).HasMaxLength(128); b.Property(p => p.PaymentTermId).IsRequired(); @@ -2507,6 +2542,11 @@ public class PlatformDbContext : b.Property(x => x.AverageOrderValue).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.LifetimeValue).HasPrecision(18, 2).HasDefaultValue(0); + b.HasOne(x => x.Sector) + .WithMany(x => x.Partners) + .HasForeignKey(x => x.SectorId) + .OnDelete(DeleteBehavior.Restrict); + b.HasOne(x => x.SupplierType) .WithMany(x => x.Partners) .HasForeignKey(x => x.SupplierTypeId) @@ -2642,6 +2682,11 @@ public class PlatformDbContext : .WithMany(x => x.Materials) .HasForeignKey(x => x.MaterialGroupId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(x => x.Materials) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2658,9 +2703,9 @@ public class PlatformDbContext : .HasForeignKey(x => x.MaterialId) .OnDelete(DeleteBehavior.Restrict); - b.HasOne(x => x.Unit) + b.HasOne(x => x.Uom) .WithMany(x => x.MaterialSpecifications) - .HasForeignKey(x => x.UnitId) + .HasForeignKey(x => x.UomId) .OnDelete(DeleteBehavior.Restrict); }); @@ -2678,6 +2723,11 @@ public class PlatformDbContext : .WithMany(x => x.ApprovalWorkflows) .HasForeignKey(x => x.MaterialTypeId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Department) + .WithMany(x => x.Approvals) + .HasForeignKey(x => x.DepartmentId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2722,6 +2772,11 @@ public class PlatformDbContext : b.Property(x => x.SourceId).IsRequired(); b.Property(x => x.Status).IsRequired().HasMaxLength(50); b.Property(x => x.Currency).IsRequired().HasMaxLength(8); + + b.HasOne(x => x.Employee) + .WithMany(x => x.Opportunities) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2769,6 +2824,11 @@ public class PlatformDbContext : b.Property(x => x.Priority).IsRequired().HasMaxLength(20); b.Property(x => x.Status).IsRequired().HasMaxLength(20); b.Property(x => x.Description).HasMaxLength(200); + + b.HasOne(x => x.Employee) + .WithMany(x => x.Requests) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2778,7 +2838,7 @@ public class PlatformDbContext : b.Property(x => x.MaterialId).IsRequired(); b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0); - b.Property(x => x.Uom).IsRequired().HasMaxLength(64); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.EstimatedPrice).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.Specification).HasMaxLength(500); b.Property(x => x.Justification).HasMaxLength(500); @@ -2792,6 +2852,11 @@ public class PlatformDbContext : .WithMany(x => x.Items) .HasForeignKey(x => x.RequestId) .OnDelete(DeleteBehavior.Cascade); + + b.HasOne(x => x.Uom) + .WithMany(x => x.RequestItems) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2799,6 +2864,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkcenterType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2809,6 +2875,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkcenterStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2819,6 +2886,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Workcenter)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).IsRequired().HasMaxLength(100); b.Property(x => x.Code).IsRequired().HasMaxLength(100); b.Property(x => x.Name).IsRequired().HasMaxLength(200); b.Property(x => x.Description).HasMaxLength(500); @@ -2842,6 +2910,11 @@ public class PlatformDbContext : .WithMany(x => x.Workcenters) .HasForeignKey(x => x.WorkcenterTypeId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Department) + .WithMany(x => x.Workcenters) + .HasForeignKey(x => x.DepartmentId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2851,13 +2924,18 @@ public class PlatformDbContext : b.Property(x => x.SpecificationName).IsRequired().HasMaxLength(200); b.Property(x => x.SpecificationValue).IsRequired().HasMaxLength(200); - b.Property(x => x.Uom).IsRequired().HasMaxLength(64); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.IsRequired).HasDefaultValue(false); b.HasOne(x => x.Workcenter) .WithMany(x => x.Specifications) .HasForeignKey(x => x.WorkcenterId) - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(x => x.WorkcenterSpecifications) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2866,7 +2944,7 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Code).IsRequired().HasMaxLength(100); - b.Property(x => x.WorkcenterId).IsRequired(); + b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(100); b.Property(x => x.PlanType).IsRequired().HasMaxLength(50); b.Property(x => x.Priority).HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(1000); @@ -2920,18 +2998,23 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Code).IsRequired().HasMaxLength(100); - b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(50); + b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(100); b.Property(x => x.Location).HasMaxLength(250); b.Property(x => x.FaultTypeId).IsRequired(); b.Property(x => x.Priority).HasMaxLength(50); b.Property(x => x.Severity).HasMaxLength(50); b.Property(x => x.Title).HasMaxLength(200); - b.Property(x => x.Description); + b.Property(x => x.Description).HasMaxLength(1000); b.Property(x => x.AssignedTo).HasMaxLength(150); b.Property(x => x.Status).IsRequired().HasMaxLength(20); - b.Property(x => x.ResolutionNotes); + b.Property(x => x.ResolutionNotes).HasMaxLength(2000); b.Property(x => x.ClosedBy).HasMaxLength(150); b.Property(x => x.WorkorderId).HasMaxLength(100); + + b.HasOne(x => x.Workcenter) + .WithMany(x => x.Faults) + .HasForeignKey(x => x.WorkcenterId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -2939,6 +3022,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.FaultStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2949,6 +3033,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.FaultType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2959,6 +3044,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2969,6 +3055,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2980,6 +3067,7 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2990,6 +3078,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Warehouse)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).IsRequired().HasMaxLength(50); b.Property(x => x.Code).IsRequired().HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(200); b.Property(x => x.Description).HasMaxLength(500); @@ -3025,6 +3114,7 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3037,6 +3127,7 @@ public class PlatformDbContext : b.Property(x => x.WarehouseId).IsRequired(); b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.ZoneTypeId).IsRequired(); @@ -3061,6 +3152,7 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3074,6 +3166,7 @@ public class PlatformDbContext : b.Property(x => x.WarehouseId).IsRequired(); b.Property(x => x.ZoneId).IsRequired(); b.Property(x => x.Code).IsRequired().HasMaxLength(50); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.LocationTypeId).IsRequired(); @@ -3095,6 +3188,11 @@ public class PlatformDbContext : .WithMany(x => x.Locations) .HasForeignKey(x => x.ZoneId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(x => x.Locations) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3167,7 +3265,7 @@ public class PlatformDbContext : b.Property(x => x.Name).IsRequired().HasMaxLength(200); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.OperationTypeId).IsRequired(); - b.Property(x => x.WorkcenterId).IsRequired(); + b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(100); b.Property(x => x.StandardTime).HasDefaultValue(0); b.Property(x => x.SetupTime).HasDefaultValue(0); b.Property(x => x.LaborCost).HasPrecision(18, 2).HasDefaultValue(0); @@ -3181,6 +3279,11 @@ public class PlatformDbContext : .WithMany(x => x.Operations) .HasForeignKey(x => x.OperationTypeId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Workcenter) + .WithMany(x => x.Operations) + .HasForeignKey(x => x.WorkcenterId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3214,7 +3317,7 @@ public class PlatformDbContext : b.Property(x => x.BomId).IsRequired(); b.Property(x => x.MaterialId).IsRequired(); b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0); - b.Property(x => x.Uom).IsRequired().HasMaxLength(64); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.ScrapPercentage).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.IsPhantom).HasDefaultValue(false); b.Property(x => x.Position).HasDefaultValue(0); @@ -3225,6 +3328,11 @@ public class PlatformDbContext : .WithMany(x => x.Components) .HasForeignKey(x => x.BomId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(x => x.BomComponents) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3234,7 +3342,7 @@ public class PlatformDbContext : b.Property(x => x.BomId).IsRequired(); b.Property(x => x.OperationId).IsRequired(); - b.Property(x => x.WorkcenterId).IsRequired(false); + b.Property(x => x.WorkcenterId).HasMaxLength(100); b.Property(x => x.Sequence).IsRequired(); b.Property(x => x.SetupTime).HasDefaultValue(0); b.Property(x => x.RunTime).HasDefaultValue(0); @@ -3253,6 +3361,12 @@ public class PlatformDbContext : .WithMany(x => x.BomOperations) .HasForeignKey(x => x.OperationId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Workcenter) + .WithMany(x => x.BomOperations) + .HasForeignKey(x => x.WorkcenterId) + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(false); }); builder.Entity(b => @@ -3260,6 +3374,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.BomType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3270,6 +3385,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Type)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3280,6 +3396,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Status)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3290,6 +3407,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.TaskType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3300,6 +3418,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Risk)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3310,6 +3429,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Category)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3320,6 +3440,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3419,6 +3540,11 @@ public class PlatformDbContext : .WithMany(x => x.Tasks) .HasForeignKey(x => x.ProjectId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Employee) + .WithMany(x => x.ProjectTasks) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3442,6 +3568,11 @@ public class PlatformDbContext : .WithMany(x => x.DailyLogs) .HasForeignKey(x => x.TaskId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Employee) + .WithMany(x => x.ProjectTaskDailies) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3470,6 +3601,11 @@ public class PlatformDbContext : .WithMany(x => x.Teams) .HasForeignKey(x => x.ProjectId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Employee) + .WithMany(x => x.ProjectTeams) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3477,6 +3613,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.QuotationStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3487,6 +3624,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.DeliveryTerm)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3547,7 +3685,7 @@ public class PlatformDbContext : b.Property(x => x.QuotationId).IsRequired(); b.Property(x => x.MaterialId).IsRequired(); b.Property(x => x.Quantity).HasPrecision(18, 2).IsRequired(); - b.Property(x => x.Uom).IsRequired().HasMaxLength(64); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.UnitPrice).HasPrecision(18, 2).IsRequired(); b.Property(x => x.TotalPrice).HasPrecision(18, 2).IsRequired(); b.Property(x => x.LeadTime).HasDefaultValue(0); @@ -3562,6 +3700,11 @@ public class PlatformDbContext : .WithMany(x => x.Items) .HasForeignKey(x => x.QuotationId) .OnDelete(DeleteBehavior.Cascade); + + b.HasOne(x => x.Uom) + .WithMany(x => x.QuotationItems) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3570,7 +3713,7 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.WorkorderNumber).HasMaxLength(50); - b.Property(x => x.WorkcenterId).IsRequired(); + b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(100); b.Property(x => x.WorkorderTypeId).IsRequired(); b.Property(x => x.Priority).IsRequired().HasMaxLength(50); b.Property(x => x.Status).IsRequired().HasMaxLength(50); @@ -3581,6 +3724,21 @@ public class PlatformDbContext : b.Property(x => x.Description).HasMaxLength(1000); b.Property(x => x.Notes).HasMaxLength(1000); + + b.HasOne(x => x.WorkorderType) + .WithMany(x => x.Workorders) + .HasForeignKey(x => x.WorkorderTypeId) + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Workcenter) + .WithMany(x => x.Workorders) + .HasForeignKey(x => x.WorkcenterId) + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Employee) + .WithMany(x => x.Workorders) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3619,6 +3777,11 @@ public class PlatformDbContext : .WithMany(x => x.Activities) .HasForeignKey(x => x.WorkorderId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Employee) + .WithMany(x => x.WorkorderActivities) + .HasForeignKey(x => x.EmployeeId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3626,6 +3789,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.OrderStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3683,7 +3847,7 @@ public class PlatformDbContext : b.Property(x => x.MaterialId).IsRequired(); b.Property(x => x.UnitPrice).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0); - b.Property(x => x.Uom).IsRequired().HasMaxLength(64); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.TotalPrice).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.ReceivedQuantity).HasPrecision(18, 2).HasDefaultValue(0); @@ -3701,6 +3865,11 @@ public class PlatformDbContext : .WithMany(x => x.PurchaseOrders) .HasForeignKey(x => x.PurchaseOrderId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(x => x.PurchaseOrderItems) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3708,6 +3877,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesOrderStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3759,7 +3929,7 @@ public class PlatformDbContext : b.Property(x => x.DeliveredQuantity).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.UnitPrice).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.TotalAmount).HasPrecision(18, 2).HasDefaultValue(0); - b.Property(x => x.Uom).IsRequired().HasMaxLength(64); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.DiscountRate).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.DiscountAmount).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.TaxRate).HasPrecision(18, 2).HasDefaultValue(0); @@ -3776,6 +3946,11 @@ public class PlatformDbContext : .WithMany(x => x.Items) .HasForeignKey(x => x.SalesOrderId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(x => x.SalesOrderItems) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3792,9 +3967,14 @@ public class PlatformDbContext : b.Property(x => x.ReservedQuantity).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.AvailableQuantity).HasPrecision(18, 2).HasDefaultValue(0); - b.Property(x => x.Uom).IsRequired().HasMaxLength(64); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.LotNumber).HasMaxLength(100); b.Property(x => x.SerialNumber).HasMaxLength(100); + + b.HasOne(x => x.Uom) + .WithMany(x => x.Inventories) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3802,6 +3982,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MovementType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3812,6 +3993,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MovementType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3822,6 +4004,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReferenceType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.MovementTypeName).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); @@ -3858,7 +4041,7 @@ public class PlatformDbContext : b.Property(x => x.ZoneId).IsRequired(); b.Property(x => x.LocationId).IsRequired(); b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0); - b.Property(x => x.Uom).IsRequired().HasMaxLength(64); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.LotNumber).HasMaxLength(100); b.Property(x => x.Description).HasMaxLength(1000); @@ -3886,6 +4069,11 @@ public class PlatformDbContext : .WithMany(x => x.MovementItems) .HasForeignKey(x => x.MovementId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(x => x.MovementItems) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3893,6 +4081,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WaybillStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3903,6 +4092,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WaybillType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3959,7 +4149,7 @@ public class PlatformDbContext : b.Property(x => x.WaybillId).IsRequired(); b.Property(x => x.MaterialId).IsRequired(); - b.Property(x => x.Uom).HasMaxLength(64); + b.Property(x => x.UomId).HasMaxLength(64); b.Property(x => x.Description).HasMaxLength(500); @@ -3981,6 +4171,11 @@ public class PlatformDbContext : .WithMany(ws => ws.WaybillItems) .HasForeignKey(x => x.MaterialId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(ws => ws.WaybillItems) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3988,6 +4183,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.InvoiceType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3998,6 +4194,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.InvoiceStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -4008,6 +4205,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PaymentStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -4063,7 +4261,7 @@ public class PlatformDbContext : b.Property(x => x.InvoiceId).IsRequired(); b.Property(x => x.MaterialId).IsRequired(); - b.Property(x => x.Uom).HasMaxLength(64).IsRequired(); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.Description).HasMaxLength(500); @@ -4087,6 +4285,11 @@ public class PlatformDbContext : .WithMany(ca => ca.InvoiceItems) .HasForeignKey(x => x.MaterialId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(ca => ca.InvoiceItems) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -4094,6 +4297,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CheckStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -4104,6 +4308,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.CheckType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -4157,6 +4362,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionOrderType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -4167,6 +4373,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionOrderStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -4181,7 +4388,7 @@ public class PlatformDbContext : b.Property(x => x.OrderTypeId).IsRequired(); b.Property(x => x.StatusId).IsRequired(); b.Property(x => x.Priority).IsRequired().HasMaxLength(50); - b.Property(x => x.Uom).HasMaxLength(64); + b.Property(x => x.UomId).HasMaxLength(64); b.Property(x => x.Currency).HasMaxLength(10); b.Property(x => x.CustomerRequirement).HasMaxLength(1000); b.Property(x => x.PlannedQuantity).HasPrecision(18, 2).HasDefaultValue(0); @@ -4200,6 +4407,11 @@ public class PlatformDbContext : .WithMany(po => po.ProductionOrders) .HasForeignKey(x => x.StatusId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(po => po.ProductionOrders) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -4210,7 +4422,7 @@ public class PlatformDbContext : b.Property(x => x.ProductionOrderId).IsRequired(); b.Property(x => x.SalesOrderId).IsRequired(); b.Property(x => x.MaterialId).IsRequired(); - b.Property(x => x.Uom).IsRequired().HasMaxLength(64); + b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.PlannedQuantity).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.ConfirmedQuantity).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.RequiredQuantity).HasPrecision(18, 2).HasDefaultValue(0); @@ -4225,6 +4437,11 @@ public class PlatformDbContext : .WithMany(po => po.ProductionOrderItems) .HasForeignKey(x => x.MaterialId) .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Uom) + .WithMany(po => po.ProductionOrderItems) + .HasForeignKey(x => x.UomId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -4240,7 +4457,7 @@ public class PlatformDbContext : b.Property(x => x.PlannedQuantity).HasDefaultValue(0).HasPrecision(18, 2); b.Property(x => x.ConfirmedQuantity).HasDefaultValue(0).HasPrecision(18, 2); b.Property(x => x.ScrapQuantity).HasDefaultValue(0).HasPrecision(18, 2); - b.Property(x => x.WorkcenterId).IsRequired(); + b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(100); b.Property(x => x.SetupTime).HasDefaultValue(0); b.Property(x => x.ProcessTime).HasDefaultValue(0); b.Property(x => x.ActualSetupTime).HasDefaultValue(0); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251210125522_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.Designer.cs similarity index 96% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251210125522_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.Designer.cs index 4d937801..e8137f2d 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251210125522_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251210125522_Initial")] + [Migration("20251211134804_Initial")] partial class Initial { /// @@ -1530,8 +1530,9 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(1m); - b.Property("BomTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("BomTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -1675,7 +1676,7 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1694,6 +1695,8 @@ namespace Erp.Platform.Migrations b.HasIndex("OperationId"); + b.HasIndex("UomId"); + b.ToTable("Mrp_T_BomComponent", (string)null); }); @@ -1792,8 +1795,9 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.HasKey("Id"); @@ -1808,8 +1812,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.BomType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2079,8 +2084,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Category", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2299,15 +2305,17 @@ namespace Erp.Platform.Migrations .HasMaxLength(200) .HasColumnType("nvarchar(200)"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TypeId") - .HasColumnType("uniqueidentifier"); + b.Property("TypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -2322,8 +2330,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CheckStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2380,8 +2389,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CheckType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2450,8 +2460,8 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("CountryId") - .HasColumnType("uniqueidentifier"); + b.Property("CountryId") + .HasColumnType("nvarchar(8)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -3375,8 +3385,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Country", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); b.Property("Code") .IsRequired() @@ -3452,8 +3463,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CountryGroup", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -3637,13 +3648,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Currency", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -3778,8 +3785,8 @@ namespace Erp.Platform.Migrations b.Property("PartnerId") .HasColumnType("uniqueidentifier"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .HasColumnType("nvarchar(450)"); b.Property("Risk") .HasMaxLength(10) @@ -4116,8 +4123,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CustomerSegment", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4174,8 +4182,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CustomerType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4284,8 +4293,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.DeliveryTerm", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5480,16 +5490,18 @@ namespace Erp.Platform.Migrations .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("EstimatedRepairTime") .HasColumnType("int"); - b.Property("FaultStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("FaultStatusId") + .HasColumnType("nvarchar(50)"); - b.Property("FaultTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("FaultTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("FollowUpRequired") .HasColumnType("bit"); @@ -5520,7 +5532,8 @@ namespace Erp.Platform.Migrations .HasColumnType("nvarchar(50)"); b.Property("ResolutionNotes") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Severity") .HasMaxLength(50) @@ -5539,9 +5552,10 @@ namespace Erp.Platform.Migrations .HasMaxLength(200) .HasColumnType("nvarchar(200)"); - b.Property("WorkcenterId") - .HasMaxLength(50) - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("WorkorderId") .HasMaxLength(100) @@ -5560,8 +5574,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.FaultStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5618,8 +5633,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.FaultType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5868,8 +5884,9 @@ namespace Erp.Platform.Migrations b.Property("LastMovementDate") .HasColumnType("datetime2"); - b.Property("LocationId") - .HasColumnType("uniqueidentifier"); + b.Property("LocationId") + .IsRequired() + .HasColumnType("nvarchar(max)"); b.Property("LotNumber") .HasMaxLength(100) @@ -5901,19 +5918,23 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(max)"); - b.Property("ZoneId") - .HasColumnType("uniqueidentifier"); + b.Property("ZoneId") + .IsRequired() + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); + b.HasIndex("UomId"); + b.ToTable("Str_T_Inventory", (string)null); }); @@ -5966,8 +5987,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("InvoiceTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("InvoiceTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -5993,8 +6015,8 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("PaymentStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentStatusId") + .HasColumnType("nvarchar(50)"); b.Property("RemainingAmount") .ValueGeneratedOnAdd() @@ -6002,8 +6024,9 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("Subtotal") .ValueGeneratedOnAdd() @@ -6140,7 +6163,7 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -6151,13 +6174,16 @@ namespace Erp.Platform.Migrations b.HasIndex("MaterialId"); + b.HasIndex("UomId"); + b.ToTable("Acc_B_InvoiceItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.InvoiceStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -6214,8 +6240,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.InvoiceType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -7439,8 +7466,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Location", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Capacity") .ValueGeneratedOnAdd() @@ -7501,8 +7529,9 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("LocationTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("Name") .IsRequired() @@ -7513,19 +7542,23 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") - .HasColumnType("nvarchar(max)"); + b.Property("UomId") + .HasColumnType("nvarchar(64)"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("ZoneId") - .HasColumnType("uniqueidentifier"); + b.Property("ZoneId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); b.HasIndex("LocationTypeId"); + b.HasIndex("UomId"); + b.HasIndex("WarehouseId"); b.HasIndex("ZoneId"); @@ -7535,8 +7568,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.LocationType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -7785,8 +7819,8 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("Uom") - .HasColumnType("nvarchar(max)"); + b.Property("UomId") + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -7794,6 +7828,8 @@ namespace Erp.Platform.Migrations b.HasIndex("MaterialTypeId"); + b.HasIndex("UomId"); + b.ToTable("Scp_T_Material", (string)null); }); @@ -7922,14 +7958,14 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnitId") - .HasColumnType("uniqueidentifier"); + b.Property("UomId") + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); b.HasIndex("MaterialId"); - b.HasIndex("UnitId"); + b.HasIndex("UomId"); b.ToTable("Scp_T_MaterialSpecification", (string)null); }); @@ -8334,8 +8370,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(100) .HasColumnType("nvarchar(100)"); - b.Property("ReferenceTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("ReferenceTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -8389,8 +8426,9 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationId") - .HasColumnType("uniqueidentifier"); + b.Property("LocationId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("LotNumber") .HasMaxLength(100) @@ -8412,16 +8450,18 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("ZoneId") - .HasColumnType("uniqueidentifier"); + b.Property("ZoneId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -8431,6 +8471,8 @@ namespace Erp.Platform.Migrations b.HasIndex("MovementId"); + b.HasIndex("UomId"); + b.HasIndex("WarehouseId"); b.HasIndex("ZoneId"); @@ -8440,8 +8482,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.MovementType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -8710,8 +8753,10 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.HasKey("Id"); @@ -9180,8 +9225,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.OrderStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -9388,11 +9434,11 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("CustomerSegmentId") - .HasColumnType("uniqueidentifier"); + b.Property("CustomerSegmentId") + .HasColumnType("nvarchar(50)"); - b.Property("CustomerTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("CustomerTypeId") + .HasColumnType("nvarchar(50)"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -9464,8 +9510,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(32) .HasColumnType("nvarchar(32)"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .IsRequired() + .HasColumnType("nvarchar(450)"); b.Property("PerformanceMetricsJson") .HasColumnType("text"); @@ -9479,19 +9526,21 @@ namespace Erp.Platform.Migrations .HasMaxLength(16) .HasColumnType("nvarchar(16)"); - b.Property("SectorId") - .HasColumnType("uniqueidentifier"); + b.Property("SectorId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Status") .IsRequired() .HasMaxLength(10) .HasColumnType("nvarchar(10)"); - b.Property("SupplierTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("SupplierTypeId") + .HasColumnType("nvarchar(50)"); - b.Property("SupplyCardTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("SupplyCardTypeId") + .HasColumnType("nvarchar(50)"); b.Property("TaxNumber") .HasColumnType("bigint"); @@ -9813,8 +9862,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.PaymentMethod", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("Commission") .HasPrecision(5, 3) @@ -9870,8 +9919,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.PaymentStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -9928,8 +9978,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10371,8 +10421,10 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.HasKey("Id"); @@ -10581,8 +10633,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("OrderTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("OrderTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("PlannedCost") .ValueGeneratedOnAdd() @@ -10619,14 +10672,15 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10636,6 +10690,8 @@ namespace Erp.Platform.Migrations b.HasIndex("StatusId"); + b.HasIndex("UomId"); + b.ToTable("Mrp_T_ProductionOrder", (string)null); }); @@ -10711,7 +10767,7 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10724,13 +10780,16 @@ namespace Erp.Platform.Migrations b.HasIndex("SalesOrderId"); + b.HasIndex("UomId"); + b.ToTable("Mrp_T_ProductionOrderItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10787,8 +10846,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10942,15 +11002,18 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("WorkorderNumber") .IsRequired() @@ -11123,17 +11186,19 @@ namespace Erp.Platform.Migrations b.Property("ProjectPhaseId") .HasColumnType("uniqueidentifier"); - b.Property("ProjectTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("ProjectTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("StartDate") .HasColumnType("datetime2"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("TaskTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("TaskTypeId") + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11179,8 +11244,9 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("CategoryId") - .HasColumnType("uniqueidentifier"); + b.Property("CategoryId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -11242,8 +11308,8 @@ namespace Erp.Platform.Migrations b.Property("ProjectId") .HasColumnType("uniqueidentifier"); - b.Property("RiskId") - .HasColumnType("uniqueidentifier"); + b.Property("RiskId") + .HasColumnType("nvarchar(50)"); b.Property("Risks") .HasMaxLength(500) @@ -11257,8 +11323,9 @@ namespace Erp.Platform.Migrations b.Property("StartDate") .HasColumnType("datetime2"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11315,8 +11382,9 @@ namespace Erp.Platform.Migrations b.Property("ProjectId") .HasColumnType("uniqueidentifier"); - b.Property("RiskId") - .HasColumnType("uniqueidentifier"); + b.Property("RiskId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11405,11 +11473,12 @@ namespace Erp.Platform.Migrations b.Property("StartDate") .HasColumnType("datetime2"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("TaskTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("TaskTypeId") + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11493,8 +11562,9 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TaskId") .HasColumnType("uniqueidentifier"); @@ -11503,8 +11573,9 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkedTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkedTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -11704,8 +11775,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .IsRequired() + .HasColumnType("nvarchar(450)"); b.Property("QuotationId") .HasColumnType("uniqueidentifier"); @@ -11845,7 +11917,7 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -11856,6 +11928,8 @@ namespace Erp.Platform.Migrations b.HasIndex("PurchaseOrderId"); + b.HasIndex("UomId"); + b.ToTable("Scp_T_PurchaseOrderItem", (string)null); }); @@ -11928,18 +12002,19 @@ namespace Erp.Platform.Migrations .IsRequired() .HasColumnType("nvarchar(max)"); - b.Property("TargetLocationId") - .HasColumnType("uniqueidentifier"); + b.Property("TargetLocationId") + .HasColumnType("nvarchar(max)"); - b.Property("TargetZoneId") - .HasColumnType("uniqueidentifier"); + b.Property("TargetZoneId") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -12308,8 +12383,9 @@ namespace Erp.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DeliveryTermId") - .HasColumnType("uniqueidentifier"); + b.Property("DeliveryTermId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("DeliveryTime") .ValueGeneratedOnAdd() @@ -12353,11 +12429,12 @@ namespace Erp.Platform.Migrations .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); - b.Property("PaymentMethodId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentMethodId") + .HasColumnType("nvarchar(450)"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .IsRequired() + .HasColumnType("nvarchar(450)"); b.Property("QuotationDate") .HasColumnType("datetime2"); @@ -12375,11 +12452,13 @@ namespace Erp.Platform.Migrations .HasMaxLength(200) .HasColumnType("nvarchar(200)"); - b.Property("RequestTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("RequestTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("SubmittedAt") .HasColumnType("datetime2"); @@ -12487,7 +12566,7 @@ namespace Erp.Platform.Migrations .HasPrecision(18, 2) .HasColumnType("decimal(18,2)"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12498,13 +12577,16 @@ namespace Erp.Platform.Migrations b.HasIndex("QuotationId"); + b.HasIndex("UomId"); + b.ToTable("Scp_T_QuotationItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -12561,8 +12643,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ReferenceType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13056,8 +13139,9 @@ namespace Erp.Platform.Migrations b.Property("RequestNumber") .HasColumnType("nvarchar(max)"); - b.Property("RequestTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("RequestTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("RequiredDate") .HasColumnType("datetime2"); @@ -13150,7 +13234,7 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13161,13 +13245,16 @@ namespace Erp.Platform.Migrations b.HasIndex("RequestId"); + b.HasIndex("UomId"); + b.ToTable("Scp_T_RequestItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.RequestType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13306,8 +13393,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Risk", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13459,8 +13547,9 @@ namespace Erp.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DeliveryTermId") - .HasColumnType("uniqueidentifier"); + b.Property("DeliveryTermId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("DiscountAmount") .ValueGeneratedOnAdd() @@ -13506,14 +13595,15 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .IsRequired() + .HasColumnType("nvarchar(450)"); b.Property("RequestedDeliveryDate") .HasColumnType("datetime2"); - b.Property("SalesOrderStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("SalesOrderStatusId") + .HasColumnType("nvarchar(50)"); b.Property("SpecialInstructions") .HasMaxLength(1000) @@ -13670,7 +13760,7 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13681,13 +13771,16 @@ namespace Erp.Platform.Migrations b.HasIndex("SalesOrderId"); + b.HasIndex("UomId"); + b.ToTable("Crm_T_SalesOrderItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SalesOrderStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13980,8 +14073,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Sector", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14766,8 +14860,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Status", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14824,8 +14919,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SupplyCardType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14882,8 +14978,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SupplyType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15251,8 +15348,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.TaskType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15477,8 +15575,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Type", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15535,8 +15634,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Uom", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15571,6 +15671,9 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MaterialId") + .HasColumnType("uniqueidentifier"); + b.Property("Name") .IsRequired() .HasMaxLength(64) @@ -15593,11 +15696,14 @@ namespace Erp.Platform.Migrations .HasMaxLength(32) .HasColumnType("nvarchar(32)"); - b.Property("UomCategoryId") - .HasColumnType("uniqueidentifier"); + b.Property("UomCategoryId") + .IsRequired() + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); + b.HasIndex("MaterialId"); + b.HasIndex("UomCategoryId"); b.ToTable("Adm_T_Uom", (string)null); @@ -15605,8 +15711,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.UomCategory", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15886,8 +15993,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Capacity") .ValueGeneratedOnAdd() @@ -15985,8 +16093,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("WarehouseTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -15999,8 +16108,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WarehouseType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -16177,11 +16287,13 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("WaybillStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("WaybillStatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("WaybillTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WaybillTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -16288,7 +16400,7 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Uom") + b.Property("UomId") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16299,6 +16411,8 @@ namespace Erp.Platform.Migrations b.HasIndex("MaterialId"); + b.HasIndex("UomId"); + b.HasIndex("WaybillId"); b.ToTable("Acc_B_WaybillItem", (string)null); @@ -16306,8 +16420,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WaybillStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16364,8 +16479,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WaybillType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16500,8 +16616,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16558,8 +16675,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("Capacity") .ValueGeneratedOnAdd() @@ -16664,11 +16782,12 @@ namespace Erp.Platform.Migrations b.Property("WarrantyExpiry") .HasColumnType("datetime2"); - b.Property("WorkcenterStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterStatusId") + .HasColumnType("nvarchar(50)"); - b.Property("WorkcenterTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -16735,16 +16854,18 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .HasColumnType("nvarchar(100)"); b.HasKey("Id"); + b.HasIndex("UomId"); + b.HasIndex("WorkcenterId"); b.ToTable("Mnt_T_WorkcenterSpecification", (string)null); @@ -16752,8 +16873,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkcenterStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16810,8 +16932,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkcenterType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16960,18 +17083,21 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("WorkorderNumber") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("WorkorderStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkorderStatusId") + .HasColumnType("nvarchar(50)"); - b.Property("WorkorderTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkorderTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -17119,8 +17245,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkorderStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -17177,8 +17304,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkorderType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .HasColumnType("nvarchar(max)"); @@ -17238,8 +17366,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Zone", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -17306,11 +17435,13 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("ZoneTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("ZoneTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -17323,8 +17454,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ZoneType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -18143,21 +18275,6 @@ namespace Erp.Platform.Migrations b.ToTable("Sqm_T_SqlView", (string)null); }); - modelBuilder.Entity("MaterialUom", b => - { - b.Property("AlternativeUomsId") - .HasColumnType("uniqueidentifier"); - - b.Property("MaterialsId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("AlternativeUomsId", "MaterialsId"); - - b.HasIndex("MaterialsId"); - - b.ToTable("MaterialUom"); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") @@ -20059,9 +20176,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Approval", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() + .WithMany("Approvals") .HasForeignKey("DepartmentId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.MaterialType", "MaterialType") @@ -20153,11 +20270,19 @@ namespace Erp.Platform.Migrations .WithMany() .HasForeignKey("OperationId"); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("BomComponents") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Bom"); b.Navigation("Material"); b.Navigation("Operation"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.BomOperation", b => @@ -20175,8 +20300,9 @@ namespace Erp.Platform.Migrations .IsRequired(); b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") - .WithMany() - .HasForeignKey("WorkcenterId"); + .WithMany("BomOperations") + .HasForeignKey("WorkcenterId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Bom"); @@ -20330,16 +20456,18 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CostCenter", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() - .HasForeignKey("DepartmentId"); + .WithMany("CostCenters") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.CostCenter", "ParentCostCenter") .WithMany("SubCostCenters") .HasForeignKey("ParentCostCenterId"); b.HasOne("Erp.Platform.Entities.Employee", "ResponsibleEmployee") - .WithMany() - .HasForeignKey("ResponsibleEmployeeId"); + .WithMany("CostCenters") + .HasForeignKey("ResponsibleEmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Department"); @@ -20448,8 +20576,9 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() - .HasForeignKey("DepartmentId"); + .WithMany("Employees") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.EmploymentType", "EmploymentType") .WithMany() @@ -20485,9 +20614,9 @@ namespace Erp.Platform.Migrations .IsRequired(); b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("Events") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.EventType", "Type") @@ -20554,15 +20683,26 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Erp.Platform.Entities.Workcenter", "WorkCenter") - .WithMany() + b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") + .WithMany("Faults") .HasForeignKey("WorkcenterId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("FaultType"); - b.Navigation("WorkCenter"); + b.Navigation("Workcenter"); + }); + + modelBuilder.Entity("Erp.Platform.Entities.Inventory", b => + { + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("Inventories") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.Invoice", b => @@ -20581,8 +20721,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.PaymentStatus", "PaymentStatus") .WithMany("Invoices") .HasForeignKey("PaymentStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.InvoiceStatus", "Status") .WithMany("Invoices") @@ -20613,16 +20752,25 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("InvoiceItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Invoice"); b.Navigation("Material"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.JobPosition", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() - .HasForeignKey("DepartmentId"); + .WithMany("JobPositions") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Department"); }); @@ -20713,6 +20861,11 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("Locations") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse") .WithMany("Locations") .HasForeignKey("WarehouseId") @@ -20727,6 +20880,8 @@ namespace Erp.Platform.Migrations b.Navigation("LocationType"); + b.Navigation("Uom"); + b.Navigation("Warehouse"); b.Navigation("Zone"); @@ -20744,9 +20899,16 @@ namespace Erp.Platform.Migrations .HasForeignKey("MaterialTypeId") .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("Materials") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); + b.Navigation("MaterialGroup"); b.Navigation("MaterialType"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.MaterialGroup", b => @@ -20767,15 +20929,14 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("Erp.Platform.Entities.Uom", "Unit") + b.HasOne("Erp.Platform.Entities.Uom", "Uom") .WithMany("MaterialSpecifications") - .HasForeignKey("UnitId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Material"); - b.Navigation("Unit"); + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.Meal", b => @@ -20826,6 +20987,12 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("MovementItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse") .WithMany("MovementItems") .HasForeignKey("WarehouseId") @@ -20844,6 +21011,8 @@ namespace Erp.Platform.Migrations b.Navigation("Movement"); + b.Navigation("Uom"); + b.Navigation("Warehouse"); b.Navigation("Zone"); @@ -20860,7 +21029,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") .WithMany("Operations") .HasForeignKey("WorkcenterId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("OperationType"); @@ -20883,7 +21052,8 @@ namespace Erp.Platform.Migrations { b.HasOne("Erp.Platform.Entities.Employee", "Employee") .WithMany("Opportunities") - .HasForeignKey("EmployeeId"); + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.LossReason", "LossReason") .WithMany("Opportunities") @@ -20952,9 +21122,9 @@ namespace Erp.Platform.Migrations .IsRequired(); b.HasOne("Erp.Platform.Entities.Sector", "Sector") - .WithMany() + .WithMany("Partners") .HasForeignKey("SectorId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.SupplyType", "SupplierType") @@ -21090,9 +21260,16 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("ProductionOrders") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); + b.Navigation("OrderType"); b.Navigation("Status"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderItem", b => @@ -21115,11 +21292,19 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("ProductionOrderItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("ProductionOrder"); b.Navigation("SalesOrder"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.ProductionWorkorder", b => @@ -21257,9 +21442,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ProjectTask", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("ProjectTasks") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.ProjectPhase", "Phase") @@ -21298,9 +21483,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ProjectTaskDaily", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("ProjectTaskDailies") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.Status", "Status") @@ -21333,9 +21518,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ProjectTeam", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("ProjectTeams") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.Employee", "Manager") @@ -21402,9 +21587,17 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("PurchaseOrderItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("PurchaseOrder"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b => @@ -21508,9 +21701,17 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("QuotationItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("Quotation"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.RegistrationMethod", b => @@ -21582,9 +21783,9 @@ namespace Erp.Platform.Migrations .IsRequired(); b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("Requests") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.RequestType", "RequestType") @@ -21614,9 +21815,17 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("RequestItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("Request"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.Reservation", b => @@ -21675,9 +21884,17 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("SalesOrderItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("SalesOrder"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.Schedule", b => @@ -21726,8 +21943,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SocialComment", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() - .HasForeignKey("EmployeeId"); + .WithMany("SocialComments") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.SocialPost", "SocialPost") .WithMany("Comments") @@ -21743,8 +21961,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SocialLike", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() - .HasForeignKey("EmployeeId"); + .WithMany("SocialLikes") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.SocialPost", "SocialPost") .WithMany("Likes") @@ -21793,8 +22012,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SocialPost", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() - .HasForeignKey("EmployeeId"); + .WithMany("SocialPosts") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Employee"); }); @@ -21860,6 +22080,10 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Uom", b => { + b.HasOne("Erp.Platform.Entities.Material", null) + .WithMany("AlternativeUoms") + .HasForeignKey("MaterialId"); + b.HasOne("Erp.Platform.Entities.UomCategory", "UomCategory") .WithMany("Uoms") .HasForeignKey("UomCategoryId") @@ -21932,6 +22156,11 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("WaybillItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Erp.Platform.Entities.Waybill", "Waybill") .WithMany("Items") .HasForeignKey("WaybillId") @@ -21940,15 +22169,17 @@ namespace Erp.Platform.Migrations b.Navigation("Material"); + b.Navigation("Uom"); + b.Navigation("Waybill"); }); modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() + .WithMany("Workcenters") .HasForeignKey("DepartmentId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.WorkcenterStatus", null) @@ -21968,11 +22199,18 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkcenterSpecification", b => { + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("WorkcenterSpecifications") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") .WithMany("Specifications") .HasForeignKey("WorkcenterId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Uom"); b.Navigation("Workcenter"); }); @@ -21980,9 +22218,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Workorder", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("Workorders") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.PlanWizard", "PlanWizard") @@ -21992,7 +22230,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") .WithMany("Workorders") .HasForeignKey("WorkcenterId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.WorkorderStatus", null) @@ -22002,7 +22240,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.WorkorderType", "WorkorderType") .WithMany("Workorders") .HasForeignKey("WorkorderTypeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Employee"); @@ -22017,9 +22255,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkorderActivity", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("WorkorderActivities") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.Workorder", "Workorder") @@ -22100,21 +22338,6 @@ namespace Erp.Platform.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("MaterialUom", b => - { - b.HasOne("Erp.Platform.Entities.Uom", null) - .WithMany() - .HasForeignKey("AlternativeUomsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Erp.Platform.Entities.Material", null) - .WithMany() - .HasForeignKey("MaterialsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) @@ -22399,9 +22622,19 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Department", b => { + b.Navigation("Approvals"); + + b.Navigation("CostCenters"); + + b.Navigation("Employees"); + + b.Navigation("JobPositions"); + b.Navigation("Performans360s"); b.Navigation("SubDepartments"); + + b.Navigation("Workcenters"); }); modelBuilder.Entity("Erp.Platform.Entities.Employee", b => @@ -22412,6 +22645,10 @@ namespace Erp.Platform.Migrations b.Navigation("Certificates"); + b.Navigation("CostCenters"); + + b.Navigation("Events"); + b.Navigation("ExpenseRequests"); b.Navigation("Leaves"); @@ -22422,15 +22659,33 @@ namespace Erp.Platform.Migrations b.Navigation("Partners"); + b.Navigation("ProjectTaskDailies"); + + b.Navigation("ProjectTasks"); + + b.Navigation("ProjectTeams"); + b.Navigation("Quotations"); + b.Navigation("Requests"); + b.Navigation("Reservations"); + b.Navigation("SocialComments"); + + b.Navigation("SocialLikes"); + + b.Navigation("SocialPosts"); + b.Navigation("SurveyResponses"); b.Navigation("Visitors"); b.Navigation("Warehouses"); + + b.Navigation("WorkorderActivities"); + + b.Navigation("Workorders"); }); modelBuilder.Entity("Erp.Platform.Entities.Event", b => @@ -22492,6 +22747,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Material", b => { + b.Navigation("AlternativeUoms"); + b.Navigation("BomComponents"); b.Navigation("Boms"); @@ -22736,6 +22993,11 @@ namespace Erp.Platform.Migrations b.Navigation("Lessons"); }); + modelBuilder.Entity("Erp.Platform.Entities.Sector", b => + { + b.Navigation("Partners"); + }); + modelBuilder.Entity("Erp.Platform.Entities.SkillType", b => { b.Navigation("Levels"); @@ -22822,7 +23084,35 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Uom", b => { + b.Navigation("BomComponents"); + + b.Navigation("Inventories"); + + b.Navigation("InvoiceItems"); + + b.Navigation("Locations"); + b.Navigation("MaterialSpecifications"); + + b.Navigation("Materials"); + + b.Navigation("MovementItems"); + + b.Navigation("ProductionOrderItems"); + + b.Navigation("ProductionOrders"); + + b.Navigation("PurchaseOrderItems"); + + b.Navigation("QuotationItems"); + + b.Navigation("RequestItems"); + + b.Navigation("SalesOrderItems"); + + b.Navigation("WaybillItems"); + + b.Navigation("WorkcenterSpecifications"); }); modelBuilder.Entity("Erp.Platform.Entities.UomCategory", b => @@ -22861,6 +23151,10 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { + b.Navigation("BomOperations"); + + b.Navigation("Faults"); + b.Navigation("Operations"); b.Navigation("PlanWizards"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251210125522_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.cs similarity index 96% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251210125522_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.cs index 07708348..fff68e7f 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251210125522_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.cs @@ -494,7 +494,7 @@ namespace Erp.Platform.Migrations name: "Acc_T_CheckStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -516,7 +516,7 @@ namespace Erp.Platform.Migrations name: "Acc_T_CheckType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -538,7 +538,7 @@ namespace Erp.Platform.Migrations name: "Acc_T_InvoiceStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -560,7 +560,7 @@ namespace Erp.Platform.Migrations name: "Acc_T_InvoiceType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -582,7 +582,7 @@ namespace Erp.Platform.Migrations name: "Acc_T_PaymentStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -604,7 +604,7 @@ namespace Erp.Platform.Migrations name: "Acc_T_WaybillStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -626,7 +626,7 @@ namespace Erp.Platform.Migrations name: "Acc_T_WaybillType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -925,7 +925,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_PaymentMethod", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(450)", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false), @@ -1042,7 +1042,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_UomCategory", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(128)", maxLength: 128, 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), @@ -1262,7 +1262,7 @@ namespace Erp.Platform.Migrations name: "Crm_T_CustomerSegment", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1284,7 +1284,7 @@ namespace Erp.Platform.Migrations name: "Crm_T_CustomerType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1330,7 +1330,7 @@ namespace Erp.Platform.Migrations name: "Crm_T_SalesOrderStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1482,7 +1482,7 @@ namespace Erp.Platform.Migrations name: "Mnt_T_FaultStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1504,7 +1504,7 @@ namespace Erp.Platform.Migrations name: "Mnt_T_FaultType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1526,7 +1526,7 @@ namespace Erp.Platform.Migrations name: "Mnt_T_WorkcenterStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1548,7 +1548,7 @@ namespace Erp.Platform.Migrations name: "Mnt_T_WorkcenterType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1570,7 +1570,7 @@ namespace Erp.Platform.Migrations name: "Mnt_T_WorkorderStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1592,7 +1592,7 @@ namespace Erp.Platform.Migrations name: "Mnt_T_WorkorderType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(max)", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), @@ -1615,7 +1615,7 @@ namespace Erp.Platform.Migrations name: "Mrp_T_BomType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1659,7 +1659,7 @@ namespace Erp.Platform.Migrations name: "Mrp_T_ProductionOrderStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -1681,7 +1681,7 @@ namespace Erp.Platform.Migrations name: "Mrp_T_ProductionOrderType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -2050,7 +2050,7 @@ namespace Erp.Platform.Migrations name: "Prj_T_Category", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -2072,7 +2072,7 @@ namespace Erp.Platform.Migrations name: "Prj_T_Risk", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -2094,7 +2094,7 @@ namespace Erp.Platform.Migrations name: "Prj_T_Status", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -2116,7 +2116,7 @@ namespace Erp.Platform.Migrations name: "Prj_T_TaskType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -2138,7 +2138,7 @@ namespace Erp.Platform.Migrations name: "Prj_T_Type", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -2160,7 +2160,7 @@ namespace Erp.Platform.Migrations name: "Prj_T_WorkType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -2350,7 +2350,7 @@ namespace Erp.Platform.Migrations name: "Sas_H_CountryGroup", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(450)", nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), @@ -2370,8 +2370,7 @@ namespace Erp.Platform.Migrations name: "Sas_H_Currency", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Symbol = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Rate = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), @@ -2845,7 +2844,7 @@ namespace Erp.Platform.Migrations name: "Sas_T_Sector", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(128)", maxLength: 128, 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), @@ -2865,7 +2864,7 @@ namespace Erp.Platform.Migrations name: "Scp_T_DeliveryTerm", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -2940,7 +2939,7 @@ namespace Erp.Platform.Migrations name: "Scp_T_OrderStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -2962,7 +2961,7 @@ namespace Erp.Platform.Migrations name: "Scp_T_PaymentTerm", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(450)", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), @@ -2984,7 +2983,7 @@ namespace Erp.Platform.Migrations name: "Scp_T_QuotationStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -3006,7 +3005,7 @@ namespace Erp.Platform.Migrations name: "Scp_T_RequestType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -3028,7 +3027,7 @@ namespace Erp.Platform.Migrations name: "Scp_T_SupplyCardType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -3050,7 +3049,7 @@ namespace Erp.Platform.Migrations name: "Scp_T_SupplyType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -3191,43 +3190,11 @@ namespace Erp.Platform.Migrations table.PrimaryKey("PK_Sqm_T_SqlView", x => x.Id); }); - migrationBuilder.CreateTable( - name: "Str_T_Inventory", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - MaterialId = table.Column(type: "uniqueidentifier", nullable: false), - WarehouseId = table.Column(type: "uniqueidentifier", nullable: false), - ZoneId = table.Column(type: "uniqueidentifier", nullable: false), - LocationId = table.Column(type: "uniqueidentifier", nullable: false), - Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - ReservedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - AvailableQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LotNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - SerialNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - ExpiryDate = table.Column(type: "datetime2", nullable: true), - ReceivedDate = table.Column(type: "datetime2", nullable: false), - LastMovementDate = table.Column(type: "datetime2", 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_Str_T_Inventory", x => x.Id); - }); - migrationBuilder.CreateTable( name: "Str_T_LocationType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), @@ -3250,7 +3217,7 @@ namespace Erp.Platform.Migrations name: "Str_T_MovementType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -3280,11 +3247,11 @@ namespace Erp.Platform.Migrations Priority = table.Column(type: "int", nullable: false, defaultValue: 1), Strategy = table.Column(type: "nvarchar(max)", nullable: false), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - WarehouseId = table.Column(type: "uniqueidentifier", nullable: false), MaterialTypeId = table.Column(type: "uniqueidentifier", nullable: true), MaterialGroupId = table.Column(type: "uniqueidentifier", nullable: true), - TargetZoneId = table.Column(type: "uniqueidentifier", nullable: true), - TargetLocationId = table.Column(type: "uniqueidentifier", nullable: true), + WarehouseId = table.Column(type: "nvarchar(max)", nullable: false), + TargetZoneId = table.Column(type: "nvarchar(max)", nullable: true), + TargetLocationId = table.Column(type: "nvarchar(max)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -3302,7 +3269,7 @@ namespace Erp.Platform.Migrations name: "Str_T_ReferenceType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), MovementTypeName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), @@ -3325,7 +3292,7 @@ namespace Erp.Platform.Migrations name: "Str_T_WarehouseType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), @@ -3348,7 +3315,7 @@ namespace Erp.Platform.Migrations name: "Str_T_ZoneType", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), @@ -3716,37 +3683,6 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "Adm_T_Uom", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - UomCategoryId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Type = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - Ratio = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - Rounding = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, 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_Uom", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_Uom_Adm_T_UomCategory_UomCategoryId", - column: x => x.UomCategoryId, - principalTable: "Adm_T_UomCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "Crd_T_ClassroomAttandance", columns: table => new @@ -3982,54 +3918,6 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Restrict); }); - migrationBuilder.CreateTable( - name: "Mrp_T_ProductionOrder", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - OrderNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - OrderTypeId = table.Column(type: "uniqueidentifier", nullable: false), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), - Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - PlannedStartDate = table.Column(type: "datetime2", nullable: false), - PlannedEndDate = table.Column(type: "datetime2", nullable: false), - ActualStartDate = table.Column(type: "datetime2", nullable: true), - ActualEndDate = table.Column(type: "datetime2", nullable: true), - PlannedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - ConfirmedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - RequiredQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - ScrapQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PlannedCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - ActualCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - Currency = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - CustomerRequirement = table.Column(type: "nvarchar(1000)", maxLength: 1000, 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_Mrp_T_ProductionOrder", x => x.Id); - table.ForeignKey( - name: "FK_Mrp_T_ProductionOrder_Mrp_T_ProductionOrderStatus_StatusId", - column: x => x.StatusId, - principalTable: "Mrp_T_ProductionOrderStatus", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Mrp_T_ProductionOrder_Mrp_T_ProductionOrderType_OrderTypeId", - column: x => x.OrderTypeId, - principalTable: "Mrp_T_ProductionOrderType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "OpenIddictAuthorizations", columns: table => new @@ -4163,7 +4051,7 @@ namespace Erp.Platform.Migrations name: "Sas_H_Country", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), Code = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), GroupName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), @@ -4623,50 +4511,6 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "Scp_T_Material", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Barcode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - MaterialTypeId = table.Column(type: "uniqueidentifier", nullable: true), - MaterialGroupId = table.Column(type: "uniqueidentifier", nullable: true), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - CostPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - SalesPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - Currency = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - TotalStock = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - TrackingType = table.Column(type: "nvarchar(50)", maxLength: 50, 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_Scp_T_Material", x => x.Id); - table.ForeignKey( - name: "FK_Scp_T_Material_Scp_T_MaterialGroup_MaterialGroupId", - column: x => x.MaterialGroupId, - principalTable: "Scp_T_MaterialGroup", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Scp_T_Material_Scp_T_MaterialType_MaterialTypeId", - column: x => x.MaterialTypeId, - principalTable: "Scp_T_MaterialType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "Str_T_PutawayCondition", columns: table => new @@ -4848,7 +4692,7 @@ namespace Erp.Platform.Migrations Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Code = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), PlateCode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - CountryId = table.Column(type: "uniqueidentifier", nullable: true), + CountryId = table.Column(type: "nvarchar(8)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -5103,105 +4947,6 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "MaterialUom", - columns: table => new - { - AlternativeUomsId = table.Column(type: "uniqueidentifier", nullable: false), - MaterialsId = table.Column(type: "uniqueidentifier", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_MaterialUom", x => new { x.AlternativeUomsId, x.MaterialsId }); - table.ForeignKey( - name: "FK_MaterialUom_Adm_T_Uom_AlternativeUomsId", - column: x => x.AlternativeUomsId, - principalTable: "Adm_T_Uom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_MaterialUom_Scp_T_Material_MaterialsId", - column: x => x.MaterialsId, - principalTable: "Scp_T_Material", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Mrp_T_Bom", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - MaterialId = table.Column(type: "uniqueidentifier", nullable: false), - BomTypeId = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - Version = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - ValidFrom = table.Column(type: "datetime2", nullable: false), - ValidTo = table.Column(type: "datetime2", nullable: true), - BaseQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 1m), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Mrp_T_Bom", x => x.Id); - table.ForeignKey( - name: "FK_Mrp_T_Bom_Mrp_T_BomType_BomTypeId", - column: x => x.BomTypeId, - principalTable: "Mrp_T_BomType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Mrp_T_Bom_Scp_T_Material_MaterialId", - column: x => x.MaterialId, - principalTable: "Scp_T_Material", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Scp_T_MaterialSpecification", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - MaterialId = table.Column(type: "uniqueidentifier", nullable: false), - SpecificationName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - SpecificationValue = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - UnitId = table.Column(type: "uniqueidentifier", nullable: false), - IsRequired = 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_Scp_T_MaterialSpecification", x => x.Id); - table.ForeignKey( - name: "FK_Scp_T_MaterialSpecification_Adm_T_Uom_UnitId", - column: x => x.UnitId, - principalTable: "Adm_T_Uom", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Scp_T_MaterialSpecification_Scp_T_Material_MaterialId", - column: x => x.MaterialId, - principalTable: "Scp_T_Material", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "Sas_H_District", columns: table => new @@ -5312,8 +5057,8 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), BranchId = table.Column(type: "uniqueidentifier", nullable: true), - TypeId = table.Column(type: "uniqueidentifier", nullable: false), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), + TypeId = table.Column(type: "nvarchar(50)", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", nullable: false), CheckNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), BankName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), BranchName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), @@ -5371,7 +5116,7 @@ namespace Erp.Platform.Migrations Balance = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false, defaultValue: 0m), Currency = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), Risk = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - PaymentTermId = table.Column(type: "uniqueidentifier", nullable: true), + PaymentTermId = table.Column(type: "nvarchar(450)", nullable: true), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), @@ -5398,9 +5143,9 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), BranchId = table.Column(type: "uniqueidentifier", nullable: true), - InvoiceTypeId = table.Column(type: "uniqueidentifier", nullable: false), + InvoiceTypeId = table.Column(type: "nvarchar(50)", nullable: false), CurrentAccountId = table.Column(type: "uniqueidentifier", nullable: true), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", nullable: false), InvoiceNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), InvoiceDate = table.Column(type: "datetime2", nullable: false), DueDate = table.Column(type: "datetime2", nullable: false), @@ -5411,7 +5156,7 @@ namespace Erp.Platform.Migrations PaidAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), RemainingAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Currency = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - PaymentStatusId = table.Column(type: "uniqueidentifier", nullable: false), + PaymentStatusId = table.Column(type: "nvarchar(50)", nullable: true), WaybillId = table.Column(type: "uniqueidentifier", nullable: true), Notes = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), @@ -5458,9 +5203,9 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), BranchId = table.Column(type: "uniqueidentifier", nullable: true), - WaybillTypeId = table.Column(type: "uniqueidentifier", nullable: false), + WaybillTypeId = table.Column(type: "nvarchar(50)", nullable: false), CurrentAccountId = table.Column(type: "uniqueidentifier", nullable: true), - WaybillStatusId = table.Column(type: "uniqueidentifier", nullable: false), + WaybillStatusId = table.Column(type: "nvarchar(50)", nullable: false), WaybillNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), WaybillDate = table.Column(type: "datetime2", nullable: false), DeliveryDate = table.Column(type: "datetime2", nullable: true), @@ -5516,7 +5261,7 @@ namespace Erp.Platform.Migrations TenantId = table.Column(type: "uniqueidentifier", nullable: true), InvoiceId = table.Column(type: "uniqueidentifier", nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), UnitPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), LineTotal = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -5543,12 +5288,6 @@ namespace Erp.Platform.Migrations principalTable: "Acc_B_Invoice", principalColumn: "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Acc_B_InvoiceItem_Scp_T_Material_MaterialId", - column: x => x.MaterialId, - principalTable: "Scp_T_Material", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -5559,7 +5298,7 @@ namespace Erp.Platform.Migrations TenantId = table.Column(type: "uniqueidentifier", nullable: true), WaybillId = table.Column(type: "uniqueidentifier", nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), UnitPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), LineTotal = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -5586,12 +5325,6 @@ namespace Erp.Platform.Migrations principalTable: "Acc_B_Waybill", principalColumn: "Id", onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Acc_B_WaybillItem_Scp_T_Material_MaterialId", - column: x => x.MaterialId, - principalTable: "Scp_T_Material", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -5642,7 +5375,7 @@ namespace Erp.Platform.Migrations Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), PartyType = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - SectorId = table.Column(type: "uniqueidentifier", nullable: false), + SectorId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), TaxNumber = table.Column(type: "bigint", nullable: false), TaxOffice = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), @@ -5658,19 +5391,19 @@ namespace Erp.Platform.Migrations Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Currency = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - PaymentTermId = table.Column(type: "uniqueidentifier", nullable: false), + PaymentTermId = table.Column(type: "nvarchar(450)", nullable: false), CreditLimit = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), LastOrderDate = table.Column(type: "datetime2", nullable: true), Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - CustomerTypeId = table.Column(type: "uniqueidentifier", nullable: true), - CustomerSegmentId = table.Column(type: "uniqueidentifier", nullable: true), + CustomerTypeId = table.Column(type: "nvarchar(50)", nullable: true), + CustomerSegmentId = table.Column(type: "nvarchar(50)", nullable: true), EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), TeamCode = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: true), TotalRevenue = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), AverageOrderValue = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), LifetimeValue = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - SupplierTypeId = table.Column(type: "uniqueidentifier", nullable: true), - SupplyCardTypeId = table.Column(type: "uniqueidentifier", nullable: true), + SupplierTypeId = table.Column(type: "nvarchar(50)", nullable: true), + SupplyCardTypeId = table.Column(type: "nvarchar(50)", nullable: true), CardNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ValidFrom = table.Column(type: "datetime2", nullable: true), ValidTo = table.Column(type: "datetime2", nullable: true), @@ -5706,12 +5439,7 @@ namespace Erp.Platform.Migrations column: x => x.SectorId, principalTable: "Sas_T_Sector", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Adm_T_Partner_Scp_T_Material_MaterialId", - column: x => x.MaterialId, - principalTable: "Scp_T_Material", - principalColumn: "Id"); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Adm_T_Partner_Scp_T_PaymentTerm_PaymentTermId", column: x => x.PaymentTermId, @@ -5852,14 +5580,14 @@ namespace Erp.Platform.Migrations DiscountAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), TotalAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Currency = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - PaymentTermId = table.Column(type: "uniqueidentifier", nullable: false), - DeliveryTermId = table.Column(type: "uniqueidentifier", nullable: false), + PaymentTermId = table.Column(type: "nvarchar(450)", nullable: false), + DeliveryTermId = table.Column(type: "nvarchar(50)", nullable: false), ExchangeRate = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), DiscountRate = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), TaxRate = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), SpecialInstructions = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), Notes = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - SalesOrderStatusId = table.Column(type: "uniqueidentifier", nullable: true), + SalesOrderStatusId = table.Column(type: "nvarchar(50)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -5906,7 +5634,7 @@ namespace Erp.Platform.Migrations MovementDate = table.Column(type: "datetime2", nullable: false), MovementType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), PartnerId = table.Column(type: "uniqueidentifier", nullable: true), - ReferenceTypeId = table.Column(type: "uniqueidentifier", nullable: false), + ReferenceTypeId = table.Column(type: "nvarchar(50)", nullable: false), ReferenceDocument = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), IsTransfer = table.Column(type: "bit", nullable: false), @@ -5935,6 +5663,180 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Adm_T_Uom", + columns: table => new + { + Id = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UomCategoryId = table.Column(type: "nvarchar(128)", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Type = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + Ratio = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + Rounding = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + MaterialId = 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_Uom", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_Uom_Adm_T_UomCategory_UomCategoryId", + column: x => x.UomCategoryId, + principalTable: "Adm_T_UomCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Mrp_T_ProductionOrder", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + OrderNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + OrderTypeId = table.Column(type: "nvarchar(50)", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", nullable: false), + Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + PlannedStartDate = table.Column(type: "datetime2", nullable: false), + PlannedEndDate = table.Column(type: "datetime2", nullable: false), + ActualStartDate = table.Column(type: "datetime2", nullable: true), + ActualEndDate = table.Column(type: "datetime2", nullable: true), + PlannedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + ConfirmedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + RequiredQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + ScrapQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PlannedCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + ActualCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + Currency = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CustomerRequirement = table.Column(type: "nvarchar(1000)", maxLength: 1000, 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_Mrp_T_ProductionOrder", x => x.Id); + table.ForeignKey( + name: "FK_Mrp_T_ProductionOrder_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Mrp_T_ProductionOrder_Mrp_T_ProductionOrderStatus_StatusId", + column: x => x.StatusId, + principalTable: "Mrp_T_ProductionOrderStatus", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Mrp_T_ProductionOrder_Mrp_T_ProductionOrderType_OrderTypeId", + column: x => x.OrderTypeId, + principalTable: "Mrp_T_ProductionOrderType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Scp_T_Material", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Barcode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + MaterialTypeId = table.Column(type: "uniqueidentifier", nullable: true), + MaterialGroupId = table.Column(type: "uniqueidentifier", nullable: true), + UomId = table.Column(type: "nvarchar(64)", nullable: true), + CostPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + SalesPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + Currency = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + TotalStock = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + TrackingType = table.Column(type: "nvarchar(50)", maxLength: 50, 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_Scp_T_Material", x => x.Id); + table.ForeignKey( + name: "FK_Scp_T_Material_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Scp_T_Material_Scp_T_MaterialGroup_MaterialGroupId", + column: x => x.MaterialGroupId, + principalTable: "Scp_T_MaterialGroup", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Scp_T_Material_Scp_T_MaterialType_MaterialTypeId", + column: x => x.MaterialTypeId, + principalTable: "Scp_T_MaterialType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Str_T_Inventory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + MaterialId = table.Column(type: "uniqueidentifier", nullable: false), + WarehouseId = table.Column(type: "nvarchar(max)", nullable: false), + ZoneId = table.Column(type: "nvarchar(max)", nullable: false), + LocationId = table.Column(type: "nvarchar(max)", nullable: false), + Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + ReservedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + AvailableQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + LotNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + SerialNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ExpiryDate = table.Column(type: "datetime2", nullable: true), + ReceivedDate = table.Column(type: "datetime2", nullable: false), + LastMovementDate = table.Column(type: "datetime2", 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_Str_T_Inventory", x => x.Id); + table.ForeignKey( + name: "FK_Str_T_Inventory_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "Crm_T_SalesOrderItem", columns: table => new @@ -5947,7 +5849,7 @@ namespace Erp.Platform.Migrations DeliveredQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), UnitPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), TotalAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), DiscountRate = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), DiscountAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), TaxRate = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -5966,6 +5868,12 @@ namespace Erp.Platform.Migrations constraints: table => { table.PrimaryKey("PK_Crm_T_SalesOrderItem", x => x.Id); + table.ForeignKey( + name: "FK_Crm_T_SalesOrderItem_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Crm_T_SalesOrderItem_Crm_T_SalesOrder_SalesOrderId", column: x => x.SalesOrderId, @@ -5980,6 +5888,45 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Restrict); }); + migrationBuilder.CreateTable( + name: "Mrp_T_Bom", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + MaterialId = table.Column(type: "uniqueidentifier", nullable: false), + BomTypeId = table.Column(type: "nvarchar(50)", nullable: false), + Code = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Version = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + ValidFrom = table.Column(type: "datetime2", nullable: false), + ValidTo = table.Column(type: "datetime2", nullable: true), + BaseQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 1m), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Mrp_T_Bom", x => x.Id); + table.ForeignKey( + name: "FK_Mrp_T_Bom_Mrp_T_BomType_BomTypeId", + column: x => x.BomTypeId, + principalTable: "Mrp_T_BomType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Mrp_T_Bom_Scp_T_Material_MaterialId", + column: x => x.MaterialId, + principalTable: "Scp_T_Material", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "Mrp_T_ProductionOrderItem", columns: table => new @@ -5989,7 +5936,7 @@ namespace Erp.Platform.Migrations ProductionOrderId = table.Column(type: "uniqueidentifier", nullable: false), SalesOrderId = table.Column(type: "uniqueidentifier", nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), PlannedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), ConfirmedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), RequiredQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -6005,6 +5952,12 @@ namespace Erp.Platform.Migrations constraints: table => { table.PrimaryKey("PK_Mrp_T_ProductionOrderItem", x => x.Id); + table.ForeignKey( + name: "FK_Mrp_T_ProductionOrderItem_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Mrp_T_ProductionOrderItem_Crm_T_SalesOrder_SalesOrderId", column: x => x.SalesOrderId, @@ -6025,6 +5978,42 @@ namespace Erp.Platform.Migrations onDelete: ReferentialAction.Restrict); }); + migrationBuilder.CreateTable( + name: "Scp_T_MaterialSpecification", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + MaterialId = table.Column(type: "uniqueidentifier", nullable: false), + SpecificationName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + SpecificationValue = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + UomId = table.Column(type: "nvarchar(64)", nullable: true), + IsRequired = 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_Scp_T_MaterialSpecification", x => x.Id); + table.ForeignKey( + name: "FK_Scp_T_MaterialSpecification_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Scp_T_MaterialSpecification_Scp_T_Material_MaterialId", + column: x => x.MaterialId, + principalTable: "Scp_T_Material", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "Crm_T_Activity", columns: table => new @@ -6235,7 +6224,8 @@ namespace Erp.Platform.Migrations name: "FK_Hr_T_JobPosition_Hr_T_Department_DepartmentId", column: x => x.DepartmentId, principalTable: "Hr_T_Department", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -6281,12 +6271,12 @@ namespace Erp.Platform.Migrations name: "Mnt_T_Workcenter", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - WorkcenterTypeId = table.Column(type: "uniqueidentifier", nullable: false), + WorkcenterTypeId = table.Column(type: "nvarchar(50)", nullable: false), Manufacturer = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), Model = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), SerialNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), @@ -6300,7 +6290,7 @@ namespace Erp.Platform.Migrations CostPerHour = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), SetupTime = table.Column(type: "int", nullable: false, defaultValue: 0), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - WorkcenterStatusId = table.Column(type: "uniqueidentifier", nullable: true), + WorkcenterStatusId = table.Column(type: "nvarchar(50)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -6317,7 +6307,7 @@ namespace Erp.Platform.Migrations column: x => x.DepartmentId, principalTable: "Hr_T_Department", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Mnt_T_Workcenter_Mnt_T_WorkcenterStatus_WorkcenterStatusId", column: x => x.WorkcenterStatusId, @@ -6358,7 +6348,7 @@ namespace Erp.Platform.Migrations column: x => x.DepartmentId, principalTable: "Hr_T_Department", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Scp_T_Approval_Scp_T_MaterialType_MaterialTypeId", column: x => x.MaterialTypeId, @@ -6434,7 +6424,8 @@ namespace Erp.Platform.Migrations name: "FK_Hr_T_Employee_Hr_T_Department_DepartmentId", column: x => x.DepartmentId, principalTable: "Hr_T_Department", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Hr_T_Employee_Hr_T_Employee_ManagerId", column: x => x.ManagerId, @@ -6460,10 +6451,10 @@ namespace Erp.Platform.Migrations TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Title = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "nvarchar(max)", nullable: true), - WorkcenterId = table.Column(type: "uniqueidentifier", maxLength: 50, nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + WorkcenterId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Location = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), - FaultTypeId = table.Column(type: "uniqueidentifier", nullable: false), + FaultTypeId = table.Column(type: "nvarchar(50)", nullable: false), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), Severity = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), EstimatedRepairTime = table.Column(type: "int", nullable: true), @@ -6473,10 +6464,10 @@ namespace Erp.Platform.Migrations AssignedTo = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), ActualRepairTime = table.Column(type: "int", nullable: true), WorkorderId = table.Column(type: "uniqueidentifier", maxLength: 100, nullable: false), - ResolutionNotes = table.Column(type: "nvarchar(max)", nullable: true), + ResolutionNotes = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), ClosedBy = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), ClosedAt = table.Column(type: "datetime2", nullable: true), - FaultStatusId = table.Column(type: "uniqueidentifier", nullable: true), + FaultStatusId = table.Column(type: "nvarchar(50)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -6504,7 +6495,7 @@ namespace Erp.Platform.Migrations column: x => x.WorkcenterId, principalTable: "Mnt_T_Workcenter", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -6514,7 +6505,7 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - WorkcenterId = table.Column(type: "uniqueidentifier", nullable: false), + WorkcenterId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), PlanType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), @@ -6551,10 +6542,10 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - WorkcenterId = table.Column(type: "uniqueidentifier", nullable: false), + WorkcenterId = table.Column(type: "nvarchar(100)", nullable: true), SpecificationName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), SpecificationValue = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), IsRequired = table.Column(type: "bit", nullable: false, defaultValue: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), @@ -6567,12 +6558,18 @@ namespace Erp.Platform.Migrations constraints: table => { table.PrimaryKey("PK_Mnt_T_WorkcenterSpecification", x => x.Id); + table.ForeignKey( + name: "FK_Mnt_T_WorkcenterSpecification_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Mnt_T_WorkcenterSpecification_Mnt_T_Workcenter_WorkcenterId", column: x => x.WorkcenterId, principalTable: "Mnt_T_Workcenter", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -6585,7 +6582,7 @@ namespace Erp.Platform.Migrations Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OperationTypeId = table.Column(type: "uniqueidentifier", nullable: false), - WorkcenterId = table.Column(type: "uniqueidentifier", nullable: false), + WorkcenterId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), StandardTime = table.Column(type: "int", nullable: false, defaultValue: 0), SetupTime = table.Column(type: "int", nullable: false, defaultValue: 0), LaborCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -6610,7 +6607,7 @@ namespace Erp.Platform.Migrations column: x => x.WorkcenterId, principalTable: "Mnt_T_Workcenter", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Mrp_T_Operation_Mrp_T_OperationType_OperationTypeId", column: x => x.OperationTypeId, @@ -6908,7 +6905,7 @@ namespace Erp.Platform.Migrations column: x => x.EmployeeId, principalTable: "Hr_T_Employee", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Net_T_Event_Net_T_EventCategory_CategoryId", column: x => x.CategoryId, @@ -6983,7 +6980,8 @@ namespace Erp.Platform.Migrations name: "FK_Net_T_SocialPost_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, principalTable: "Hr_T_Employee", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -7032,15 +7030,15 @@ namespace Erp.Platform.Migrations QuotationNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), RequestId = table.Column(type: "nvarchar(max)", nullable: true), RequestTitle = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - RequestTypeId = table.Column(type: "uniqueidentifier", nullable: false), + RequestTypeId = table.Column(type: "nvarchar(50)", nullable: false), SupplierId = table.Column(type: "uniqueidentifier", nullable: false), QuotationDate = table.Column(type: "datetime2", nullable: false), ValidUntil = table.Column(type: "datetime2", nullable: false), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", nullable: false), TotalAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), Currency = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - PaymentTermId = table.Column(type: "uniqueidentifier", nullable: false), - DeliveryTermId = table.Column(type: "uniqueidentifier", nullable: false), + PaymentTermId = table.Column(type: "nvarchar(450)", nullable: false), + DeliveryTermId = table.Column(type: "nvarchar(50)", nullable: false), DeliveryTime = table.Column(type: "int", nullable: true, defaultValue: 0), EvaluationScore = table.Column(type: "int", nullable: true, defaultValue: 0), EvaluationComments = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), @@ -7050,7 +7048,7 @@ namespace Erp.Platform.Migrations SubmittedAt = table.Column(type: "datetime2", nullable: true), EmployeeId = table.Column(type: "uniqueidentifier", nullable: true), EvaluatedAt = table.Column(type: "datetime2", nullable: true), - PaymentMethodId = table.Column(type: "uniqueidentifier", nullable: true), + PaymentMethodId = table.Column(type: "nvarchar(450)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -7112,7 +7110,7 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), RequestNumber = table.Column(type: "nvarchar(max)", nullable: true), - RequestTypeId = table.Column(type: "uniqueidentifier", nullable: false), + RequestTypeId = table.Column(type: "nvarchar(50)", nullable: false), DepartmentId = table.Column(type: "uniqueidentifier", nullable: false), EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), RequestDate = table.Column(type: "datetime2", nullable: false), @@ -7142,7 +7140,7 @@ namespace Erp.Platform.Migrations column: x => x.EmployeeId, principalTable: "Hr_T_Employee", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Scp_T_Request_Scp_T_RequestType_RequestTypeId", column: x => x.RequestTypeId, @@ -7155,13 +7153,13 @@ namespace Erp.Platform.Migrations name: "Str_T_Warehouse", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), - WarehouseTypeId = table.Column(type: "uniqueidentifier", nullable: false), + WarehouseTypeId = table.Column(type: "nvarchar(50)", nullable: false), Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), @@ -7262,10 +7260,10 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), WorkorderNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - WorkcenterId = table.Column(type: "uniqueidentifier", nullable: false), + WorkcenterId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), PlanId = table.Column(type: "uniqueidentifier", nullable: true), PlanWizardId = table.Column(type: "uniqueidentifier", nullable: true), - WorkorderTypeId = table.Column(type: "uniqueidentifier", nullable: false), + WorkorderTypeId = table.Column(type: "nvarchar(50)", nullable: false), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Subject = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -7278,7 +7276,7 @@ namespace Erp.Platform.Migrations ActualCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), Notes = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - WorkorderStatusId = table.Column(type: "uniqueidentifier", nullable: true), + WorkorderStatusId = table.Column(type: "nvarchar(50)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -7295,7 +7293,7 @@ namespace Erp.Platform.Migrations column: x => x.EmployeeId, principalTable: "Hr_T_Employee", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Mnt_T_Workorder_Mnt_T_PlanWizard_PlanWizardId", column: x => x.PlanWizardId, @@ -7306,7 +7304,7 @@ namespace Erp.Platform.Migrations column: x => x.WorkcenterId, principalTable: "Mnt_T_Workcenter", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Mnt_T_Workorder_Mnt_T_WorkorderStatus_WorkorderStatusId", column: x => x.WorkorderStatusId, @@ -7317,7 +7315,7 @@ namespace Erp.Platform.Migrations column: x => x.WorkorderTypeId, principalTable: "Mnt_T_WorkorderType", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -7330,7 +7328,7 @@ namespace Erp.Platform.Migrations MaterialId = table.Column(type: "uniqueidentifier", nullable: false), OperationId = table.Column(type: "uniqueidentifier", nullable: true), Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), ScrapPercentage = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), IsPhantom = table.Column(type: "bit", nullable: false, defaultValue: false), Position = table.Column(type: "int", nullable: false, defaultValue: 0), @@ -7348,6 +7346,12 @@ namespace Erp.Platform.Migrations constraints: table => { table.PrimaryKey("PK_Mrp_T_BomComponent", x => x.Id); + table.ForeignKey( + name: "FK_Mrp_T_BomComponent_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Mrp_T_BomComponent_Mrp_T_Bom_BomId", column: x => x.BomId, @@ -7375,7 +7379,7 @@ namespace Erp.Platform.Migrations TenantId = table.Column(type: "uniqueidentifier", nullable: true), BomId = table.Column(type: "uniqueidentifier", nullable: false), OperationId = table.Column(type: "uniqueidentifier", nullable: false), - WorkcenterId = table.Column(type: "uniqueidentifier", nullable: true), + WorkcenterId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), Sequence = table.Column(type: "int", nullable: false), SetupTime = table.Column(type: "int", nullable: false, defaultValue: 0), RunTime = table.Column(type: "int", nullable: false, defaultValue: 0), @@ -7403,7 +7407,8 @@ namespace Erp.Platform.Migrations name: "FK_Mrp_T_BomOperation_Mnt_T_Workcenter_WorkcenterId", column: x => x.WorkcenterId, principalTable: "Mnt_T_Workcenter", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Mrp_T_BomOperation_Mrp_T_Bom_BomId", column: x => x.BomId, @@ -7428,8 +7433,8 @@ namespace Erp.Platform.Migrations ProductionOrderId = table.Column(type: "uniqueidentifier", nullable: false), OperationId = table.Column(type: "uniqueidentifier", nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), - WorkcenterId = table.Column(type: "uniqueidentifier", nullable: false), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), + WorkcenterId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + StatusId = table.Column(type: "nvarchar(50)", nullable: false), Sequence = table.Column(type: "int", nullable: false, defaultValue: 1), PlannedStartDate = table.Column(type: "datetime2", nullable: false), PlannedEndDate = table.Column(type: "datetime2", nullable: false), @@ -7600,7 +7605,8 @@ namespace Erp.Platform.Migrations name: "FK_Net_T_SocialComment_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, principalTable: "Hr_T_Employee", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Net_T_SocialComment_Net_T_SocialPost_SocialPostId", column: x => x.SocialPostId, @@ -7632,7 +7638,8 @@ namespace Erp.Platform.Migrations name: "FK_Net_T_SocialLike_Hr_T_Employee_EmployeeId", column: x => x.EmployeeId, principalTable: "Hr_T_Employee", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Net_T_SocialLike_Net_T_SocialPost_SocialPostId", column: x => x.SocialPostId, @@ -7713,7 +7720,7 @@ namespace Erp.Platform.Migrations QuotationId = table.Column(type: "uniqueidentifier", nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UnitPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), TotalPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), LeadTime = table.Column(type: "int", nullable: true, defaultValue: 0), @@ -7729,6 +7736,12 @@ namespace Erp.Platform.Migrations constraints: table => { table.PrimaryKey("PK_Scp_T_QuotationItem", x => x.Id); + table.ForeignKey( + name: "FK_Scp_T_QuotationItem_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Scp_T_QuotationItem_Scp_T_Material_MaterialId", column: x => x.MaterialId, @@ -7753,7 +7766,7 @@ namespace Erp.Platform.Migrations SupplierId = table.Column(type: "uniqueidentifier", nullable: false), OrderDate = table.Column(type: "datetime2", nullable: false), DeliveryDate = table.Column(type: "datetime2", nullable: true), - PaymentTermId = table.Column(type: "uniqueidentifier", nullable: false), + PaymentTermId = table.Column(type: "nvarchar(450)", nullable: false), Terms = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), Notes = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), RequestId = table.Column(type: "uniqueidentifier", nullable: true), @@ -7810,7 +7823,7 @@ namespace Erp.Platform.Migrations RequestId = table.Column(type: "uniqueidentifier", nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), EstimatedPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Specification = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), Justification = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -7826,6 +7839,12 @@ namespace Erp.Platform.Migrations constraints: table => { table.PrimaryKey("PK_Scp_T_RequestItem", x => x.Id); + table.ForeignKey( + name: "FK_Scp_T_RequestItem_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Scp_T_RequestItem_Scp_T_Material_MaterialId", column: x => x.MaterialId, @@ -7844,10 +7863,10 @@ namespace Erp.Platform.Migrations name: "Str_T_Zone", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - WarehouseId = table.Column(type: "uniqueidentifier", nullable: false), - ZoneTypeId = table.Column(type: "uniqueidentifier", nullable: false), + WarehouseId = table.Column(type: "nvarchar(50)", nullable: false), + ZoneTypeId = table.Column(type: "nvarchar(50)", nullable: false), Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -7905,7 +7924,7 @@ namespace Erp.Platform.Migrations column: x => x.EmployeeId, principalTable: "Hr_T_Employee", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Mnt_T_WorkorderActivity_Mnt_T_Workorder_WorkorderId", column: x => x.WorkorderId, @@ -7988,7 +8007,7 @@ namespace Erp.Platform.Migrations MaterialId = table.Column(type: "uniqueidentifier", nullable: false), UnitPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TotalPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), ReceivedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), DeliveredQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -8005,6 +8024,12 @@ namespace Erp.Platform.Migrations constraints: table => { table.PrimaryKey("PK_Scp_T_PurchaseOrderItem", x => x.Id); + table.ForeignKey( + name: "FK_Scp_T_PurchaseOrderItem_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Scp_T_PurchaseOrderItem_Scp_T_Material_MaterialId", column: x => x.MaterialId, @@ -8023,18 +8048,18 @@ namespace Erp.Platform.Migrations name: "Str_T_Location", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - WarehouseId = table.Column(type: "uniqueidentifier", nullable: false), - ZoneId = table.Column(type: "uniqueidentifier", nullable: false), - LocationTypeId = table.Column(type: "uniqueidentifier", nullable: false), + WarehouseId = table.Column(type: "nvarchar(50)", nullable: false), + ZoneId = table.Column(type: "nvarchar(50)", nullable: false), + LocationTypeId = table.Column(type: "nvarchar(50)", nullable: false), Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), Capacity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), CurrentStock = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Kind = table.Column(type: "int", nullable: false), - Uom = table.Column(type: "nvarchar(max)", nullable: true), + UomId = table.Column(type: "nvarchar(64)", nullable: true), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), @@ -8047,6 +8072,12 @@ namespace Erp.Platform.Migrations constraints: table => { table.PrimaryKey("PK_Str_T_Location", x => x.Id); + table.ForeignKey( + name: "FK_Str_T_Location_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Str_T_Location_Str_T_LocationType_LocationTypeId", column: x => x.LocationTypeId, @@ -8074,12 +8105,12 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), MovementId = table.Column(type: "uniqueidentifier", nullable: false), - WarehouseId = table.Column(type: "uniqueidentifier", nullable: false), - ZoneId = table.Column(type: "uniqueidentifier", nullable: false), - LocationId = table.Column(type: "uniqueidentifier", nullable: false), + WarehouseId = table.Column(type: "nvarchar(50)", nullable: false), + ZoneId = table.Column(type: "nvarchar(50)", nullable: false), + LocationId = table.Column(type: "nvarchar(50)", nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), LotNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), @@ -8093,6 +8124,12 @@ namespace Erp.Platform.Migrations constraints: table => { table.PrimaryKey("PK_Str_T_MovementItem", x => x.Id); + table.ForeignKey( + name: "FK_Str_T_MovementItem_Adm_T_Uom_UomId", + column: x => x.UomId, + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Str_T_MovementItem_Scp_T_Material_MaterialId", column: x => x.MaterialId, @@ -8132,7 +8169,7 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), ProjectId = table.Column(type: "uniqueidentifier", nullable: false), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), + CategoryId = table.Column(type: "nvarchar(50)", nullable: false), Code = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -8145,9 +8182,9 @@ namespace Erp.Platform.Migrations ActualCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Progress = table.Column(type: "int", nullable: false, defaultValue: 0), Risks = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", nullable: false), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - RiskId = table.Column(type: "uniqueidentifier", nullable: true), + RiskId = table.Column(type: "nvarchar(50)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -8187,8 +8224,8 @@ namespace Erp.Platform.Migrations Code = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - ProjectTypeId = table.Column(type: "uniqueidentifier", nullable: false), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), + ProjectTypeId = table.Column(type: "nvarchar(50)", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", nullable: false), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), ManagerId = table.Column(type: "uniqueidentifier", nullable: true), StartDate = table.Column(type: "datetime2", nullable: false), @@ -8202,7 +8239,7 @@ namespace Erp.Platform.Migrations Progress = table.Column(type: "int", nullable: false, defaultValue: 0), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), ProjectPhaseId = table.Column(type: "uniqueidentifier", nullable: true), - TaskTypeId = table.Column(type: "uniqueidentifier", nullable: true), + TaskTypeId = table.Column(type: "nvarchar(50)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -8255,7 +8292,7 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), ProjectId = table.Column(type: "uniqueidentifier", nullable: false), - RiskId = table.Column(type: "uniqueidentifier", nullable: false), + RiskId = table.Column(type: "nvarchar(50)", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -8291,9 +8328,9 @@ namespace Erp.Platform.Migrations PhaseId = table.Column(type: "uniqueidentifier", nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - TaskTypeId = table.Column(type: "uniqueidentifier", nullable: true), + TaskTypeId = table.Column(type: "nvarchar(50)", nullable: true), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", nullable: false), EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), StartDate = table.Column(type: "datetime2", nullable: false), EndDate = table.Column(type: "datetime2", nullable: false), @@ -8315,7 +8352,7 @@ namespace Erp.Platform.Migrations column: x => x.EmployeeId, principalTable: "Hr_T_Employee", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Prj_T_ProjectTask_Prj_T_ProjectPhase_PhaseId", column: x => x.PhaseId, @@ -8366,7 +8403,7 @@ namespace Erp.Platform.Migrations column: x => x.EmployeeId, principalTable: "Hr_T_Employee", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Prj_T_ProjectTeam_Hr_T_Employee_ManagerId", column: x => x.ManagerId, @@ -8389,10 +8426,10 @@ namespace Erp.Platform.Migrations EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), TaskId = table.Column(type: "uniqueidentifier", nullable: false), Date = table.Column(type: "datetime2", nullable: false), - WorkedTypeId = table.Column(type: "uniqueidentifier", nullable: false), + WorkedTypeId = table.Column(type: "nvarchar(50)", nullable: false), HoursWorked = table.Column(type: "int", nullable: false, defaultValue: 0), Progress = table.Column(type: "int", nullable: false, defaultValue: 0), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), Challenges = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), NextSteps = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -8412,7 +8449,7 @@ namespace Erp.Platform.Migrations column: x => x.EmployeeId, principalTable: "Hr_T_Employee", principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_Prj_T_ProjectTaskDaily_Prj_T_ProjectTask_TaskId", column: x => x.TaskId, @@ -8711,6 +8748,11 @@ namespace Erp.Platform.Migrations table: "Acc_B_InvoiceItem", column: "MaterialId"); + migrationBuilder.CreateIndex( + name: "IX_Acc_B_InvoiceItem_UomId", + table: "Acc_B_InvoiceItem", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Acc_B_Waybill_CurrentAccountId", table: "Acc_B_Waybill", @@ -8731,6 +8773,11 @@ namespace Erp.Platform.Migrations table: "Acc_B_WaybillItem", column: "MaterialId"); + migrationBuilder.CreateIndex( + name: "IX_Acc_B_WaybillItem_UomId", + table: "Acc_B_WaybillItem", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Acc_B_WaybillItem_WaybillId", table: "Acc_B_WaybillItem", @@ -8836,6 +8883,11 @@ namespace Erp.Platform.Migrations table: "Adm_T_SkillLevel", column: "SkillTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Uom_MaterialId", + table: "Adm_T_Uom", + column: "MaterialId"); + migrationBuilder.CreateIndex( name: "IX_Adm_T_Uom_UomCategoryId", table: "Adm_T_Uom", @@ -9023,6 +9075,11 @@ namespace Erp.Platform.Migrations table: "Crm_T_SalesOrderItem", column: "SalesOrderId"); + migrationBuilder.CreateIndex( + name: "IX_Crm_T_SalesOrderItem_UomId", + table: "Crm_T_SalesOrderItem", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Hr_T_CostCenter_DepartmentId", table: "Hr_T_CostCenter", @@ -9153,11 +9210,6 @@ namespace Erp.Platform.Migrations table: "Hr_T_SurveyResponse", column: "SurveyId"); - migrationBuilder.CreateIndex( - name: "IX_MaterialUom_MaterialsId", - table: "MaterialUom", - column: "MaterialsId"); - migrationBuilder.CreateIndex( name: "IX_Mnt_T_Fault_FaultStatusId", table: "Mnt_T_Fault", @@ -9203,6 +9255,11 @@ namespace Erp.Platform.Migrations table: "Mnt_T_Workcenter", column: "WorkcenterTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_WorkcenterSpecification_UomId", + table: "Mnt_T_WorkcenterSpecification", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Mnt_T_WorkcenterSpecification_WorkcenterId", table: "Mnt_T_WorkcenterSpecification", @@ -9278,6 +9335,11 @@ namespace Erp.Platform.Migrations table: "Mrp_T_BomComponent", column: "OperationId"); + migrationBuilder.CreateIndex( + name: "IX_Mrp_T_BomComponent_UomId", + table: "Mrp_T_BomComponent", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Mrp_T_BomOperation_BomId", table: "Mrp_T_BomOperation", @@ -9318,6 +9380,11 @@ namespace Erp.Platform.Migrations table: "Mrp_T_ProductionOrder", column: "StatusId"); + migrationBuilder.CreateIndex( + name: "IX_Mrp_T_ProductionOrder_UomId", + table: "Mrp_T_ProductionOrder", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Mrp_T_ProductionOrderItem_MaterialId", table: "Mrp_T_ProductionOrderItem", @@ -9333,6 +9400,11 @@ namespace Erp.Platform.Migrations table: "Mrp_T_ProductionOrderItem", column: "SalesOrderId"); + migrationBuilder.CreateIndex( + name: "IX_Mrp_T_ProductionOrderItem_UomId", + table: "Mrp_T_ProductionOrderItem", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Mrp_T_ProductionWorkorder_MaterialId", table: "Mrp_T_ProductionWorkorder", @@ -9799,6 +9871,11 @@ namespace Erp.Platform.Migrations table: "Scp_T_Material", column: "MaterialTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Scp_T_Material_UomId", + table: "Scp_T_Material", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Scp_T_MaterialGroup_ParentGroupId", table: "Scp_T_MaterialGroup", @@ -9810,9 +9887,9 @@ namespace Erp.Platform.Migrations column: "MaterialId"); migrationBuilder.CreateIndex( - name: "IX_Scp_T_MaterialSpecification_UnitId", + name: "IX_Scp_T_MaterialSpecification_UomId", table: "Scp_T_MaterialSpecification", - column: "UnitId"); + column: "UomId"); migrationBuilder.CreateIndex( name: "IX_Scp_T_PurchaseOrder_PaymentTermId", @@ -9844,6 +9921,11 @@ namespace Erp.Platform.Migrations table: "Scp_T_PurchaseOrderItem", column: "PurchaseOrderId"); + migrationBuilder.CreateIndex( + name: "IX_Scp_T_PurchaseOrderItem_UomId", + table: "Scp_T_PurchaseOrderItem", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Scp_T_Quotation_DeliveryTermId", table: "Scp_T_Quotation", @@ -9889,6 +9971,11 @@ namespace Erp.Platform.Migrations table: "Scp_T_QuotationItem", column: "QuotationId"); + migrationBuilder.CreateIndex( + name: "IX_Scp_T_QuotationItem_UomId", + table: "Scp_T_QuotationItem", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Scp_T_Request_DepartmentId", table: "Scp_T_Request", @@ -9914,6 +10001,11 @@ namespace Erp.Platform.Migrations table: "Scp_T_RequestItem", column: "RequestId"); + migrationBuilder.CreateIndex( + name: "IX_Scp_T_RequestItem_UomId", + table: "Scp_T_RequestItem", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Sqm_T_SqlFunction_DataSourceCode", table: "Sqm_T_SqlFunction", @@ -9999,11 +10091,21 @@ namespace Erp.Platform.Migrations table: "Sqm_T_SqlView", column: "Status"); + migrationBuilder.CreateIndex( + name: "IX_Str_T_Inventory_UomId", + table: "Str_T_Inventory", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Str_T_Location_LocationTypeId", table: "Str_T_Location", column: "LocationTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Str_T_Location_UomId", + table: "Str_T_Location", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Str_T_Location_WarehouseId", table: "Str_T_Location", @@ -10039,6 +10141,11 @@ namespace Erp.Platform.Migrations table: "Str_T_MovementItem", column: "MovementId"); + migrationBuilder.CreateIndex( + name: "IX_Str_T_MovementItem_UomId", + table: "Str_T_MovementItem", + column: "UomId"); + migrationBuilder.CreateIndex( name: "IX_Str_T_MovementItem_WarehouseId", table: "Str_T_MovementItem", @@ -10089,6 +10196,38 @@ namespace Erp.Platform.Migrations principalTable: "Adm_T_Partner", principalColumn: "Id"); + migrationBuilder.AddForeignKey( + name: "FK_Acc_B_InvoiceItem_Adm_T_Uom_UomId", + table: "Acc_B_InvoiceItem", + column: "UomId", + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_Acc_B_InvoiceItem_Scp_T_Material_MaterialId", + table: "Acc_B_InvoiceItem", + column: "MaterialId", + principalTable: "Scp_T_Material", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_Acc_B_WaybillItem_Adm_T_Uom_UomId", + table: "Acc_B_WaybillItem", + column: "UomId", + principalTable: "Adm_T_Uom", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_Acc_B_WaybillItem_Scp_T_Material_MaterialId", + table: "Acc_B_WaybillItem", + column: "MaterialId", + principalTable: "Scp_T_Material", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( name: "FK_Adm_T_BlogPost_Hr_T_Employee_EmployeeId", table: "Adm_T_BlogPost", @@ -10105,6 +10244,20 @@ namespace Erp.Platform.Migrations principalColumn: "Id", onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_Partner_Scp_T_Material_MaterialId", + table: "Adm_T_Partner", + column: "MaterialId", + principalTable: "Scp_T_Material", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Adm_T_Uom_Scp_T_Material_MaterialId", + table: "Adm_T_Uom", + column: "MaterialId", + principalTable: "Scp_T_Material", + principalColumn: "Id"); + migrationBuilder.AddForeignKey( name: "FK_Crm_T_Activity_Crm_T_Opportunity_OpportunityId", table: "Crm_T_Activity", @@ -10126,21 +10279,24 @@ namespace Erp.Platform.Migrations table: "Crm_T_Opportunity", column: "EmployeeId", principalTable: "Hr_T_Employee", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey( name: "FK_Hr_T_CostCenter_Hr_T_Department_DepartmentId", table: "Hr_T_CostCenter", column: "DepartmentId", principalTable: "Hr_T_Department", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey( name: "FK_Hr_T_CostCenter_Hr_T_Employee_ResponsibleEmployeeId", table: "Hr_T_CostCenter", column: "ResponsibleEmployeeId", principalTable: "Hr_T_Employee", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey( name: "FK_Hr_T_Department_Hr_T_Employee_ManagerId", @@ -10170,6 +10326,10 @@ namespace Erp.Platform.Migrations name: "FK_Prj_T_Projects_Adm_T_Partner_CustomerId", table: "Prj_T_Projects"); + migrationBuilder.DropForeignKey( + name: "FK_Scp_T_Material_Adm_T_Uom_UomId", + table: "Scp_T_Material"); + migrationBuilder.DropForeignKey( name: "FK_Hr_T_CostCenter_Hr_T_Employee_ResponsibleEmployeeId", table: "Hr_T_CostCenter"); @@ -10413,9 +10573,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Hr_T_SurveyQuestionOption"); - migrationBuilder.DropTable( - name: "MaterialUom"); - migrationBuilder.DropTable( name: "Mnt_T_Fault"); @@ -10776,9 +10933,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Scp_T_Approval"); - migrationBuilder.DropTable( - name: "Adm_T_Uom"); - migrationBuilder.DropTable( name: "Scp_T_PurchaseOrder"); @@ -10878,9 +11032,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Sas_T_ReportCategory"); - migrationBuilder.DropTable( - name: "Adm_T_UomCategory"); - migrationBuilder.DropTable( name: "Scp_T_Quotation"); @@ -10950,9 +11101,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Sas_T_Sector"); - migrationBuilder.DropTable( - name: "Scp_T_Material"); - migrationBuilder.DropTable( name: "Scp_T_PaymentTerm"); @@ -10962,6 +11110,15 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Scp_T_SupplyType"); + migrationBuilder.DropTable( + name: "Adm_T_Uom"); + + migrationBuilder.DropTable( + name: "Adm_T_UomCategory"); + + migrationBuilder.DropTable( + name: "Scp_T_Material"); + migrationBuilder.DropTable( name: "Scp_T_MaterialGroup"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 16bafbc8..96f3ad67 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -1527,8 +1527,9 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(1m); - b.Property("BomTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("BomTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -1672,7 +1673,7 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1691,6 +1692,8 @@ namespace Erp.Platform.Migrations b.HasIndex("OperationId"); + b.HasIndex("UomId"); + b.ToTable("Mrp_T_BomComponent", (string)null); }); @@ -1789,8 +1792,9 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.HasKey("Id"); @@ -1805,8 +1809,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.BomType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2076,8 +2081,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Category", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2296,15 +2302,17 @@ namespace Erp.Platform.Migrations .HasMaxLength(200) .HasColumnType("nvarchar(200)"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TypeId") - .HasColumnType("uniqueidentifier"); + b.Property("TypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -2319,8 +2327,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CheckStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2377,8 +2386,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CheckType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2447,8 +2457,8 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("CountryId") - .HasColumnType("uniqueidentifier"); + b.Property("CountryId") + .HasColumnType("nvarchar(8)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -3372,8 +3382,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Country", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); b.Property("Code") .IsRequired() @@ -3449,8 +3460,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CountryGroup", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -3634,13 +3645,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Currency", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -3775,8 +3782,8 @@ namespace Erp.Platform.Migrations b.Property("PartnerId") .HasColumnType("uniqueidentifier"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .HasColumnType("nvarchar(450)"); b.Property("Risk") .HasMaxLength(10) @@ -4113,8 +4120,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CustomerSegment", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4171,8 +4179,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CustomerType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4281,8 +4290,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.DeliveryTerm", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5477,16 +5487,18 @@ namespace Erp.Platform.Migrations .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("EstimatedRepairTime") .HasColumnType("int"); - b.Property("FaultStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("FaultStatusId") + .HasColumnType("nvarchar(50)"); - b.Property("FaultTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("FaultTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("FollowUpRequired") .HasColumnType("bit"); @@ -5517,7 +5529,8 @@ namespace Erp.Platform.Migrations .HasColumnType("nvarchar(50)"); b.Property("ResolutionNotes") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Severity") .HasMaxLength(50) @@ -5536,9 +5549,10 @@ namespace Erp.Platform.Migrations .HasMaxLength(200) .HasColumnType("nvarchar(200)"); - b.Property("WorkcenterId") - .HasMaxLength(50) - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("WorkorderId") .HasMaxLength(100) @@ -5557,8 +5571,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.FaultStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5615,8 +5630,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.FaultType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5865,8 +5881,9 @@ namespace Erp.Platform.Migrations b.Property("LastMovementDate") .HasColumnType("datetime2"); - b.Property("LocationId") - .HasColumnType("uniqueidentifier"); + b.Property("LocationId") + .IsRequired() + .HasColumnType("nvarchar(max)"); b.Property("LotNumber") .HasMaxLength(100) @@ -5898,19 +5915,23 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(max)"); - b.Property("ZoneId") - .HasColumnType("uniqueidentifier"); + b.Property("ZoneId") + .IsRequired() + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); + b.HasIndex("UomId"); + b.ToTable("Str_T_Inventory", (string)null); }); @@ -5963,8 +5984,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("InvoiceTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("InvoiceTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -5990,8 +6012,8 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("PaymentStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentStatusId") + .HasColumnType("nvarchar(50)"); b.Property("RemainingAmount") .ValueGeneratedOnAdd() @@ -5999,8 +6021,9 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("Subtotal") .ValueGeneratedOnAdd() @@ -6137,7 +6160,7 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -6148,13 +6171,16 @@ namespace Erp.Platform.Migrations b.HasIndex("MaterialId"); + b.HasIndex("UomId"); + b.ToTable("Acc_B_InvoiceItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.InvoiceStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -6211,8 +6237,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.InvoiceType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -7436,8 +7463,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Location", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Capacity") .ValueGeneratedOnAdd() @@ -7498,8 +7526,9 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("LocationTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("Name") .IsRequired() @@ -7510,19 +7539,23 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") - .HasColumnType("nvarchar(max)"); + b.Property("UomId") + .HasColumnType("nvarchar(64)"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("ZoneId") - .HasColumnType("uniqueidentifier"); + b.Property("ZoneId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); b.HasIndex("LocationTypeId"); + b.HasIndex("UomId"); + b.HasIndex("WarehouseId"); b.HasIndex("ZoneId"); @@ -7532,8 +7565,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.LocationType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -7782,8 +7816,8 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("Uom") - .HasColumnType("nvarchar(max)"); + b.Property("UomId") + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -7791,6 +7825,8 @@ namespace Erp.Platform.Migrations b.HasIndex("MaterialTypeId"); + b.HasIndex("UomId"); + b.ToTable("Scp_T_Material", (string)null); }); @@ -7919,14 +7955,14 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnitId") - .HasColumnType("uniqueidentifier"); + b.Property("UomId") + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); b.HasIndex("MaterialId"); - b.HasIndex("UnitId"); + b.HasIndex("UomId"); b.ToTable("Scp_T_MaterialSpecification", (string)null); }); @@ -8331,8 +8367,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(100) .HasColumnType("nvarchar(100)"); - b.Property("ReferenceTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("ReferenceTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -8386,8 +8423,9 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationId") - .HasColumnType("uniqueidentifier"); + b.Property("LocationId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("LotNumber") .HasMaxLength(100) @@ -8409,16 +8447,18 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("ZoneId") - .HasColumnType("uniqueidentifier"); + b.Property("ZoneId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -8428,6 +8468,8 @@ namespace Erp.Platform.Migrations b.HasIndex("MovementId"); + b.HasIndex("UomId"); + b.HasIndex("WarehouseId"); b.HasIndex("ZoneId"); @@ -8437,8 +8479,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.MovementType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -8707,8 +8750,10 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.HasKey("Id"); @@ -9177,8 +9222,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.OrderStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -9385,11 +9431,11 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("CustomerSegmentId") - .HasColumnType("uniqueidentifier"); + b.Property("CustomerSegmentId") + .HasColumnType("nvarchar(50)"); - b.Property("CustomerTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("CustomerTypeId") + .HasColumnType("nvarchar(50)"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -9461,8 +9507,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(32) .HasColumnType("nvarchar(32)"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .IsRequired() + .HasColumnType("nvarchar(450)"); b.Property("PerformanceMetricsJson") .HasColumnType("text"); @@ -9476,19 +9523,21 @@ namespace Erp.Platform.Migrations .HasMaxLength(16) .HasColumnType("nvarchar(16)"); - b.Property("SectorId") - .HasColumnType("uniqueidentifier"); + b.Property("SectorId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Status") .IsRequired() .HasMaxLength(10) .HasColumnType("nvarchar(10)"); - b.Property("SupplierTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("SupplierTypeId") + .HasColumnType("nvarchar(50)"); - b.Property("SupplyCardTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("SupplyCardTypeId") + .HasColumnType("nvarchar(50)"); b.Property("TaxNumber") .HasColumnType("bigint"); @@ -9810,8 +9859,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.PaymentMethod", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("Commission") .HasPrecision(5, 3) @@ -9867,8 +9916,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.PaymentStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -9925,8 +9975,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasColumnType("nvarchar(450)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10368,8 +10418,10 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.HasKey("Id"); @@ -10578,8 +10630,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("OrderTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("OrderTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("PlannedCost") .ValueGeneratedOnAdd() @@ -10616,14 +10669,15 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10633,6 +10687,8 @@ namespace Erp.Platform.Migrations b.HasIndex("StatusId"); + b.HasIndex("UomId"); + b.ToTable("Mrp_T_ProductionOrder", (string)null); }); @@ -10708,7 +10764,7 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10721,13 +10777,16 @@ namespace Erp.Platform.Migrations b.HasIndex("SalesOrderId"); + b.HasIndex("UomId"); + b.ToTable("Mrp_T_ProductionOrderItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10784,8 +10843,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10939,15 +10999,18 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("WorkorderNumber") .IsRequired() @@ -11120,17 +11183,19 @@ namespace Erp.Platform.Migrations b.Property("ProjectPhaseId") .HasColumnType("uniqueidentifier"); - b.Property("ProjectTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("ProjectTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("StartDate") .HasColumnType("datetime2"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("TaskTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("TaskTypeId") + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11176,8 +11241,9 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("CategoryId") - .HasColumnType("uniqueidentifier"); + b.Property("CategoryId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -11239,8 +11305,8 @@ namespace Erp.Platform.Migrations b.Property("ProjectId") .HasColumnType("uniqueidentifier"); - b.Property("RiskId") - .HasColumnType("uniqueidentifier"); + b.Property("RiskId") + .HasColumnType("nvarchar(50)"); b.Property("Risks") .HasMaxLength(500) @@ -11254,8 +11320,9 @@ namespace Erp.Platform.Migrations b.Property("StartDate") .HasColumnType("datetime2"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11312,8 +11379,9 @@ namespace Erp.Platform.Migrations b.Property("ProjectId") .HasColumnType("uniqueidentifier"); - b.Property("RiskId") - .HasColumnType("uniqueidentifier"); + b.Property("RiskId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11402,11 +11470,12 @@ namespace Erp.Platform.Migrations b.Property("StartDate") .HasColumnType("datetime2"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("TaskTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("TaskTypeId") + .HasColumnType("nvarchar(50)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11490,8 +11559,9 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("TaskId") .HasColumnType("uniqueidentifier"); @@ -11500,8 +11570,9 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkedTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkedTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -11701,8 +11772,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .IsRequired() + .HasColumnType("nvarchar(450)"); b.Property("QuotationId") .HasColumnType("uniqueidentifier"); @@ -11842,7 +11914,7 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -11853,6 +11925,8 @@ namespace Erp.Platform.Migrations b.HasIndex("PurchaseOrderId"); + b.HasIndex("UomId"); + b.ToTable("Scp_T_PurchaseOrderItem", (string)null); }); @@ -11925,18 +11999,19 @@ namespace Erp.Platform.Migrations .IsRequired() .HasColumnType("nvarchar(max)"); - b.Property("TargetLocationId") - .HasColumnType("uniqueidentifier"); + b.Property("TargetLocationId") + .HasColumnType("nvarchar(max)"); - b.Property("TargetZoneId") - .HasColumnType("uniqueidentifier"); + b.Property("TargetZoneId") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -12305,8 +12380,9 @@ namespace Erp.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DeliveryTermId") - .HasColumnType("uniqueidentifier"); + b.Property("DeliveryTermId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("DeliveryTime") .ValueGeneratedOnAdd() @@ -12350,11 +12426,12 @@ namespace Erp.Platform.Migrations .HasMaxLength(1000) .HasColumnType("nvarchar(1000)"); - b.Property("PaymentMethodId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentMethodId") + .HasColumnType("nvarchar(450)"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .IsRequired() + .HasColumnType("nvarchar(450)"); b.Property("QuotationDate") .HasColumnType("datetime2"); @@ -12372,11 +12449,13 @@ namespace Erp.Platform.Migrations .HasMaxLength(200) .HasColumnType("nvarchar(200)"); - b.Property("RequestTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("RequestTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("StatusId") - .HasColumnType("uniqueidentifier"); + b.Property("StatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("SubmittedAt") .HasColumnType("datetime2"); @@ -12484,7 +12563,7 @@ namespace Erp.Platform.Migrations .HasPrecision(18, 2) .HasColumnType("decimal(18,2)"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12495,13 +12574,16 @@ namespace Erp.Platform.Migrations b.HasIndex("QuotationId"); + b.HasIndex("UomId"); + b.ToTable("Scp_T_QuotationItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -12558,8 +12640,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ReferenceType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13053,8 +13136,9 @@ namespace Erp.Platform.Migrations b.Property("RequestNumber") .HasColumnType("nvarchar(max)"); - b.Property("RequestTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("RequestTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("RequiredDate") .HasColumnType("datetime2"); @@ -13147,7 +13231,7 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13158,13 +13242,16 @@ namespace Erp.Platform.Migrations b.HasIndex("RequestId"); + b.HasIndex("UomId"); + b.ToTable("Scp_T_RequestItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.RequestType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13303,8 +13390,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Risk", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13456,8 +13544,9 @@ namespace Erp.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DeliveryTermId") - .HasColumnType("uniqueidentifier"); + b.Property("DeliveryTermId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.Property("DiscountAmount") .ValueGeneratedOnAdd() @@ -13503,14 +13592,15 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("PaymentTermId") - .HasColumnType("uniqueidentifier"); + b.Property("PaymentTermId") + .IsRequired() + .HasColumnType("nvarchar(450)"); b.Property("RequestedDeliveryDate") .HasColumnType("datetime2"); - b.Property("SalesOrderStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("SalesOrderStatusId") + .HasColumnType("nvarchar(50)"); b.Property("SpecialInstructions") .HasMaxLength(1000) @@ -13667,7 +13757,7 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13678,13 +13768,16 @@ namespace Erp.Platform.Migrations b.HasIndex("SalesOrderId"); + b.HasIndex("UomId"); + b.ToTable("Crm_T_SalesOrderItem", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.SalesOrderStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13977,8 +14070,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Sector", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14763,8 +14857,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Status", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14821,8 +14916,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SupplyCardType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14879,8 +14975,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SupplyType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15248,8 +15345,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.TaskType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15474,8 +15572,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Type", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15532,8 +15631,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Uom", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15568,6 +15668,9 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MaterialId") + .HasColumnType("uniqueidentifier"); + b.Property("Name") .IsRequired() .HasMaxLength(64) @@ -15590,11 +15693,14 @@ namespace Erp.Platform.Migrations .HasMaxLength(32) .HasColumnType("nvarchar(32)"); - b.Property("UomCategoryId") - .HasColumnType("uniqueidentifier"); + b.Property("UomCategoryId") + .IsRequired() + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); + b.HasIndex("MaterialId"); + b.HasIndex("UomCategoryId"); b.ToTable("Adm_T_Uom", (string)null); @@ -15602,8 +15708,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.UomCategory", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15883,8 +15990,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Warehouse", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Capacity") .ValueGeneratedOnAdd() @@ -15982,8 +16090,9 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("WarehouseTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -15996,8 +16105,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WarehouseType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -16174,11 +16284,13 @@ namespace Erp.Platform.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("WaybillStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("WaybillStatusId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("WaybillTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WaybillTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -16285,7 +16397,7 @@ namespace Erp.Platform.Migrations .HasColumnType("decimal(18,2)") .HasDefaultValue(0m); - b.Property("Uom") + b.Property("UomId") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16296,6 +16408,8 @@ namespace Erp.Platform.Migrations b.HasIndex("MaterialId"); + b.HasIndex("UomId"); + b.HasIndex("WaybillId"); b.ToTable("Acc_B_WaybillItem", (string)null); @@ -16303,8 +16417,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WaybillStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16361,8 +16476,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WaybillType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16497,8 +16613,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16555,8 +16672,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("Capacity") .ValueGeneratedOnAdd() @@ -16661,11 +16779,12 @@ namespace Erp.Platform.Migrations b.Property("WarrantyExpiry") .HasColumnType("datetime2"); - b.Property("WorkcenterStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterStatusId") + .HasColumnType("nvarchar(50)"); - b.Property("WorkcenterTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -16732,16 +16851,18 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UomId") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .HasColumnType("nvarchar(100)"); b.HasKey("Id"); + b.HasIndex("UomId"); + b.HasIndex("WorkcenterId"); b.ToTable("Mnt_T_WorkcenterSpecification", (string)null); @@ -16749,8 +16870,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkcenterStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16807,8 +16929,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkcenterType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16957,18 +17080,21 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkcenterId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkcenterId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("WorkorderNumber") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); - b.Property("WorkorderStatusId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkorderStatusId") + .HasColumnType("nvarchar(50)"); - b.Property("WorkorderTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("WorkorderTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -17116,8 +17242,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkorderStatus", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -17174,8 +17301,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkorderType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .HasColumnType("nvarchar(max)"); @@ -17235,8 +17363,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Zone", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -17303,11 +17432,13 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WarehouseId") - .HasColumnType("uniqueidentifier"); + b.Property("WarehouseId") + .IsRequired() + .HasColumnType("nvarchar(50)"); - b.Property("ZoneTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("ZoneTypeId") + .IsRequired() + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -17320,8 +17451,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ZoneType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Code") .IsRequired() @@ -18140,21 +18272,6 @@ namespace Erp.Platform.Migrations b.ToTable("Sqm_T_SqlView", (string)null); }); - modelBuilder.Entity("MaterialUom", b => - { - b.Property("AlternativeUomsId") - .HasColumnType("uniqueidentifier"); - - b.Property("MaterialsId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("AlternativeUomsId", "MaterialsId"); - - b.HasIndex("MaterialsId"); - - b.ToTable("MaterialUom"); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") @@ -20056,9 +20173,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Approval", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() + .WithMany("Approvals") .HasForeignKey("DepartmentId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.MaterialType", "MaterialType") @@ -20150,11 +20267,19 @@ namespace Erp.Platform.Migrations .WithMany() .HasForeignKey("OperationId"); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("BomComponents") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Bom"); b.Navigation("Material"); b.Navigation("Operation"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.BomOperation", b => @@ -20172,8 +20297,9 @@ namespace Erp.Platform.Migrations .IsRequired(); b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") - .WithMany() - .HasForeignKey("WorkcenterId"); + .WithMany("BomOperations") + .HasForeignKey("WorkcenterId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Bom"); @@ -20327,16 +20453,18 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.CostCenter", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() - .HasForeignKey("DepartmentId"); + .WithMany("CostCenters") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.CostCenter", "ParentCostCenter") .WithMany("SubCostCenters") .HasForeignKey("ParentCostCenterId"); b.HasOne("Erp.Platform.Entities.Employee", "ResponsibleEmployee") - .WithMany() - .HasForeignKey("ResponsibleEmployeeId"); + .WithMany("CostCenters") + .HasForeignKey("ResponsibleEmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Department"); @@ -20445,8 +20573,9 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() - .HasForeignKey("DepartmentId"); + .WithMany("Employees") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.EmploymentType", "EmploymentType") .WithMany() @@ -20482,9 +20611,9 @@ namespace Erp.Platform.Migrations .IsRequired(); b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("Events") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.EventType", "Type") @@ -20551,15 +20680,26 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Erp.Platform.Entities.Workcenter", "WorkCenter") - .WithMany() + b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") + .WithMany("Faults") .HasForeignKey("WorkcenterId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("FaultType"); - b.Navigation("WorkCenter"); + b.Navigation("Workcenter"); + }); + + modelBuilder.Entity("Erp.Platform.Entities.Inventory", b => + { + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("Inventories") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.Invoice", b => @@ -20578,8 +20718,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.PaymentStatus", "PaymentStatus") .WithMany("Invoices") .HasForeignKey("PaymentStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.InvoiceStatus", "Status") .WithMany("Invoices") @@ -20610,16 +20749,25 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("InvoiceItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Invoice"); b.Navigation("Material"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.JobPosition", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() - .HasForeignKey("DepartmentId"); + .WithMany("JobPositions") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Department"); }); @@ -20710,6 +20858,11 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("Locations") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse") .WithMany("Locations") .HasForeignKey("WarehouseId") @@ -20724,6 +20877,8 @@ namespace Erp.Platform.Migrations b.Navigation("LocationType"); + b.Navigation("Uom"); + b.Navigation("Warehouse"); b.Navigation("Zone"); @@ -20741,9 +20896,16 @@ namespace Erp.Platform.Migrations .HasForeignKey("MaterialTypeId") .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("Materials") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); + b.Navigation("MaterialGroup"); b.Navigation("MaterialType"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.MaterialGroup", b => @@ -20764,15 +20926,14 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("Erp.Platform.Entities.Uom", "Unit") + b.HasOne("Erp.Platform.Entities.Uom", "Uom") .WithMany("MaterialSpecifications") - .HasForeignKey("UnitId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Material"); - b.Navigation("Unit"); + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.Meal", b => @@ -20823,6 +20984,12 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("MovementItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse") .WithMany("MovementItems") .HasForeignKey("WarehouseId") @@ -20841,6 +21008,8 @@ namespace Erp.Platform.Migrations b.Navigation("Movement"); + b.Navigation("Uom"); + b.Navigation("Warehouse"); b.Navigation("Zone"); @@ -20857,7 +21026,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") .WithMany("Operations") .HasForeignKey("WorkcenterId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("OperationType"); @@ -20880,7 +21049,8 @@ namespace Erp.Platform.Migrations { b.HasOne("Erp.Platform.Entities.Employee", "Employee") .WithMany("Opportunities") - .HasForeignKey("EmployeeId"); + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.LossReason", "LossReason") .WithMany("Opportunities") @@ -20949,9 +21119,9 @@ namespace Erp.Platform.Migrations .IsRequired(); b.HasOne("Erp.Platform.Entities.Sector", "Sector") - .WithMany() + .WithMany("Partners") .HasForeignKey("SectorId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.SupplyType", "SupplierType") @@ -21087,9 +21257,16 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("ProductionOrders") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); + b.Navigation("OrderType"); b.Navigation("Status"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderItem", b => @@ -21112,11 +21289,19 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("ProductionOrderItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("ProductionOrder"); b.Navigation("SalesOrder"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.ProductionWorkorder", b => @@ -21254,9 +21439,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ProjectTask", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("ProjectTasks") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.ProjectPhase", "Phase") @@ -21295,9 +21480,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ProjectTaskDaily", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("ProjectTaskDailies") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.Status", "Status") @@ -21330,9 +21515,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.ProjectTeam", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("ProjectTeams") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.Employee", "Manager") @@ -21399,9 +21584,17 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("PurchaseOrderItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("PurchaseOrder"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b => @@ -21505,9 +21698,17 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("QuotationItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("Quotation"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.RegistrationMethod", b => @@ -21579,9 +21780,9 @@ namespace Erp.Platform.Migrations .IsRequired(); b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("Requests") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.RequestType", "RequestType") @@ -21611,9 +21812,17 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("RequestItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("Request"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.Reservation", b => @@ -21672,9 +21881,17 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("SalesOrderItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.Navigation("Material"); b.Navigation("SalesOrder"); + + b.Navigation("Uom"); }); modelBuilder.Entity("Erp.Platform.Entities.Schedule", b => @@ -21723,8 +21940,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SocialComment", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() - .HasForeignKey("EmployeeId"); + .WithMany("SocialComments") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.SocialPost", "SocialPost") .WithMany("Comments") @@ -21740,8 +21958,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SocialLike", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() - .HasForeignKey("EmployeeId"); + .WithMany("SocialLikes") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.SocialPost", "SocialPost") .WithMany("Likes") @@ -21790,8 +22009,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SocialPost", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() - .HasForeignKey("EmployeeId"); + .WithMany("SocialPosts") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); b.Navigation("Employee"); }); @@ -21857,6 +22077,10 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Uom", b => { + b.HasOne("Erp.Platform.Entities.Material", null) + .WithMany("AlternativeUoms") + .HasForeignKey("MaterialId"); + b.HasOne("Erp.Platform.Entities.UomCategory", "UomCategory") .WithMany("Uoms") .HasForeignKey("UomCategoryId") @@ -21929,6 +22153,11 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("WaybillItems") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Erp.Platform.Entities.Waybill", "Waybill") .WithMany("Items") .HasForeignKey("WaybillId") @@ -21937,15 +22166,17 @@ namespace Erp.Platform.Migrations b.Navigation("Material"); + b.Navigation("Uom"); + b.Navigation("Waybill"); }); modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { b.HasOne("Erp.Platform.Entities.Department", "Department") - .WithMany() + .WithMany("Workcenters") .HasForeignKey("DepartmentId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.WorkcenterStatus", null) @@ -21965,11 +22196,18 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkcenterSpecification", b => { + b.HasOne("Erp.Platform.Entities.Uom", "Uom") + .WithMany("WorkcenterSpecifications") + .HasForeignKey("UomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") .WithMany("Specifications") .HasForeignKey("WorkcenterId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Uom"); b.Navigation("Workcenter"); }); @@ -21977,9 +22215,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Workorder", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("Workorders") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.PlanWizard", "PlanWizard") @@ -21989,7 +22227,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") .WithMany("Workorders") .HasForeignKey("WorkcenterId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.WorkorderStatus", null) @@ -21999,7 +22237,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.WorkorderType", "WorkorderType") .WithMany("Workorders") .HasForeignKey("WorkorderTypeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Employee"); @@ -22014,9 +22252,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkorderActivity", b => { b.HasOne("Erp.Platform.Entities.Employee", "Employee") - .WithMany() + .WithMany("WorkorderActivities") .HasForeignKey("EmployeeId") - .OnDelete(DeleteBehavior.Cascade) + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Erp.Platform.Entities.Workorder", "Workorder") @@ -22097,21 +22335,6 @@ namespace Erp.Platform.Migrations b.Navigation("Category"); }); - modelBuilder.Entity("MaterialUom", b => - { - b.HasOne("Erp.Platform.Entities.Uom", null) - .WithMany() - .HasForeignKey("AlternativeUomsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Erp.Platform.Entities.Material", null) - .WithMany() - .HasForeignKey("MaterialsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) @@ -22396,9 +22619,19 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Department", b => { + b.Navigation("Approvals"); + + b.Navigation("CostCenters"); + + b.Navigation("Employees"); + + b.Navigation("JobPositions"); + b.Navigation("Performans360s"); b.Navigation("SubDepartments"); + + b.Navigation("Workcenters"); }); modelBuilder.Entity("Erp.Platform.Entities.Employee", b => @@ -22409,6 +22642,10 @@ namespace Erp.Platform.Migrations b.Navigation("Certificates"); + b.Navigation("CostCenters"); + + b.Navigation("Events"); + b.Navigation("ExpenseRequests"); b.Navigation("Leaves"); @@ -22419,15 +22656,33 @@ namespace Erp.Platform.Migrations b.Navigation("Partners"); + b.Navigation("ProjectTaskDailies"); + + b.Navigation("ProjectTasks"); + + b.Navigation("ProjectTeams"); + b.Navigation("Quotations"); + b.Navigation("Requests"); + b.Navigation("Reservations"); + b.Navigation("SocialComments"); + + b.Navigation("SocialLikes"); + + b.Navigation("SocialPosts"); + b.Navigation("SurveyResponses"); b.Navigation("Visitors"); b.Navigation("Warehouses"); + + b.Navigation("WorkorderActivities"); + + b.Navigation("Workorders"); }); modelBuilder.Entity("Erp.Platform.Entities.Event", b => @@ -22489,6 +22744,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Material", b => { + b.Navigation("AlternativeUoms"); + b.Navigation("BomComponents"); b.Navigation("Boms"); @@ -22733,6 +22990,11 @@ namespace Erp.Platform.Migrations b.Navigation("Lessons"); }); + modelBuilder.Entity("Erp.Platform.Entities.Sector", b => + { + b.Navigation("Partners"); + }); + modelBuilder.Entity("Erp.Platform.Entities.SkillType", b => { b.Navigation("Levels"); @@ -22819,7 +23081,35 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Uom", b => { + b.Navigation("BomComponents"); + + b.Navigation("Inventories"); + + b.Navigation("InvoiceItems"); + + b.Navigation("Locations"); + b.Navigation("MaterialSpecifications"); + + b.Navigation("Materials"); + + b.Navigation("MovementItems"); + + b.Navigation("ProductionOrderItems"); + + b.Navigation("ProductionOrders"); + + b.Navigation("PurchaseOrderItems"); + + b.Navigation("QuotationItems"); + + b.Navigation("RequestItems"); + + b.Navigation("SalesOrderItems"); + + b.Navigation("WaybillItems"); + + b.Navigation("WorkcenterSpecifications"); }); modelBuilder.Entity("Erp.Platform.Entities.UomCategory", b => @@ -22858,6 +23148,10 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b => { + b.Navigation("BomOperations"); + + b.Navigation("Faults"); + b.Navigation("Operations"); b.Navigation("PlanWizards"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json index 01984425..b4221b00 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json @@ -4288,7 +4288,7 @@ "description": "Çelik Levha 2mm", "materialTypeCode": "RAW", "materialGroupCode": "METAL", - "uom": "Adet", + "uomId": "Adet", "costPrice": 15.5, "salesPrice": 18.75, "currency": "TRY", @@ -4303,7 +4303,7 @@ "description": "Alüminyum Profil 40x40", "materialTypeCode": "SEMI", "materialGroupCode": "METAL", - "uom": "kg", + "uomId": "kg", "costPrice": 45.0, "salesPrice": 55.0, "currency": "TRY", @@ -4318,7 +4318,7 @@ "description": "Motor Grubu A-Type", "materialTypeCode": "FINISHED", "materialGroupCode": "MOTOR", - "uom": "Adet", + "uomId": "Adet", "costPrice": 850.0, "salesPrice": 1200.0, "currency": "TRY", @@ -4333,7 +4333,7 @@ "description": "Kesme Yağı Premium", "materialTypeCode": "FINISHED", "materialGroupCode": "PLASTIK", - "uom": "Adet", + "uomId": "Adet", "costPrice": 25.0, "salesPrice": 35.0, "currency": "TRY", @@ -4348,7 +4348,7 @@ "description": "Plastik Kapak", "materialTypeCode": "SEMI", "materialGroupCode": "KIMYA", - "uom": "Adet", + "uomId": "Adet", "costPrice": 8.5, "salesPrice": 15.0, "currency": "TRY", @@ -4401,31 +4401,26 @@ ], "SupplyTypes": [ { - "code": "MANUFACTURER", "name": "Üretici", "description": "Doğrudan üretim yapan tedarikçiler", "isActive": true }, { - "code": "DISTRIBUTOR", "name": "Distribütör", "description": "Ürünleri dağıtan tedarikçiler", "isActive": true }, { - "code": "WHOLESALER", "name": "Toptancı", "description": "Büyük miktarlarda ürün satan tedarikçiler", "isActive": true }, { - "code": "SERVICE_PROVIDER", "name": "Hizmet Sağlayıcı", "description": "Hizmet bazlı tedarikçiler", "isActive": true }, { - "code": "OTHER", "name": "Diğer", "description": "Diğer tedarikçi türleri", "isActive": true @@ -5382,7 +5377,7 @@ "capacity": 100, "currentStock": 75, "kind": 2, - "uom": "Kg", + "uomId": "Kg", "isActive": true }, { @@ -5395,7 +5390,7 @@ "capacity": 50, "currentStock": 30, "kind": 10, - "uom": "Kg", + "uomId": "Kg", "isActive": true }, { @@ -5408,7 +5403,7 @@ "capacity": 200, "currentStock": 180, "kind": 3, - "uom": "Kg", + "uomId": "Kg", "isActive": true }, { @@ -5421,7 +5416,7 @@ "capacity": 200, "currentStock": 180, "kind": 1, - "uom": "Kg", + "uomId": "Kg", "isActive": true }, { @@ -5434,7 +5429,7 @@ "capacity": 200, "currentStock": 180, "kind": 8, - "uom": "Adet", + "uomId": "Adet", "isActive": true } ], @@ -5699,7 +5694,7 @@ "materialCode": "MT001", "operationCode": "OP001", "quantity": 2, - "uom": "Adet", + "uomId": "Adet", "scrapPercentage": 0.05, "isPhantom": false, "validFrom": "2024-01-01T00:00:00.000Z", @@ -5711,7 +5706,7 @@ "materialCode": "MT002", "operationCode": "OP001", "quantity": 4, - "uom": "Adet", + "uomId": "Adet", "scrapPercentage": 0.01, "validFrom": "2024-01-01T00:00:00.000Z", "isPhantom": false, @@ -5723,7 +5718,7 @@ "materialCode": "PR001", "operationCode": "OP001", "quantity": 1, - "uom": "Adet", + "uomId": "Adet", "scrapPercentage": 0.01, "isPhantom": false, "validFrom": "2024-01-01T00:00:00.000Z", @@ -5735,7 +5730,7 @@ "materialCode": "MT002", "operationCode": "OP001", "quantity": 1, - "uom": "Adet", + "uomId": "Adet", "scrapPercentage": 0.01, "isPhantom": false, "validFrom": "2024-01-01T00:00:00.000Z", @@ -6458,7 +6453,7 @@ "quantity": 50, "reservedQuantity": 10, "availableQuantity": 40, - "uom": "adet", + "uomId": "Adet", "lotNumber": "LOT2024001", "serialNumber": null, "expiryDate": null, @@ -6473,7 +6468,7 @@ "quantity": 25, "reservedQuantity": 5, "availableQuantity": 20, - "uom": "metre", + "uomId": "m", "lotNumber": "LOT2024002", "serialNumber": null, "expiryDate": null, @@ -6488,7 +6483,7 @@ "quantity": 150, "reservedQuantity": 0, "availableQuantity": 150, - "uom": "adet", + "uomId": "Adet", "lotNumber": "LOT2024003", "serialNumber": null, "expiryDate": null, @@ -6503,7 +6498,7 @@ "quantity": 30, "reservedQuantity": 8, "availableQuantity": 22, - "uom": "adet", + "uomId": "Adet", "lotNumber": "LOT2024004", "serialNumber": null, "expiryDate": null, @@ -6518,7 +6513,7 @@ "quantity": 5, "reservedQuantity": 0, "availableQuantity": 0, - "uom": "adet", + "uomId": "Adet", "lotNumber": "LOT2024005", "serialNumber": null, "expiryDate": null, @@ -6638,7 +6633,7 @@ "zoneCode": "Z001", "locationCode": "A01-01-01", "quantity": 100, - "uom": "Adet", + "uomId": "Adet", "lotNumber": "LOT2024006", "serialNumber": null, "description": "2024 yılı son çeyrek 360° derece performans değerlendirmesi" @@ -6650,7 +6645,7 @@ "zoneCode": "Z002", "locationCode": "A01-01-02", "quantity": 20, - "uom": "Adet", + "uomId": "Adet", "lotNumber": "LOT2024001", "serialNumber": null, "description": "Satış siparişi için malzeme çıkışı" @@ -6662,7 +6657,7 @@ "zoneCode": "Z003", "locationCode": "B02-02-01", "quantity": 10, - "uom": "m", + "uomId": "m", "lotNumber": "LOT2024002", "serialNumber": null, "description": "Depo transferi" @@ -6674,7 +6669,7 @@ "zoneCode": "Z002", "locationCode": "A01-01-02", "quantity": 10, - "uom": "m", + "uomId": "m", "lotNumber": "LOT2024002", "serialNumber": null, "description": "Depo transferi" diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs index 7c720737..ed392601 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs @@ -28,18 +28,18 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _reportCategoriesRepository; private readonly IRepository _aboutRepository; private readonly IRepository _productRepository; - private readonly IRepository _paymentMethodRepository; + private readonly IRepository _paymentMethodRepository; private readonly IRepository _installmentOptionRepository; private readonly IRepository _servicesRepository; private readonly IRepository _blogCategoryRepository; private readonly IRepository _blogPostsRepository; private readonly IRepository _contactRepository; - private readonly IRepository _sectorRepository; + private readonly IRepository _sectorRepository; private readonly IRepository _skillTypeRepository; private readonly IRepository _skillRepository; private readonly IRepository _skillLevelRepository; - private readonly IRepository _uomCategoryRepository; - private readonly IRepository _uomRepository; + private readonly IRepository _uomCategoryRepository; + private readonly IRepository _uomRepository; private readonly IRepository _behaviorRepository; private readonly IRepository _diseaseRepository; private readonly IRepository _documentRepository; @@ -66,7 +66,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _questionRepository; private readonly IRepository _employeeTypeRepository; private readonly IRepository _jobPositionRepository; - private readonly IRepository _currencyRepository; + private readonly IRepository _currencyRepository; private readonly IRepository _departmentRepository; private readonly IRepository _badgeRepository; private readonly IRepository _costCenterRepository; @@ -95,75 +95,75 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _materialTypeRepository; private readonly IRepository _materialGroupRepository; private readonly IRepository _materialRepository; - private readonly IRepository _paymentTermRepository; - private readonly IRepository _supplyTypeRepository; - private readonly IRepository _supplyCardTypeRepository; - private readonly IRepository _customerTypeRepository; - private readonly IRepository _customerSegmentRepository; + private readonly IRepository _paymentTermRepository; + private readonly IRepository _supplyTypeRepository; + private readonly IRepository _supplyCardTypeRepository; + private readonly IRepository _customerTypeRepository; + private readonly IRepository _customerSegmentRepository; private readonly IRepository _partnerRepository; private readonly IRepository _lossReasonRepository; private readonly IRepository _organizationUnitRepository; private readonly OrganizationUnitManager _organizationUnitManager; - private readonly IRepository _requestTypeRepository; + private readonly IRepository _requestTypeRepository; private readonly IRepository _approvalRepository; - private readonly IRepository _workcenterTypeRepository; - private readonly IRepository _workcenterStatusRepository; - private readonly IRepository _workcenterRepository; + private readonly IRepository _workcenterTypeRepository; + private readonly IRepository _workcenterStatusRepository; + private readonly IRepository _workcenterRepository; private readonly IRepository _maintenancePlanRepository; private readonly IRepository _faultRepository; - private readonly IRepository _faultStatusRepository; - private readonly IRepository _faultTypeRepository; - private readonly IRepository _workorderTypeRepository; - private readonly IRepository _workorderStatusRepository; - private readonly IRepository _warehouseTypeRepository; - private readonly IRepository _warehouseRepository; - private readonly IRepository _zoneTypeRepository; - private readonly IRepository _zoneRepository; - private readonly IRepository _locationTypeRepository; - private readonly IRepository _locationRepository; + private readonly IRepository _faultStatusRepository; + private readonly IRepository _faultTypeRepository; + private readonly IRepository _workorderTypeRepository; + private readonly IRepository _workorderStatusRepository; + private readonly IRepository _warehouseTypeRepository; + private readonly IRepository _warehouseRepository; + private readonly IRepository _zoneTypeRepository; + private readonly IRepository _zoneRepository; + private readonly IRepository _locationTypeRepository; + private readonly IRepository _locationRepository; private readonly IRepository _putawayRepository; private readonly IRepository _operationCategoryRepository; private readonly IRepository _operationTypeRepository; private readonly IRepository _operationRepository; - private readonly IRepository _bomTypeRepository; + private readonly IRepository _bomTypeRepository; private readonly IRepository _bomRepository; private readonly IRepository _bomComponentRepository; private readonly IRepository _bomOperationRepository; - private readonly IRepository _projectTypeRepository; - private readonly IRepository _projectStatusRepository; - private readonly IRepository _projectCategoryRepository; - private readonly IRepository _projectRiskRepository; - private readonly IRepository _projectTaskTypeRepository; - private readonly IRepository _projectWorkTypeRepository; + private readonly IRepository _projectTypeRepository; + private readonly IRepository _projectStatusRepository; + private readonly IRepository _projectCategoryRepository; + private readonly IRepository _projectRiskRepository; + private readonly IRepository _projectTaskTypeRepository; + private readonly IRepository _projectWorkTypeRepository; private readonly IRepository _projectRepository; private readonly IRepository _projectPhaseRepository; private readonly IRepository _projectTaskRepository; - private readonly IRepository _deliveryTermRepository; - private readonly IRepository _quotationStatusRepository; - private readonly IRepository _orderStatusRepository; - private readonly IRepository _salesOrderStatusRepository; + private readonly IRepository _deliveryTermRepository; + private readonly IRepository _quotationStatusRepository; + private readonly IRepository _orderStatusRepository; + private readonly IRepository _salesOrderStatusRepository; private readonly IRepository _inventoryRepository; - private readonly IRepository _movementTypeRepository; - private readonly IRepository _referenceTypeRepository; + private readonly IRepository _movementTypeRepository; + private readonly IRepository _referenceTypeRepository; private readonly IRepository _movementRepository; private readonly IRepository _movementItemRepository; - private readonly IRepository _waybillStatusRepository; - private readonly IRepository _waybillTypeRepository; - private readonly IRepository _invoiceTypeRepository; - private readonly IRepository _invoiceStatusRepository; - private readonly IRepository _paymentStatusRepository; - private readonly IRepository _checkStatusRepository; - private readonly IRepository _checkTypeRepository; - private readonly IRepository _productionOrderTypeRepository; - private readonly IRepository _productionOrderStatusRepository; + private readonly IRepository _waybillStatusRepository; + private readonly IRepository _waybillTypeRepository; + private readonly IRepository _invoiceTypeRepository; + private readonly IRepository _invoiceStatusRepository; + private readonly IRepository _paymentStatusRepository; + private readonly IRepository _checkStatusRepository; + private readonly IRepository _checkTypeRepository; + private readonly IRepository _productionOrderTypeRepository; + private readonly IRepository _productionOrderStatusRepository; public TenantDataSeeder( IClock clock, IRepository repositoryUser, IRepository globalSearch, - IRepository sectorRepository, - IRepository uomCategoryRepository, - IRepository uomRepository, + IRepository sectorRepository, + IRepository uomCategoryRepository, + IRepository uomRepository, IRepository skillTypeRepository, IRepository skillRepository, IRepository skillLevelRepository, @@ -173,7 +173,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository aboutRepository, IRepository servicesRepository, IRepository productRepository, - IRepository paymentMethodRepository, + IRepository paymentMethodRepository, IRepository installmentOptionRepository, IRepository blogCategoryRepository, IRepository blogPostsRepository, @@ -204,7 +204,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository questionRepository, IRepository employeeTypeRepository, IRepository jobPositionRepository, - IRepository currencyRepository, + IRepository currencyRepository, IRepository departmentRepository, IRepository costCenterRepository, IRepository employeeRepository, @@ -233,67 +233,67 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository materialTypeRepository, IRepository materialGroupRepository, IRepository materialRepository, - IRepository paymentTermRepository, - IRepository supplyTypeRepository, - IRepository supplyCardTypeRepository, - IRepository customerTypeRepository, - IRepository customerSegmentRepository, + IRepository paymentTermRepository, + IRepository supplyTypeRepository, + IRepository supplyCardTypeRepository, + IRepository customerTypeRepository, + IRepository customerSegmentRepository, IRepository partnerRepository, IRepository lossReasonRepository, IRepository organizationUnitRepository, OrganizationUnitManager organizationUnitManager, - IRepository requestTypeRepository, + IRepository requestTypeRepository, IRepository approvalRepository, - IRepository workcenterTypeRepository, - IRepository workcenterStatusRepository, - IRepository workcenterRepository, + IRepository workcenterTypeRepository, + IRepository workcenterStatusRepository, + IRepository workcenterRepository, IRepository maintenancePlanRepository, IRepository faultRepository, - IRepository faultStatusRepository, - IRepository faultTypeRepository, - IRepository workorderTypeRepository, - IRepository workorderStatusRepository, - IRepository warehouseTypeRepository, - IRepository warehouseRepository, - IRepository zoneTypeRepository, - IRepository zoneRepository, - IRepository locationTypeRepository, - IRepository locationRepository, + IRepository faultStatusRepository, + IRepository faultTypeRepository, + IRepository workorderTypeRepository, + IRepository workorderStatusRepository, + IRepository warehouseTypeRepository, + IRepository warehouseRepository, + IRepository zoneTypeRepository, + IRepository zoneRepository, + IRepository locationTypeRepository, + IRepository locationRepository, IRepository putawayRepository, IRepository operationCategoryRepository, IRepository operationTypeRepository, IRepository operationRepository, - IRepository bomTypeRepository, + IRepository bomTypeRepository, IRepository bomRepository, IRepository bomComponentRepository, IRepository bomOperationRepository, - IRepository projectTypeRepository, - IRepository projectStatusRepository, - IRepository projectRiskRepository, - IRepository projectCategoryRepository, - IRepository projectWorkTypeRepository, - IRepository projectTaskTypeRepository, + IRepository projectTypeRepository, + IRepository projectStatusRepository, + IRepository projectRiskRepository, + IRepository projectCategoryRepository, + IRepository projectWorkTypeRepository, + IRepository projectTaskTypeRepository, IRepository projectRepository, IRepository projectPhaseRepository, IRepository projectTaskRepository, - IRepository deliveryTermRepository, - IRepository quotationStatusRepository, - IRepository orderStatusRepository, - IRepository salesOrderStatusRepository, + IRepository deliveryTermRepository, + IRepository quotationStatusRepository, + IRepository orderStatusRepository, + IRepository salesOrderStatusRepository, IRepository inventoryRepository, - IRepository movementTypeRepository, - IRepository referenceTypeRepository, + IRepository movementTypeRepository, + IRepository referenceTypeRepository, IRepository movementRepository, IRepository movementItemRepository, - IRepository waybillStatusRepository, - IRepository waybillTypeRepository, - IRepository invoiceTypeRepository, - IRepository invoiceStatusRepository, - IRepository paymentStatusRepository, - IRepository checkStatusRepository, - IRepository checkTypeRepository, - IRepository productionOrderTypeRepository, - IRepository productionOrderStatusRepository + IRepository waybillStatusRepository, + IRepository waybillTypeRepository, + IRepository invoiceTypeRepository, + IRepository invoiceStatusRepository, + IRepository paymentStatusRepository, + IRepository checkStatusRepository, + IRepository checkTypeRepository, + IRepository productionOrderTypeRepository, + IRepository productionOrderStatusRepository ) { _clock = clock; @@ -481,7 +481,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _sectorRepository.InsertAsync(new Sector + await _sectorRepository.InsertAsync(new Sector(item.Name) { Name = item.Name, }, autoSave: true); @@ -494,7 +494,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _uomCategoryRepository.InsertAsync(new UomCategory { Name = item.Name }, autoSave: true); + await _uomCategoryRepository.InsertAsync(new UomCategory(item.Name) { Name = item.Name }, autoSave: true); } } @@ -508,7 +508,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (category != null) { - await _uomRepository.InsertAsync(new Uom + await _uomRepository.InsertAsync(new Uom(item.Name) { Name = item.Name, Type = item.Type, @@ -633,7 +633,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _paymentMethodRepository.InsertAsync(new PaymentMethod + await _paymentMethodRepository.InsertAsync(new PaymentMethod(item.Name) { Name = item.Name, Commission = item.Commission, @@ -1840,7 +1840,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency Code = item.Code, Name = item.Name, Description = item.Description, - Uom = item.Uom, + UomId = item.UomId, CostPrice = item.CostPrice, SalesPrice = item.SalesPrice, Currency = item.Currency, @@ -1859,7 +1859,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _paymentTermRepository.InsertAsync(new PaymentTerm + await _paymentTermRepository.InsertAsync(new PaymentTerm(item.Name) { Name = item.Name, Description = item.Description, @@ -1873,7 +1873,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _supplyTypeRepository.InsertAsync(new SupplyType + await _supplyTypeRepository.InsertAsync(new SupplyType(item.Name) { Name = item.Name, Description = item.Description, @@ -1887,7 +1887,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _supplyCardTypeRepository.InsertAsync(new SupplyCardType + await _supplyCardTypeRepository.InsertAsync(new SupplyCardType(item.Name) { Name = item.Name, Description = item.Description, @@ -1901,7 +1901,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _customerTypeRepository.InsertAsync(new CustomerType + await _customerTypeRepository.InsertAsync(new CustomerType(item.Name) { Name = item.Name, Description = item.Description, @@ -1915,7 +1915,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _customerSegmentRepository.InsertAsync(new CustomerSegment + await _customerSegmentRepository.InsertAsync(new CustomerSegment(item.Name) { Name = item.Name, Description = item.Description, @@ -1929,7 +1929,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _customerSegmentRepository.InsertAsync(new CustomerSegment + await _customerSegmentRepository.InsertAsync(new CustomerSegment(item.Name) { Name = item.Name, Description = item.Description, @@ -2027,7 +2027,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _requestTypeRepository.InsertAsync(new RequestType + await _requestTypeRepository.InsertAsync(new RequestType(item.Name) { Name = item.Name, Description = item.Description, @@ -2060,7 +2060,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _workcenterTypeRepository.InsertAsync(new WorkcenterType + await _workcenterTypeRepository.InsertAsync(new WorkcenterType(item.Name) { Name = item.Name, Description = item.Description, @@ -2074,7 +2074,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _workcenterStatusRepository.InsertAsync(new WorkcenterStatus + await _workcenterStatusRepository.InsertAsync(new WorkcenterStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2091,7 +2091,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode); var workcenterType = await _workcenterTypeRepository.FirstOrDefaultAsync(x => x.Name == item.WorkcenterTypeName); - await _workcenterRepository.InsertAsync(new Workcenter + await _workcenterRepository.InsertAsync(new Workcenter(item.Code) { Code = item.Code, Name = item.Name, @@ -2145,7 +2145,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _faultTypeRepository.InsertAsync(new FaultType + await _faultTypeRepository.InsertAsync(new FaultType(item.Name) { Name = item.Name, Description = item.Description, @@ -2159,7 +2159,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _faultStatusRepository.InsertAsync(new FaultStatus + await _faultStatusRepository.InsertAsync(new FaultStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2202,7 +2202,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _workorderTypeRepository.InsertAsync(new WorkorderType + await _workorderTypeRepository.InsertAsync(new WorkorderType(item.Name) { Name = item.Name, Description = item.Description, @@ -2216,7 +2216,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _workorderStatusRepository.InsertAsync(new WorkorderStatus + await _workorderStatusRepository.InsertAsync(new WorkorderStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2226,11 +2226,11 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.WarehouseTypes) { - var exists = await _warehouseTypeRepository.AnyAsync(x => x.Code == item.Code); + var exists = await _warehouseTypeRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; - await _warehouseTypeRepository.InsertAsync(new WarehouseType + await _warehouseTypeRepository.InsertAsync(new WarehouseType(item.Name) { Code = item.Code, Name = item.Name, @@ -2245,7 +2245,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _zoneTypeRepository.InsertAsync(new ZoneType + await _zoneTypeRepository.InsertAsync(new ZoneType(item.Name) { Code = item.Code, Name = item.Name, @@ -2260,7 +2260,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _locationTypeRepository.InsertAsync(new LocationType + await _locationTypeRepository.InsertAsync(new LocationType(item.Name) { Code = item.Code, Name = item.Name, @@ -2278,7 +2278,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.EmployeeCode); var warehousetype = await _warehouseTypeRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseTypeCode); - await _warehouseRepository.InsertAsync(new Warehouse + await _warehouseRepository.InsertAsync(new Warehouse(item.Code) { Code = item.Code, Name = item.Name, @@ -2307,7 +2307,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode); var zoneType = await _zoneTypeRepository.FirstOrDefaultAsync(x => x.Code == item.ZoneTypeCode); - await _zoneRepository.InsertAsync(new Zone + await _zoneRepository.InsertAsync(new Zone(item.Name) { WarehouseId = warehouse?.Id, ZoneTypeId = zoneType?.Id, @@ -2329,9 +2329,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode); var zone = await _zoneRepository.FirstOrDefaultAsync(x => x.Code == item.ZoneCode); var locationtype = await _locationTypeRepository.FirstOrDefaultAsync(x => x.Code == item.LocationTypeCode); - var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.Uom); + var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.UomId); - await _locationRepository.InsertAsync(new Location + await _locationRepository.InsertAsync(new Location(item.Name) { WarehouseId = warehouse?.Id, ZoneId = zone?.Id, @@ -2342,7 +2342,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IsActive = item.IsActive, Capacity = item.Capacity, Kind = item.Kind, - Uom = item.Uom, + UomId = item.UomId, CurrentStock = item.CurrentStock }, autoSave: true); } @@ -2445,7 +2445,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _bomTypeRepository.InsertAsync(new BomType + await _bomTypeRepository.InsertAsync(new BomType(item.Name) { Name = item.Name, Description = item.Description, @@ -2479,7 +2479,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency { var bom = await _bomRepository.FirstOrDefaultAsync(x => x.Code == item.BomCode); var material = await _materialRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialCode); - var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.Uom); + var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.UomId); var operation = await _operationRepository.FirstOrDefaultAsync(x => x.Code == item.OperationCode); var exists = await _bomComponentRepository.AnyAsync(x => x.BomId == bom.Id && x.MaterialId == material.Id); @@ -2492,7 +2492,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency MaterialId = material?.Id, OperationId = operation?.Id, Quantity = item.Quantity, - Uom = item.Uom, + UomId = item.UomId, ScrapPercentage = item.ScrapPercentage, IsPhantom = item.IsPhantom, Position = item.Position, @@ -2535,7 +2535,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _projectTypeRepository.InsertAsync(new Entities.Type + await _projectTypeRepository.InsertAsync(new Entities.Type(item.Name) { Name = item.Name, Description = item.Description, @@ -2549,7 +2549,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _projectStatusRepository.InsertAsync(new Status + await _projectStatusRepository.InsertAsync(new Status(item.Name) { Name = item.Name, Description = item.Description, @@ -2596,7 +2596,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _projectRiskRepository.InsertAsync(new Risk + await _projectRiskRepository.InsertAsync(new Risk(item.Name) { Name = item.Name, Description = item.Description, @@ -2610,7 +2610,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _projectCategoryRepository.InsertAsync(new Category + await _projectCategoryRepository.InsertAsync(new Category(item.Name) { Name = item.Name, Description = item.Description, @@ -2624,7 +2624,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _projectTaskTypeRepository.InsertAsync(new TaskType + await _projectTaskTypeRepository.InsertAsync(new TaskType(item.Name) { Name = item.Name, Description = item.Description, @@ -2698,7 +2698,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _projectWorkTypeRepository.InsertAsync(new WorkType + await _projectWorkTypeRepository.InsertAsync(new WorkType(item.Name) { Name = item.Name, Description = item.Description, @@ -2712,7 +2712,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _deliveryTermRepository.InsertAsync(new DeliveryTerm + await _deliveryTermRepository.InsertAsync(new DeliveryTerm(item.Name) { Name = item.Name, Description = item.Description, @@ -2726,7 +2726,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _quotationStatusRepository.InsertAsync(new QuotationStatus + await _quotationStatusRepository.InsertAsync(new QuotationStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2740,7 +2740,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _orderStatusRepository.InsertAsync(new OrderStatus + await _orderStatusRepository.InsertAsync(new OrderStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2754,7 +2754,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _salesOrderStatusRepository.InsertAsync(new SalesOrderStatus + await _salesOrderStatusRepository.InsertAsync(new SalesOrderStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2785,7 +2785,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency Quantity = item.Quantity, ReservedQuantity = item.ReservedQuantity, AvailableQuantity = item.AvailableQuantity, - Uom = item.Uom, + UomId = item.UomId, LotNumber = item.LotNumber, SerialNumber = item.SerialNumber, ExpiryDate = item.ExpiryDate, @@ -2800,7 +2800,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _movementTypeRepository.InsertAsync(new MovementType + await _movementTypeRepository.InsertAsync(new MovementType(item.Name) { Name = item.Name, Description = item.Description, @@ -2814,7 +2814,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _referenceTypeRepository.InsertAsync(new ReferenceType + await _referenceTypeRepository.InsertAsync(new ReferenceType(item.Name) { Name = item.Name, MovementTypeName = item.MovementTypeName, @@ -2866,7 +2866,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency LocationId = location?.Id, MaterialId = material?.Id, Quantity = item.Quantity, - Uom = item.Uom, + UomId = item.UomId, LotNumber = item.LotNumber, Description = item.Description }, autoSave: true); @@ -2878,7 +2878,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _waybillStatusRepository.InsertAsync(new WaybillStatus + await _waybillStatusRepository.InsertAsync(new WaybillStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2892,7 +2892,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _waybillTypeRepository.InsertAsync(new WaybillType + await _waybillTypeRepository.InsertAsync(new WaybillType(item.Name) { Name = item.Name, Description = item.Description, @@ -2906,7 +2906,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _invoiceTypeRepository.InsertAsync(new InvoiceType + await _invoiceTypeRepository.InsertAsync(new InvoiceType(item.Name) { Name = item.Name, Description = item.Description, @@ -2920,7 +2920,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _invoiceStatusRepository.InsertAsync(new InvoiceStatus + await _invoiceStatusRepository.InsertAsync(new InvoiceStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2934,7 +2934,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _paymentStatusRepository.InsertAsync(new PaymentStatus + await _paymentStatusRepository.InsertAsync(new PaymentStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2948,7 +2948,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _checkStatusRepository.InsertAsync(new CheckStatus + await _checkStatusRepository.InsertAsync(new CheckStatus(item.Name) { Name = item.Name, Description = item.Description, @@ -2962,7 +2962,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _checkTypeRepository.InsertAsync(new CheckType + await _checkTypeRepository.InsertAsync(new CheckType(item.Name) { Name = item.Name, Description = item.Description, @@ -2976,7 +2976,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _productionOrderTypeRepository.InsertAsync(new ProductionOrderType + await _productionOrderTypeRepository.InsertAsync(new ProductionOrderType(item.Name) { Name = item.Name, Description = item.Description, @@ -2990,7 +2990,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (exists) continue; - await _productionOrderStatusRepository.InsertAsync(new ProductionOrderStatus + await _productionOrderStatusRepository.InsertAsync(new ProductionOrderStatus(item.Name) { Name = item.Name, Description = item.Description, diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs index 3e03edd8..d3f0369a 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDatabaseViewCreator.cs @@ -214,7 +214,7 @@ public class DatabaseViewSeeder : IDataSeedContributor, ITransientDependency mi.LocationId, mi.MaterialId, mi.Quantity, - mi.Uom, + mi.UomId, mi.LotNumber, mi.Description, mi.IsDeleted @@ -268,7 +268,7 @@ public class DatabaseViewSeeder : IDataSeedContributor, ITransientDependency mi.LocationId, mi.MaterialId, mi.Quantity, - mi.Uom, + mi.UomId, mi.LotNumber, mi.Description, mi.IsDeleted diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs index a687dd9e..d9c02c2f 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs @@ -252,7 +252,7 @@ public class MovementItemSeedDto public string MaterialCode { get; set; } public decimal Quantity { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } public string LotNumber { get; set; } public string Description { get; set; } @@ -284,7 +284,7 @@ public class InventorySeedDto public decimal ReservedQuantity { get; set; } public decimal AvailableQuantity { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } public string LotNumber { get; set; } public string SerialNumber { get; set; } @@ -470,7 +470,7 @@ public class BomComponentSeedDto public string OperationCode { get; set; } public decimal Quantity { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } public decimal ScrapPercentage { get; set; } public bool IsPhantom { get; set; } @@ -567,7 +567,7 @@ public class LocationSeedDto public decimal Capacity { get; set; } public decimal CurrentStock { get; set; } public int Kind { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } public bool IsActive { get; set; } } @@ -848,7 +848,7 @@ public class MaterialSeedDto public string Description { get; set; } public string MaterialTypeCode { get; set; } public string MaterialGroupCode { get; set; } - public string Uom { get; set; } + public string UomId { get; set; } public decimal CostPrice { get; set; } public decimal SalesPrice { get; set; } public string Currency { get; set; }