diff --git a/api/src/Erp.Platform.Application.Contracts/Uom/UomDto.cs b/api/src/Erp.Platform.Application.Contracts/Uom/UomDto.cs index 4fade321..fa775114 100644 --- a/api/src/Erp.Platform.Application.Contracts/Uom/UomDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Uom/UomDto.cs @@ -11,6 +11,6 @@ public class UomDto : AuditedEntityDto public decimal Ratio { get; set; } public bool IsActive { get; set; } public decimal Rounding { get; set; } - public Guid UomCategoryId { get; set; } + public string UomCategoryId { get; set; } public string UomCategoryName { get; set; } // Listelemede gösterim için opsiyonel } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index 6470a38d..1b8db161 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -3841,7 +3841,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkHour)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -3852,7 +3852,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkHour)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -3871,7 +3872,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 10, DataField = "Sunday", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, ]} }), - 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 }, @@ -4175,7 +4175,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillType)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -4186,8 +4186,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SkillType)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { @@ -4198,7 +4199,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { Hint = "Manage", @@ -4273,7 +4273,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillLevel)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -4284,8 +4284,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SkillLevel)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= @@ -4296,7 +4297,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsDefault", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }), @@ -4397,7 +4397,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Skill)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -4408,15 +4408,15 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Skill)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.SkillLevel, 600, 300, 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 = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), }, autoSave: true ); @@ -4472,7 +4472,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Relation = new List() { new { ParentFieldName = "Id", - DbType = DbType.Guid, + DbType = DbType.String, ChildFieldName = "SkillTypeId" } } @@ -4484,7 +4484,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Relation = new List() { new { ParentFieldName = "Id", - DbType = DbType.Guid, + DbType = DbType.String, ChildFieldName = "SkillTypeId" } } @@ -4782,7 +4782,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Relation = new List() { new { ParentFieldName = "Id", - DbType = DbType.Guid, + DbType = DbType.String, ChildFieldName = "UomCategoryId" } } @@ -4813,7 +4813,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Behavior)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -4824,7 +4824,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Behavior)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), 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(DbType.String), }); #region Behavior Fields @@ -4900,7 +4900,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Disease)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -4911,7 +4911,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Disease)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), 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(DbType.String), } ); @@ -4989,7 +4989,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Document)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -5000,7 +5000,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Document)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -5008,7 +5009,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -5179,7 +5179,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vaccine)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -5190,15 +5190,15 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Vaccine)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), - InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), } ); @@ -5266,7 +5266,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vehicle)), KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = DefaultFilterRowJson, @@ -5277,7 +5277,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Vehicle)), - DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -5298,7 +5299,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), - 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.Domain/Entities/Tenant/Administration/Behavior.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Behavior.cs index 1c7b95af..4cb4c420 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Behavior.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Behavior.cs @@ -4,12 +4,17 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Behavior : FullAuditedEntity, IMultiTenant +public class Behavior : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } public string Name { get; set; } Guid? IMultiTenant.TenantId => TenantId; + + public Behavior(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Disease.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Disease.cs index 3054e29b..de5761b9 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Disease.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Disease.cs @@ -4,12 +4,17 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Disease : FullAuditedEntity, IMultiTenant +public class Disease : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } public string Name { get; set; } Guid? IMultiTenant.TenantId => TenantId; + + public Disease(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Document.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Document.cs index 8fa5604d..0a6e375e 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Document.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Document.cs @@ -4,12 +4,17 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Document : FullAuditedEntity, IMultiTenant +public class Document : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } public string Name { get; set; } Guid? IMultiTenant.TenantId => TenantId; + + public Document(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/EducationStatus.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/EducationStatus.cs index 171b92bb..6e3a326c 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/EducationStatus.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/EducationStatus.cs @@ -1,5 +1,4 @@ using System; -using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Skill.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Skill.cs index be6325af..ec6abd3e 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Skill.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Skill.cs @@ -4,14 +4,19 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Skill : FullAuditedEntity, IMultiTenant +public class Skill : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public Guid SkillTypeId { get; set; } + + public string SkillTypeId { get; set; } + public SkillType SkillType { get; set; } public string Name { get; set; } Guid? IMultiTenant.TenantId => TenantId; - public SkillType SkillType { get; set; } + public Skill(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/SkillLevel.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/SkillLevel.cs index 70bd39fb..73209dca 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/SkillLevel.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/SkillLevel.cs @@ -4,16 +4,21 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class SkillLevel : FullAuditedEntity, IMultiTenant +public class SkillLevel : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } + public string SkillTypeId { get; set; } + public SkillType SkillType { get; set; } + public string Name { get; set; } public int Progress { get; set; } public bool IsDefault { get; set; } Guid? IMultiTenant.TenantId => TenantId; - - public Guid SkillTypeId { get; set; } - public SkillType SkillType { get; set; } + + public SkillLevel(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/SkillType.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/SkillType.cs index 9950d867..f2e3f788 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/SkillType.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/SkillType.cs @@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class SkillType : FullAuditedEntity, IMultiTenant +public class SkillType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -15,4 +15,9 @@ public class SkillType : FullAuditedEntity, IMultiTenant public ICollection Skills { get; set; } public ICollection Levels { get; set; } + + public SkillType(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Vaccine.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Vaccine.cs index d492066a..7f605cf8 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Vaccine.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Vaccine.cs @@ -4,12 +4,17 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Vaccine : FullAuditedEntity, IMultiTenant +public class Vaccine : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } public string Name { get; set; } Guid? IMultiTenant.TenantId => TenantId; + + public Vaccine(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Vehicle.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Vehicle.cs index 213570b6..a8b57cbc 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Vehicle.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Vehicle.cs @@ -4,7 +4,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class Vehicle : FullAuditedEntity, IMultiTenant +public class Vehicle : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -25,5 +25,10 @@ public class Vehicle : FullAuditedEntity, IMultiTenant public string Status { get; set; } Guid? IMultiTenant.TenantId => TenantId; + + public Vehicle(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/WorkHour.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/WorkHour.cs index a8d23b4a..3866756c 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/WorkHour.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/WorkHour.cs @@ -4,7 +4,7 @@ using Volo.Abp.MultiTenancy; namespace Erp.Platform.Entities; -public class WorkHour : FullAuditedEntity, IMultiTenant +public class WorkHour : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } @@ -21,5 +21,10 @@ public class WorkHour : FullAuditedEntity, IMultiTenant public bool? Sunday { get; set; } Guid? IMultiTenant.TenantId => TenantId; + + public WorkHour(string id) + { + Id = id; + } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Saas/Branch.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Saas/Branch.cs index c632dd4e..cefa3875 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Saas/Branch.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Saas/Branch.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using Volo.Abp.Domain.Entities.Auditing; diff --git a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index f64586bd..6c1aaa78 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -899,7 +899,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.Id).HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); }); @@ -948,7 +948,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.Id).HasMaxLength(8); b.Property(x => x.Code).IsRequired().HasMaxLength(8); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.GroupName).HasMaxLength(128); @@ -996,6 +996,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillType)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.HasMany(x => x.Skills) @@ -1016,8 +1017,9 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Skill)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(128); + b.Property(x => x.SkillTypeId).IsRequired().HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.SkillTypeId).IsRequired(); }); builder.Entity(b => @@ -1025,8 +1027,9 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SkillLevel)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(128); + b.Property(x => x.SkillTypeId).IsRequired().HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.SkillTypeId).IsRequired(); b.Property(x => x.Progress).HasDefaultValue(0); b.Property(x => x.IsDefault).HasDefaultValue(false); }); @@ -1036,7 +1039,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.Id).HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); }); @@ -1046,7 +1049,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.Id).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); @@ -1234,6 +1237,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Behavior)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); }); @@ -1381,6 +1385,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Disease)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); }); @@ -1401,6 +1406,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vaccine)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(128); b.Property(x => x.Name).HasMaxLength(128).IsRequired(); }); @@ -1443,6 +1449,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Document)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(80); b.Property(x => x.Name).HasMaxLength(80).IsRequired(); }); @@ -1451,6 +1458,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Vehicle)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(10); b.Property(x => x.Plate).HasMaxLength(10).IsRequired(); b.Property(x => x.Brand).HasMaxLength(64); b.Property(x => x.ModelYear); @@ -1473,6 +1481,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkHour)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(64); b.Property(x => x.Name).HasMaxLength(64).IsRequired(); b.Property(x => x.StartTime).HasMaxLength(8).IsRequired(); b.Property(x => x.EndTime).HasMaxLength(8).IsRequired(); @@ -2473,7 +2482,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PaymentTerm)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Id).IsRequired().HasMaxLength(128); + b.Property(x => x.Id).HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Description).IsRequired().HasMaxLength(512); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2923,7 +2932,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Workcenter)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Id).IsRequired().HasMaxLength(128); + b.Property(x => x.Id).HasMaxLength(128); b.Property(x => x.Code).IsRequired().HasMaxLength(128); b.Property(x => x.Name).IsRequired().HasMaxLength(256); b.Property(x => x.Description).HasMaxLength(512); @@ -3116,7 +3125,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Warehouse)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Id).IsRequired().HasMaxLength(64); + b.Property(x => x.Id).HasMaxLength(64); b.Property(x => x.Code).IsRequired().HasMaxLength(64); b.Property(x => x.Name).IsRequired().HasMaxLength(256); b.Property(x => x.Description).HasMaxLength(512); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211195241_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.Designer.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211195241_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.Designer.cs index cf921e71..a8ff63df 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211195241_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251211195241_Initial")] + [Migration("20251211210045_Initial")] partial class Initial { /// @@ -1301,8 +1301,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Behavior", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4531,8 +4532,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Disease", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4647,8 +4649,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Document", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(80) + .HasColumnType("nvarchar(80)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14346,8 +14349,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Skill", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14384,8 +14388,10 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("SkillTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("SkillTypeId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -14400,8 +14406,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SkillLevel", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14448,8 +14455,10 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("SkillTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("SkillTypeId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -14464,8 +14473,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SkillType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15850,8 +15860,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Vaccine", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15899,8 +15910,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Vehicle", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); b.Property("AssistantDriverName") .HasMaxLength(64) @@ -16632,8 +16644,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkHour", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2") diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211195241_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211195241_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.cs index d87d185a..f9fb8627 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211195241_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211210045_Initial.cs @@ -670,7 +670,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_Behavior", 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), @@ -770,7 +770,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_Disease", 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), @@ -790,7 +790,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_Document", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(80)", maxLength: 80, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(80)", maxLength: 80, nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), @@ -1022,7 +1022,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_SkillType", 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), @@ -1062,7 +1062,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_Vaccine", 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), @@ -1082,7 +1082,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_Vehicle", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Plate = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), Brand = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), @@ -1113,7 +1113,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_WorkHour", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StartTime = table.Column(type: "datetime2", maxLength: 8, nullable: false), @@ -3630,9 +3630,9 @@ namespace Erp.Platform.Migrations name: "Adm_T_Skill", 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), - SkillTypeId = table.Column(type: "uniqueidentifier", nullable: false), + SkillTypeId = table.Column(type: "nvarchar(128)", maxLength: 128, 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), @@ -3657,12 +3657,12 @@ namespace Erp.Platform.Migrations name: "Adm_T_SkillLevel", 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), + SkillTypeId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Progress = table.Column(type: "int", nullable: false, defaultValue: 0), IsDefault = table.Column(type: "bit", nullable: false, defaultValue: false), - SkillTypeId = table.Column(type: "uniqueidentifier", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 51b9afe4..1134cc45 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -1298,8 +1298,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Behavior", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4528,8 +4529,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Disease", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4644,8 +4646,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Document", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(80) + .HasColumnType("nvarchar(80)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14343,8 +14346,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Skill", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14381,8 +14385,10 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("SkillTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("SkillTypeId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -14397,8 +14403,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SkillLevel", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -14445,8 +14452,10 @@ namespace Erp.Platform.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("SkillTypeId") - .HasColumnType("uniqueidentifier"); + b.Property("SkillTypeId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -14461,8 +14470,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.SkillType", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15847,8 +15857,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Vaccine", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -15896,8 +15907,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Vehicle", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); b.Property("AssistantDriverName") .HasMaxLength(64) @@ -16629,8 +16641,9 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.WorkHour", b => { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("Id") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2") diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs index aef8cd68..75fdc4ed 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs @@ -35,14 +35,14 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _blogPostsRepository; private readonly IRepository _contactRepository; private readonly IRepository _sectorRepository; - private readonly IRepository _skillTypeRepository; - private readonly IRepository _skillRepository; - private readonly IRepository _skillLevelRepository; + private readonly IRepository _skillTypeRepository; + private readonly IRepository _skillRepository; + private readonly IRepository _skillLevelRepository; private readonly IRepository _uomCategoryRepository; private readonly IRepository _uomRepository; - private readonly IRepository _behaviorRepository; - private readonly IRepository _diseaseRepository; - private readonly IRepository _documentRepository; + private readonly IRepository _behaviorRepository; + private readonly IRepository _diseaseRepository; + private readonly IRepository _documentRepository; private readonly IRepository _educationStatusRepository; private readonly IRepository _eventTypeRepository; private readonly IRepository _eventCategoryRepository; @@ -56,10 +56,10 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _interestingRepository; private readonly IRepository _salesRejectionReasonRepository; private readonly IRepository _sourceRepository; - private readonly IRepository _vaccineRepository; + private readonly IRepository _vaccineRepository; private readonly IRepository _noteTypeRepository; private readonly IRepository _classCancellationReasonRepository; - private readonly IRepository _workHourRepository; + private readonly IRepository _workHourRepository; private readonly IRepository _classroomRepository; private readonly IRepository _tagRepository; private readonly IRepository _questionPoolRepository; @@ -164,9 +164,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository sectorRepository, IRepository uomCategoryRepository, IRepository uomRepository, - IRepository skillTypeRepository, - IRepository skillRepository, - IRepository skillLevelRepository, + IRepository skillTypeRepository, + IRepository skillRepository, + IRepository skillLevelRepository, IRepository customEndpointRepository, IRepository customComponentRepository, IRepository reportCategoriesRepository, @@ -179,12 +179,12 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository blogPostsRepository, IRepository contactRepository, IRepository classroomRepository, - IRepository behaviorRepository, - IRepository diseaseRepository, - IRepository documentRepository, + IRepository behaviorRepository, + IRepository diseaseRepository, + IRepository documentRepository, IRepository educationStatusRepository, - IRepository vaccineRepository, - IRepository workHourRepository, + IRepository vaccineRepository, + IRepository workHourRepository, IRepository salesRejectionReasonRepository, IRepository noteTypeRepository, IRepository meetingMethodRepository, @@ -527,7 +527,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _skillTypeRepository.InsertAsync(new SkillType { Name = item.Name }, autoSave: true); + await _skillTypeRepository.InsertAsync(new SkillType(item.Name) { Name = item.Name }, autoSave: true); } } @@ -540,7 +540,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency var skillType = await _skillTypeRepository.FirstOrDefaultAsync(x => x.Name == item.SkillTypeName); if (skillType != null) { - await _skillRepository.InsertAsync(new Skill + await _skillRepository.InsertAsync(new Skill(item.Name) { Name = item.Name, SkillTypeId = skillType.Id @@ -558,7 +558,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency var skillType = await _skillTypeRepository.FirstOrDefaultAsync(x => x.Name == item.SkillTypeName); if (skillType != null) { - await _skillLevelRepository.InsertAsync(new SkillLevel + await _skillLevelRepository.InsertAsync(new SkillLevel(item.Name) { Name = item.Name, Progress = item.Progress, @@ -766,7 +766,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _behaviorRepository.InsertAsync(new() + await _behaviorRepository.InsertAsync(new Behavior(item.Name) { Name = item.Name, }); @@ -779,7 +779,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _documentRepository.InsertAsync(new() + await _documentRepository.InsertAsync(new Document(item.Name) { Name = item.Name, }); @@ -792,7 +792,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _diseaseRepository.InsertAsync(new() + await _diseaseRepository.InsertAsync(new Disease(item.Name) { Name = item.Name, }); @@ -819,7 +819,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _vaccineRepository.InsertAsync(new() + await _vaccineRepository.InsertAsync(new Vaccine(item.Name) { Name = item.Name, }); @@ -832,7 +832,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency if (!exists) { - await _workHourRepository.InsertAsync(new() + await _workHourRepository.InsertAsync(new WorkHour(item.Name) { Name = item.Name, StartTime = item.StartTime,