From 643649fe77bfd1fea87ea4495ba9257abdbb4228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Thu, 21 Aug 2025 22:53:45 +0300 Subject: [PATCH] SubForm ve SubList Seeder Eklendi --- .../Seeds/ListFormsSeeder.cs | 125 +++++- .../Seeds/PlatformDataSeeder.cs | 19 +- .../Seeds/SeederData.json | 72 ++-- .../Seeds/SeederDto.cs | 5 +- .../Kurs.Platform.Domain/Entities/Skill.cs | 9 +- .../Entities/SkillLevel.cs | 8 +- .../Entities/SkillType.cs | 12 +- .../EntityFrameworkCore/PlatformDbContext.cs | 16 +- ...20250821191927_GenelDuzenleme.Designer.cs} | 370 +++++++++--------- ...me.cs => 20250821191927_GenelDuzenleme.cs} | 106 +++++ .../PlatformDbContextModelSnapshot.cs | 368 +++++++++-------- ui/dev-dist/sw.js | 2 +- 12 files changed, 664 insertions(+), 448 deletions(-) rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20250821081019_GenelDuzenleme.Designer.cs => 20250821191927_GenelDuzenleme.Designer.cs} (99%) rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20250821081019_GenelDuzenleme.cs => 20250821191927_GenelDuzenleme.cs} (91%) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index 405106a2..fbf1efb8 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -7157,7 +7157,6 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsDeleted = false, AllowSearch = true, LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", ValueExpr = "key", @@ -11858,10 +11857,11 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 3, DataField = "Ratio", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 4, DataField = "Rounding", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 6, DataField = "UomCategoryId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, ] } }), @@ -11965,6 +11965,16 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key="Reference",Name="Reference" }, + new () { Key="SmallerThanReference",Name="Smaller Than Reference" }, + new () { Key="BiggerThanReference",Name="Bigger Than Reference" }, + }), + }), ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), @@ -12044,6 +12054,43 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsPivot = true }) }, + new ListFormField + { + ListFormCode = listFormUom.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "UomCategoryId", + Width = 150, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = $"SELECT \"{DbTablePrefix}UomCategory\".\"Id\" AS \"Key\", \"{DbTablePrefix}UomCategory\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}UomCategory\" ORDER BY \"{DbTablePrefix}UomCategory\".\"Name\"", + }), + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Uom + ".Create", + R = AppCodes.Definitions.Uom, + U = AppCodes.Definitions.Uom + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, }); #endregion } @@ -12148,9 +12195,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Progress", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSlider }, - new EditingFormItemDto { Order = 3, DataField = "TypeName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "IsDefault", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 2, DataField = "Progress", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 3, DataField = "IsDefault", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 4, DataField = "SkillTypeId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, ] } }), @@ -12183,8 +12230,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency #region Skill Level Fields await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - new ListFormField - { + new() { ListFormCode = listFormSkillLevel.ListFormCode, RoleId = null, UserId = null, @@ -12214,8 +12260,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsPivot = true }) }, - new ListFormField - { + new() { ListFormCode = listFormSkillLevel.ListFormCode, RoleId = null, UserId = null, @@ -12261,9 +12306,6 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SkillLevel + ".Create", @@ -12309,6 +12351,43 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency IsPivot = true }) }, + new ListFormField + { + ListFormCode = listFormSkillLevel.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "SkillTypeId", + Width = 150, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = $"SELECT \"{DbTablePrefix}SkillType\".\"Id\" AS \"Key\", \"{DbTablePrefix}SkillType\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}SkillType\" ORDER BY \"{DbTablePrefix}SkillType\".\"Name\"", + }), + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.SkillLevel + ".Create", + R = AppCodes.Definitions.SkillLevel, + U = AppCodes.Definitions.SkillLevel + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, }); #endregion } @@ -12413,7 +12492,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "TypeName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "SkillTypeId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, ] } }), @@ -12509,22 +12588,28 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency RoleId = null, UserId = null, CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "TypeName", + SourceDbType = DbType.Guid, + FieldName = "SkillTypeId", Width = 150, ListOrderNo = 3, Visible = true, IsActive = true, IsDeleted = false, AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = $"SELECT \"{DbTablePrefix}SkillType\".\"Id\" AS \"Key\", \"{DbTablePrefix}SkillType\".\"Name\" as \"Name\" FROM \"{DbTablePrefix}SkillType\" ORDER BY \"{DbTablePrefix}SkillType\".\"Name\"", + }), ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { - C = AppCodes.Definitions.Skill + ".Create", - R = AppCodes.Definitions.Skill, - U = AppCodes.Definitions.Skill + ".Update", + C = AppCodes.Definitions.SkillLevel + ".Create", + R = AppCodes.Definitions.SkillLevel, + U = AppCodes.Definitions.SkillLevel + ".Update", E = true, I = true, Deny = false @@ -13049,7 +13134,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{DbTablePrefix}LanguageKey\".\"Key\", CONCAT(\"{DbTablePrefix}LanguageKey\".\"Key\", ' (', \"{DbTablePrefix}LanguageText\".\"Value\", ')') AS \"Name\" FROM \"{DbTablePrefix}LanguageKey\" LEFT OUTER JOIN \"{DbTablePrefix}LanguageText\" ON \"{DbTablePrefix}LanguageKey\".\"Key\" = \"{DbTablePrefix}LanguageText\".\"Key\" AND \"{DbTablePrefix}LanguageKey\".\"ResourceName\" = \"{DbTablePrefix}LanguageText\".\"ResourceName\" WHERE \"{DbTablePrefix}LanguageKey\".\"IsDeleted\" = 'false' AND \"{DbTablePrefix}LanguageText\".\"IsDeleted\" = 'false' AND \"{DbTablePrefix}LanguageText\".\"CultureName\" = 'tr' ORDER BY \"{DbTablePrefix}LanguageKey\".\"Key\";" + LookupQuery = lookupQueryLanguageKeyValues }), PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { @@ -13108,7 +13193,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{DbTablePrefix}LanguageKey\".\"Key\", CONCAT(\"{DbTablePrefix}LanguageKey\".\"Key\", ' (', \"{DbTablePrefix}LanguageText\".\"Value\", ')') AS \"Name\" FROM \"{DbTablePrefix}LanguageKey\" LEFT OUTER JOIN \"{DbTablePrefix}LanguageText\" ON \"{DbTablePrefix}LanguageKey\".\"Key\" = \"{DbTablePrefix}LanguageText\".\"Key\" AND \"{DbTablePrefix}LanguageKey\".\"ResourceName\" = \"{DbTablePrefix}LanguageText\".\"ResourceName\" WHERE \"{DbTablePrefix}LanguageKey\".\"IsDeleted\" = 'false' AND \"{DbTablePrefix}LanguageText\".\"IsDeleted\" = 'false' AND \"{DbTablePrefix}LanguageText\".\"CultureName\" = 'tr' ORDER BY \"{DbTablePrefix}LanguageKey\".\"Key\";" + LookupQuery = lookupQueryLanguageKeyValues }), PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs index 1a244d9b..9a8b1f82 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs @@ -24,6 +24,7 @@ using EFCore.BulkExtensions; using System.Collections.Generic; using Kurs.Platform.Contacts; using static Kurs.Settings.SettingsConsts; +using DocumentFormat.OpenXml.Wordprocessing; namespace Kurs.Platform.Data.Seeds; @@ -725,39 +726,39 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _skillTypeRepository.InsertAsync(new SkillType - { - Name = item.Name, - }); + await _skillTypeRepository.InsertAsync + ( + new SkillType(item.Id, item.Name) + ); } } foreach (var item in items.Skills) { - var exists = await _skillRepository.AnyAsync(x => x.Name == item.Name && x.TypeName == item.TypeName); + var exists = await _skillRepository.AnyAsync(x => x.Name == item.Name && x.SkillTypeId == item.SkillTypeId); if (!exists) { await _skillRepository.InsertAsync(new Skill { Name = item.Name, - TypeName = item.TypeName + SkillTypeId = item.SkillTypeId }); } } foreach (var item in items.SkillLevels) { - var exists = await _skillLevelRepository.AnyAsync(x => x.Name == item.Name && x.TypeName == item.TypeName); + var exists = await _skillLevelRepository.AnyAsync(x => x.Name == item.Name && x.SkillTypeId == item.SkillTypeId); if (!exists) { await _skillLevelRepository.InsertAsync(new SkillLevel { Name = item.Name, - TypeName = item.TypeName, Progress = item.Progress, - IsDefault = item.IsDefault + IsDefault = item.IsDefault, + SkillTypeId = item.SkillTypeId, }); } } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json index 9bfe1d32..e762ace4 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json @@ -16762,173 +16762,175 @@ ], "SkillTypes": [ { + "Id": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Diller" }, { + "Id": "2e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Soft Skills" } ], "Skills": [ { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Spanish" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Fransızca" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "English" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "German" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Filipino" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Arabic" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Bengali" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Mandarin Chinese" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Wu Chinese" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Hindi" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Russian" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Portuguese" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Indonesian" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Urdu" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Japonca" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Punjabi" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Javanese" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Telugu" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Turkish" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Korean" }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Marathi" }, { - "TypeName": "Soft Skills", + "SkillTypeId": "2e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Adaptability" }, { - "TypeName": "Soft Skills", + "SkillTypeId": "2e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Critical Thinking" }, { - "TypeName": "Soft Skills", + "SkillTypeId": "2e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "İletişim" } ], "SkillLevels": [ { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "C2", "Progress": 100, "IsDefault": false }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "C1", "Progress": 85, "IsDefault": false }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "B2", "Progress": 75, "IsDefault": false }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "B1", "Progress": 60, "IsDefault": false }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "A2", "Progress": 40, "IsDefault": false }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "A1", "Progress": 10, "IsDefault": true }, { - "TypeName": "Diller", + "SkillTypeId": "1e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Expert", "Progress": 100, "IsDefault": false }, { - "TypeName": "Soft Skills", + "SkillTypeId": "2e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Advanced", "Progress": 80, "IsDefault": false }, { - "TypeName": "Soft Skills", + "SkillTypeId": "2e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Intermediate", "Progress": 50, "IsDefault": false }, { - "TypeName": "Soft Skills", + "SkillTypeId": "2e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Elementary", "Progress": 25, "IsDefault": false }, { - "TypeName": "Soft Skills", + "SkillTypeId": "2e97bf2c-dec8-50bb-af20-70e71d752874", "Name": "Beginner", "Progress": 15, "IsDefault": true diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs index fe165879..8e882347 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs @@ -162,13 +162,14 @@ public class CurrencySeedDto public class SkillTypeSeedDto { + public Guid Id { get; set; } public string Name { get; set; } } public class SkillSeedDto { public string Name { get; set; } - public string TypeName { get; set; } + public Guid SkillTypeId { get; set; } } public class SkillLevelSeedDto @@ -176,7 +177,7 @@ public class SkillLevelSeedDto public string Name { get; set; } public int Progress { get; set; } public bool IsDefault { get; set; } - public string TypeName { get; set; } + public Guid SkillTypeId { get; set; } } public class ContactTagSeedDto diff --git a/api/src/Kurs.Platform.Domain/Entities/Skill.cs b/api/src/Kurs.Platform.Domain/Entities/Skill.cs index 7106f066..d637e616 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Skill.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Skill.cs @@ -1,11 +1,14 @@ using System; -using System.ComponentModel.DataAnnotations; using Volo.Abp.Domain.Entities.Auditing; +namespace Kurs.Platform.Entities; + public class Skill : FullAuditedEntity { - [Required, MaxLength(128)] public string Name { get; set; } - public string TypeName { get; set; } + public Guid SkillTypeId { get; set; } + + public SkillType SkillType { get; set; } + } \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain/Entities/SkillLevel.cs b/api/src/Kurs.Platform.Domain/Entities/SkillLevel.cs index 2c9b0ae8..286e3adf 100644 --- a/api/src/Kurs.Platform.Domain/Entities/SkillLevel.cs +++ b/api/src/Kurs.Platform.Domain/Entities/SkillLevel.cs @@ -1,14 +1,16 @@ using System; -using System.ComponentModel.DataAnnotations; using Volo.Abp.Domain.Entities.Auditing; +namespace Kurs.Platform.Entities; + public class SkillLevel : FullAuditedEntity { - [Required, MaxLength(128)] public string Name { get; set; } public int Progress { get; set; } public bool IsDefault { get; set; } - public string TypeName { get; set; } + public Guid SkillTypeId { get; set; } + + public SkillType SkillType { get; set; } } \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain/Entities/SkillType.cs b/api/src/Kurs.Platform.Domain/Entities/SkillType.cs index 578452f4..9d9df4ca 100644 --- a/api/src/Kurs.Platform.Domain/Entities/SkillType.cs +++ b/api/src/Kurs.Platform.Domain/Entities/SkillType.cs @@ -1,13 +1,21 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using Volo.Abp.Domain.Entities.Auditing; +namespace Kurs.Platform.Entities; public class SkillType : FullAuditedEntity { - [Required, MaxLength(128)] public string Name { get; set; } public ICollection Skills { get; set; } public ICollection Levels { get; set; } + + public SkillType() + { + } + + public SkillType(Guid id, string name) : base(id) + { + Name = name; + } } \ No newline at end of file diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index d623b561..af776b6e 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -416,6 +416,18 @@ public class PlatformDbContext : b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.HasIndex(x => x.Name).IsUnique(); + + b.HasMany(x => x.Skills) + .WithOne(x => x.SkillType) + .HasForeignKey(x => new { x.SkillTypeId }) + .HasPrincipalKey(x => new { x.Id }) + .OnDelete(DeleteBehavior.Cascade); + + b.HasMany(x => x.Levels) + .WithOne(x => x.SkillType) + .HasForeignKey(x => new { x.SkillTypeId }) + .HasPrincipalKey(x => new { x.Id }) + .OnDelete(DeleteBehavior.Cascade); }); builder.Entity(b => @@ -423,7 +435,7 @@ public class PlatformDbContext : b.ToTable(PlatformConsts.DbTablePrefix + nameof(Skill), PlatformConsts.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.TypeName).IsRequired().HasMaxLength(128); + b.Property(x => x.SkillTypeId).IsRequired(); }); builder.Entity(b => @@ -431,7 +443,7 @@ public class PlatformDbContext : b.ToTable(PlatformConsts.DbTablePrefix + nameof(SkillLevel), PlatformConsts.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.TypeName).IsRequired().HasMaxLength(128); + b.Property(x => x.SkillTypeId).IsRequired(); b.Property(x => x.Progress); b.Property(x => x.IsDefault); }); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821081019_GenelDuzenleme.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821191927_GenelDuzenleme.Designer.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821081019_GenelDuzenleme.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821191927_GenelDuzenleme.Designer.cs index 4af569e0..2051d0c6 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821081019_GenelDuzenleme.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821191927_GenelDuzenleme.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20250821081019_GenelDuzenleme")] + [Migration("20250821191927_GenelDuzenleme")] partial class GenelDuzenleme { /// @@ -3572,6 +3572,160 @@ namespace Kurs.Platform.Migrations b.ToTable("PService", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SkillTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SkillTypeId"); + + b.ToTable("PSkill", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDefault") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Progress") + .HasColumnType("int"); + + b.Property("SkillTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SkillTypeId"); + + b.ToTable("PSkillLevel", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("PSkillType", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => { b.Property("Id") @@ -4219,170 +4373,6 @@ namespace Kurs.Platform.Migrations b.ToTable("PSettingDefinition", (string)null); }); - modelBuilder.Entity("Skill", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("SkillTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("TypeName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("SkillTypeId"); - - b.ToTable("PSkill", (string)null); - }); - - modelBuilder.Entity("SkillLevel", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDefault") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("Progress") - .HasColumnType("int"); - - b.Property("SkillTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("TypeName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("SkillTypeId"); - - b.ToTable("PSkillLevel", (string)null); - }); - - modelBuilder.Entity("SkillType", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("PSkillType", (string)null); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") @@ -6349,6 +6339,28 @@ namespace Kurs.Platform.Migrations b.Navigation("ReportCategory"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => + { + b.HasOne("Kurs.Platform.Entities.SkillType", "SkillType") + .WithMany("Skills") + .HasForeignKey("SkillTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SkillType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", b => + { + b.HasOne("Kurs.Platform.Entities.SkillType", "SkillType") + .WithMany("Levels") + .HasForeignKey("SkillTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SkillType"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => { b.HasOne("Kurs.Platform.Entities.UomCategory", "UomCategory") @@ -6399,20 +6411,6 @@ namespace Kurs.Platform.Migrations b.Navigation("Order"); }); - modelBuilder.Entity("Skill", b => - { - b.HasOne("SkillType", null) - .WithMany("Skills") - .HasForeignKey("SkillTypeId"); - }); - - modelBuilder.Entity("SkillLevel", b => - { - b.HasOne("SkillType", null) - .WithMany("Levels") - .HasForeignKey("SkillTypeId"); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) @@ -6590,6 +6588,13 @@ namespace Kurs.Platform.Migrations b.Navigation("Parameters"); }); + modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => + { + b.Navigation("Levels"); + + b.Navigation("Skills"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b => { b.Navigation("Uoms"); @@ -6615,13 +6620,6 @@ namespace Kurs.Platform.Migrations b.Navigation("Items"); }); - modelBuilder.Entity("SkillType", b => - { - b.Navigation("Levels"); - - b.Navigation("Skills"); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Navigation("Actions"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821081019_GenelDuzenleme.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821191927_GenelDuzenleme.cs similarity index 91% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821081019_GenelDuzenleme.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821191927_GenelDuzenleme.cs index 0fbfacaf..4b598369 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821081019_GenelDuzenleme.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20250821191927_GenelDuzenleme.cs @@ -11,6 +11,14 @@ namespace Kurs.Platform.Migrations /// protected override void Up(MigrationBuilder migrationBuilder) { + migrationBuilder.DropForeignKey( + name: "FK_PSkill_PSkillType_SkillTypeId", + table: "PSkill"); + + migrationBuilder.DropForeignKey( + name: "FK_PSkillLevel_PSkillType_SkillTypeId", + table: "PSkillLevel"); + migrationBuilder.DropForeignKey( name: "FK_PUom_PUomCategory_CategoryName", table: "PUom"); @@ -31,6 +39,14 @@ namespace Kurs.Platform.Migrations name: "CategoryName", table: "PUom"); + migrationBuilder.DropColumn( + name: "TypeName", + table: "PSkillLevel"); + + migrationBuilder.DropColumn( + name: "TypeName", + table: "PSkill"); + migrationBuilder.DropColumn( name: "ConcurrencyStamp", table: "PRoute"); @@ -54,6 +70,26 @@ namespace Kurs.Platform.Migrations nullable: false, defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); + migrationBuilder.AlterColumn( + name: "SkillTypeId", + table: "PSkillLevel", + type: "uniqueidentifier", + nullable: false, + defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), + oldClrType: typeof(Guid), + oldType: "uniqueidentifier", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SkillTypeId", + table: "PSkill", + type: "uniqueidentifier", + nullable: false, + defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), + oldClrType: typeof(Guid), + oldType: "uniqueidentifier", + oldNullable: true); + migrationBuilder.AlterColumn( name: "LikeCount", table: "PForumPost", @@ -631,6 +667,22 @@ namespace Kurs.Platform.Migrations table: "PReportTemplate", column: "CategoryName"); + migrationBuilder.AddForeignKey( + name: "FK_PSkill_PSkillType_SkillTypeId", + table: "PSkill", + column: "SkillTypeId", + principalTable: "PSkillType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_PSkillLevel_PSkillType_SkillTypeId", + table: "PSkillLevel", + column: "SkillTypeId", + principalTable: "PSkillType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( name: "FK_PUom_PUomCategory_UomCategoryId", table: "PUom", @@ -643,6 +695,14 @@ namespace Kurs.Platform.Migrations /// protected override void Down(MigrationBuilder migrationBuilder) { + migrationBuilder.DropForeignKey( + name: "FK_PSkill_PSkillType_SkillTypeId", + table: "PSkill"); + + migrationBuilder.DropForeignKey( + name: "FK_PSkillLevel_PSkillType_SkillTypeId", + table: "PSkillLevel"); + migrationBuilder.DropForeignKey( name: "FK_PUom_PUomCategory_UomCategoryId", table: "PUom"); @@ -735,6 +795,38 @@ namespace Kurs.Platform.Migrations nullable: false, defaultValue: ""); + migrationBuilder.AlterColumn( + name: "SkillTypeId", + table: "PSkillLevel", + type: "uniqueidentifier", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uniqueidentifier"); + + migrationBuilder.AddColumn( + name: "TypeName", + table: "PSkillLevel", + type: "nvarchar(128)", + maxLength: 128, + nullable: false, + defaultValue: ""); + + migrationBuilder.AlterColumn( + name: "SkillTypeId", + table: "PSkill", + type: "uniqueidentifier", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uniqueidentifier"); + + migrationBuilder.AddColumn( + name: "TypeName", + table: "PSkill", + type: "nvarchar(128)", + maxLength: 128, + nullable: false, + defaultValue: ""); + migrationBuilder.AddColumn( name: "ConcurrencyStamp", table: "PRoute", @@ -882,6 +974,20 @@ namespace Kurs.Platform.Migrations unique: true, filter: "[CountryCode] IS NOT NULL AND [Code] IS NOT NULL"); + migrationBuilder.AddForeignKey( + name: "FK_PSkill_PSkillType_SkillTypeId", + table: "PSkill", + column: "SkillTypeId", + principalTable: "PSkillType", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_PSkillLevel_PSkillType_SkillTypeId", + table: "PSkillLevel", + column: "SkillTypeId", + principalTable: "PSkillType", + principalColumn: "Id"); + migrationBuilder.AddForeignKey( name: "FK_PUom_PUomCategory_CategoryName", table: "PUom", diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 3872a91d..953d4e6a 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -3569,6 +3569,160 @@ namespace Kurs.Platform.Migrations b.ToTable("PService", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SkillTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SkillTypeId"); + + b.ToTable("PSkill", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDefault") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Progress") + .HasColumnType("int"); + + b.Property("SkillTypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SkillTypeId"); + + b.ToTable("PSkillLevel", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("PSkillType", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => { b.Property("Id") @@ -4216,170 +4370,6 @@ namespace Kurs.Platform.Migrations b.ToTable("PSettingDefinition", (string)null); }); - modelBuilder.Entity("Skill", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("SkillTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("TypeName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("SkillTypeId"); - - b.ToTable("PSkill", (string)null); - }); - - modelBuilder.Entity("SkillLevel", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDefault") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("Progress") - .HasColumnType("int"); - - b.Property("SkillTypeId") - .HasColumnType("uniqueidentifier"); - - b.Property("TypeName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("SkillTypeId"); - - b.ToTable("PSkillLevel", (string)null); - }); - - modelBuilder.Entity("SkillType", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("PSkillType", (string)null); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") @@ -6346,6 +6336,28 @@ namespace Kurs.Platform.Migrations b.Navigation("ReportCategory"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => + { + b.HasOne("Kurs.Platform.Entities.SkillType", "SkillType") + .WithMany("Skills") + .HasForeignKey("SkillTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SkillType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", b => + { + b.HasOne("Kurs.Platform.Entities.SkillType", "SkillType") + .WithMany("Levels") + .HasForeignKey("SkillTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SkillType"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => { b.HasOne("Kurs.Platform.Entities.UomCategory", "UomCategory") @@ -6396,20 +6408,6 @@ namespace Kurs.Platform.Migrations b.Navigation("Order"); }); - modelBuilder.Entity("Skill", b => - { - b.HasOne("SkillType", null) - .WithMany("Skills") - .HasForeignKey("SkillTypeId"); - }); - - modelBuilder.Entity("SkillLevel", b => - { - b.HasOne("SkillType", null) - .WithMany("Levels") - .HasForeignKey("SkillTypeId"); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) @@ -6587,6 +6585,13 @@ namespace Kurs.Platform.Migrations b.Navigation("Parameters"); }); + modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => + { + b.Navigation("Levels"); + + b.Navigation("Skills"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b => { b.Navigation("Uoms"); @@ -6612,13 +6617,6 @@ namespace Kurs.Platform.Migrations b.Navigation("Items"); }); - modelBuilder.Entity("SkillType", b => - { - b.Navigation("Levels"); - - b.Navigation("Skills"); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Navigation("Actions"); diff --git a/ui/dev-dist/sw.js b/ui/dev-dist/sw.js index 1c34a8f7..8118c7ba 100644 --- a/ui/dev-dist/sw.js +++ b/ui/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.2cgibr83seg" + "revision": "0.1epkpfrpvl8" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {