UomId ve BankId düzenlemeleri

This commit is contained in:
Sedat Öztürk 2025-11-26 22:39:01 +03:00
parent 5c7793c86e
commit 0058a0180c
20 changed files with 404 additions and 488 deletions

View file

@ -53,7 +53,9 @@ public class EmployeeDto : FullAuditedEntityDto<Guid>
public string Currency { get; set; }
public string PayrollGroup { get; set; } // e.g., Monthly, Biweekly, Weekly
public Guid? BankAccountId { get; set; }
public Guid BankId { get; set; }
public string IbanNumber { get; set; }
public Guid? BadgeId { get; set; }
public string EmployeeStatus { get; set; }

View file

@ -1090,7 +1090,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 1, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 2, DataField = "OperationId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 3, DataField = "Quantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat },
new EditingFormItemDto { Order = 4, DataField = "UomId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 4, DataField = "Uom", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 5, DataField = "ScrapPercentage", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat },
new EditingFormItemDto { Order = 6, DataField = "IsPhantom", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 7, DataField = "Position", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
@ -1178,15 +1178,15 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "UomId",
SourceDbType = DbType.String,
FieldName = "Uom",
Width = 200,
ListOrderNo = 5,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"),
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson

View file

@ -1282,15 +1282,15 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "UomId",
SourceDbType = DbType.String,
FieldName = "Uom",
Width = 100,
ListOrderNo = 9,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"),
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson

View file

@ -409,7 +409,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
new EditingFormItemDto { Order = 8, DataField = "MaterialGroupId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 9, DataField = "TrackingType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 10, DataField = "TotalStock", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.Disabled },
new EditingFormItemDto { Order = 11, DataField = "UomId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 11, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 12, DataField = "Barcode", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 13, DataField = "IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
@ -624,14 +624,14 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "UomId",
SourceDbType = DbType.String,
FieldName = "Uom",
Width = 120,
ListOrderNo = 11,
Visible = true,
IsActive = true,
IsDeleted = false,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"),
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
@ -3220,7 +3220,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 1, DataField="MaterialId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 2, DataField="Quantity", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat },
new EditingFormItemDto { Order = 3, DataField="UomId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 3, DataField="Uom", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 4, DataField="EstimatedPrice", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat },
new EditingFormItemDto { Order = 5, DataField="Specification", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 6, DataField="Justification", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
@ -3291,15 +3291,15 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "UomId",
SourceDbType = DbType.String,
FieldName = "Uom",
Width = 100,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"),
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"),
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),

View file

@ -56,8 +56,9 @@ public class Employee : FullAuditedEntity<Guid>, IMultiTenant
public string PayrollGroup { get; set; } // e.g., Monthly, Biweekly, Weekly
public Guid? BankAccountId { get; set; }
public BankAccount BankAccount { get; set; }
public Guid? BankId { get; set; }
public Bank Bank { get; set; }
public string IbanNumber { get; set; }
public Guid? BadgeId { get; set; }
public Badge Badge { get; set; }

View file

@ -17,7 +17,6 @@ public class WorkcenterSpecification : FullAuditedEntity<Guid>, IMultiTenant
// Özellik detayları
public string SpecificationName { get; set; }
public string SpecificationValue { get; set; }
public Guid UomId { get; set; }
public Uom Uom { get; set; }
public string Uom { get; set; }
public bool IsRequired { get; set; }
}

View file

@ -18,8 +18,7 @@ public class BomComponent : FullAuditedEntity<Guid>, IMultiTenant
public Operation? Operation { get; set; }
public decimal Quantity { get; set; }
public Guid? UomId { get; set; }
public Uom? Uom { get; set; }
public string Uom { get; set; }
public decimal ScrapPercentage { get; set; }
public bool IsPhantom { get; set; }

View file

@ -25,8 +25,7 @@ public class Location : FullAuditedEntity<Guid>, IMultiTenant
public decimal CurrentStock { get; set; }
public int Kind { get; set; }
public Guid? UomId { get; set; }
public Uom? Uom { get; set; }
public string Uom { get; set; }
public bool IsActive { get; set; }
}

View file

@ -17,8 +17,7 @@ public class Material : FullAuditedEntity<Guid>, IMultiTenant
public MaterialType? MaterialType { get; set; }
public Guid? MaterialGroupId { get; set; }
public MaterialGroup? MaterialGroup { get; set; }
public Guid? UomId { get; set; }
public Uom? Uom { get; set; }
public string Uom { get; set; }
public decimal CostPrice { get; set; }
public decimal SalesPrice { get; set; }
public string Currency { get; set; }

View file

@ -15,8 +15,7 @@ public class RequestItem : FullAuditedEntity<Guid>, IMultiTenant
public Material Material { get; set; }
public decimal Quantity { get; set; }
public Guid UomId { get; set; }
public Uom Uom { get; set; }
public string Uom { get; set; }
public decimal EstimatedPrice { get; set; }
public string Specification { get; set; }
public string Justification { get; set; }

View file

@ -1898,6 +1898,7 @@ public class PlatformDbContext :
b.Property(x => x.MobileNumber).HasMaxLength(20);
b.Property(x => x.Avatar).HasMaxLength(250);
b.Property(x => x.NationalId).HasMaxLength(20);
b.Property(x => x.IbanNumber).HasMaxLength(50);
b.Property(x => x.PayrollGroup).HasMaxLength(50);
b.Property(x => x.WorkLocation).HasMaxLength(150);
b.Property(x => x.IsActive).HasDefaultValue(true);
@ -1916,9 +1917,9 @@ public class PlatformDbContext :
.WithMany()
.HasForeignKey(x => x.ManagerId);
b.HasOne(x => x.BankAccount)
b.HasOne(x => x.Bank)
.WithMany()
.HasForeignKey(x => x.BankAccountId)
.HasForeignKey(x => x.BankId)
.OnDelete(DeleteBehavior.Restrict)
.IsRequired(false);
});
@ -2591,11 +2592,6 @@ public class PlatformDbContext :
.WithMany(x => x.Materials)
.HasForeignKey(x => x.MaterialGroupId)
.OnDelete(DeleteBehavior.Restrict);
b.HasOne(x => x.Uom)
.WithMany(x => x.Materials)
.HasForeignKey(x => x.UomId)
.OnDelete(DeleteBehavior.Restrict);
});
builder.Entity<MaterialSpecification>(b =>
@ -2732,7 +2728,7 @@ public class PlatformDbContext :
b.Property(x => x.MaterialId).IsRequired();
b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0);
b.Property(x => x.UomId).IsRequired();
b.Property(x => x.Uom).IsRequired();
b.Property(x => x.EstimatedPrice).HasPrecision(18, 2).HasDefaultValue(0);
b.Property(x => x.Specification).HasMaxLength(500);
b.Property(x => x.Justification).HasMaxLength(500);
@ -2800,7 +2796,7 @@ public class PlatformDbContext :
b.Property(x => x.SpecificationName).IsRequired().HasMaxLength(200);
b.Property(x => x.SpecificationValue).IsRequired().HasMaxLength(200);
b.Property(x => x.UomId).IsRequired();
b.Property(x => x.Uom).IsRequired();
b.Property(x => x.IsRequired).HasDefaultValue(false);
b.HasOne(x => x.Workcenter)
@ -3153,7 +3149,7 @@ public class PlatformDbContext :
b.Property(x => x.BomId).IsRequired();
b.Property(x => x.MaterialId).IsRequired();
b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0);
b.Property(x => x.UomId).IsRequired();
b.Property(x => x.Uom).IsRequired();
b.Property(x => x.ScrapPercentage).HasPrecision(18, 2).HasDefaultValue(0);
b.Property(x => x.IsPhantom).HasDefaultValue(false);
b.Property(x => x.Position).HasDefaultValue(0);

View file

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Erp.Platform.Migrations
{
[DbContext(typeof(PlatformDbContext))]
[Migration("20251126143913_Initial")]
[Migration("20251126193252_Initial")]
partial class Initial
{
/// <inheritdoc />
@ -1666,8 +1666,9 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<Guid>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ValidFrom")
.HasColumnType("datetime2");
@ -1683,8 +1684,6 @@ namespace Erp.Platform.Migrations
b.HasIndex("OperationId");
b.HasIndex("UomId");
b.ToTable("Mrp_T_BomComponent", (string)null);
});
@ -4474,7 +4473,7 @@ namespace Erp.Platform.Migrations
b.Property<Guid?>("BadgeId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("BankAccountId")
b.Property<Guid?>("BankId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("BaseSalary")
@ -4551,6 +4550,10 @@ namespace Erp.Platform.Migrations
b.Property<DateTime>("HireDate")
.HasColumnType("datetime2");
b.Property<string>("IbanNumber")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
@ -4616,7 +4619,7 @@ namespace Erp.Platform.Migrations
b.HasIndex("BadgeId");
b.HasIndex("BankAccountId");
b.HasIndex("BankId");
b.HasIndex("DepartmentId");
@ -6675,8 +6678,8 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<Guid?>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("WarehouseId")
.HasColumnType("uniqueidentifier");
@ -6688,8 +6691,6 @@ namespace Erp.Platform.Migrations
b.HasIndex("LocationTypeId");
b.HasIndex("UomId");
b.HasIndex("WarehouseId");
b.HasIndex("ZoneId");
@ -7522,8 +7523,8 @@ namespace Erp.Platform.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<Guid?>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
@ -7531,8 +7532,6 @@ namespace Erp.Platform.Migrations
b.HasIndex("MaterialTypeId");
b.HasIndex("UomId");
b.ToTable("Scp_T_Material", (string)null);
});
@ -10767,8 +10766,9 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<Guid>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
@ -10776,8 +10776,6 @@ namespace Erp.Platform.Migrations
b.HasIndex("RequestId");
b.HasIndex("UomId");
b.ToTable("Scp_T_RequestItem", (string)null);
});
@ -12641,9 +12639,6 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<Guid?>("MaterialId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
@ -12671,8 +12666,6 @@ namespace Erp.Platform.Migrations
b.HasKey("Id");
b.HasIndex("MaterialId");
b.HasIndex("UomCategoryId");
b.ToTable("Adm_T_Uom", (string)null);
@ -13392,16 +13385,15 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<Guid>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<Guid>("WorkcenterId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("UomId");
b.HasIndex("WorkcenterId");
b.ToTable("Mnt_T_WorkcenterSpecification", (string)null);
@ -14027,6 +14019,21 @@ namespace Erp.Platform.Migrations
b.ToTable("Plat_H_SettingDefinition", (string)null);
});
modelBuilder.Entity("MaterialUom", b =>
{
b.Property<Guid>("AlternativeUomsId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("MaterialsId")
.HasColumnType("uniqueidentifier");
b.HasKey("AlternativeUomsId", "MaterialsId");
b.HasIndex("MaterialsId");
b.ToTable("MaterialUom");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
@ -16022,19 +16029,11 @@ namespace Erp.Platform.Migrations
.WithMany()
.HasForeignKey("OperationId");
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany()
.HasForeignKey("UomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Bom");
b.Navigation("Material");
b.Navigation("Operation");
b.Navigation("Uom");
});
modelBuilder.Entity("Erp.Platform.Entities.BomOperation", b =>
@ -16293,9 +16292,9 @@ namespace Erp.Platform.Migrations
.WithMany()
.HasForeignKey("BadgeId");
b.HasOne("Erp.Platform.Entities.BankAccount", "BankAccount")
b.HasOne("Erp.Platform.Entities.Bank", "Bank")
.WithMany()
.HasForeignKey("BankAccountId")
.HasForeignKey("BankId")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("Erp.Platform.Entities.Department", "Department")
@ -16316,7 +16315,7 @@ namespace Erp.Platform.Migrations
b.Navigation("Badge");
b.Navigation("BankAccount");
b.Navigation("Bank");
b.Navigation("Department");
@ -16511,10 +16510,6 @@ namespace Erp.Platform.Migrations
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany()
.HasForeignKey("UomId");
b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse")
.WithMany("Locations")
.HasForeignKey("WarehouseId")
@ -16529,8 +16524,6 @@ namespace Erp.Platform.Migrations
b.Navigation("LocationType");
b.Navigation("Uom");
b.Navigation("Warehouse");
b.Navigation("Zone");
@ -16640,16 +16633,9 @@ namespace Erp.Platform.Migrations
.HasForeignKey("MaterialTypeId")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany("Materials")
.HasForeignKey("UomId")
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("MaterialGroup");
b.Navigation("MaterialType");
b.Navigation("Uom");
});
modelBuilder.Entity("Erp.Platform.Entities.MaterialGroup", b =>
@ -17019,17 +17005,9 @@ namespace Erp.Platform.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany()
.HasForeignKey("UomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Material");
b.Navigation("Request");
b.Navigation("Uom");
});
modelBuilder.Entity("Erp.Platform.Entities.Reservation", b =>
@ -17223,10 +17201,6 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.Uom", b =>
{
b.HasOne("Erp.Platform.Entities.Material", null)
.WithMany("AlternativeUoms")
.HasForeignKey("MaterialId");
b.HasOne("Erp.Platform.Entities.UomCategory", "UomCategory")
.WithMany("Uoms")
.HasForeignKey("UomCategoryId")
@ -17290,20 +17264,12 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.WorkcenterSpecification", b =>
{
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany()
.HasForeignKey("UomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter")
.WithMany("Specifications")
.HasForeignKey("WorkcenterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Uom");
b.Navigation("Workcenter");
});
@ -17355,6 +17321,21 @@ namespace Erp.Platform.Migrations
b.Navigation("Category");
});
modelBuilder.Entity("MaterialUom", b =>
{
b.HasOne("Erp.Platform.Entities.Uom", null)
.WithMany()
.HasForeignKey("AlternativeUomsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Erp.Platform.Entities.Material", null)
.WithMany()
.HasForeignKey("MaterialsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
@ -17703,8 +17684,6 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
{
b.Navigation("AlternativeUoms");
b.Navigation("BomComponents");
b.Navigation("Boms");
@ -17886,8 +17865,6 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.Uom", b =>
{
b.Navigation("MaterialSpecifications");
b.Navigation("Materials");
});
modelBuilder.Entity("Erp.Platform.Entities.UomCategory", b =>

View file

@ -3087,6 +3087,37 @@ namespace Erp.Platform.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Adm_T_Uom",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UomCategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Type = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
Ratio = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
Rounding = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Adm_T_Uom", x => x.Id);
table.ForeignKey(
name: "FK_Adm_T_Uom_Adm_T_UomCategory_UomCategoryId",
column: x => x.UomCategoryId,
principalTable: "Adm_T_UomCategory",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Crd_T_ClassroomAttandance",
columns: table => new
@ -3915,6 +3946,50 @@ namespace Erp.Platform.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Scp_T_Material",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Barcode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MaterialTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaterialGroupId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
CostPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
SalesPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
Currency = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
TotalStock = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
TrackingType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Scp_T_Material", x => x.Id);
table.ForeignKey(
name: "FK_Scp_T_Material_Scp_T_MaterialGroup_MaterialGroupId",
column: x => x.MaterialGroupId,
principalTable: "Scp_T_MaterialGroup",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Scp_T_Material_Scp_T_MaterialType_MaterialTypeId",
column: x => x.MaterialTypeId,
principalTable: "Scp_T_MaterialType",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Str_T_PutawayCondition",
columns: table => new
@ -4351,6 +4426,105 @@ namespace Erp.Platform.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "MaterialUom",
columns: table => new
{
AlternativeUomsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
MaterialsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MaterialUom", x => new { x.AlternativeUomsId, x.MaterialsId });
table.ForeignKey(
name: "FK_MaterialUom_Adm_T_Uom_AlternativeUomsId",
column: x => x.AlternativeUomsId,
principalTable: "Adm_T_Uom",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_MaterialUom_Scp_T_Material_MaterialsId",
column: x => x.MaterialsId,
principalTable: "Scp_T_Material",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Mrp_T_Bom",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BomTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Version = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
ValidFrom = table.Column<DateTime>(type: "datetime2", nullable: false),
ValidTo = table.Column<DateTime>(type: "datetime2", nullable: true),
BaseQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 1m),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Mrp_T_Bom", x => x.Id);
table.ForeignKey(
name: "FK_Mrp_T_Bom_Mrp_T_BomType_BomTypeId",
column: x => x.BomTypeId,
principalTable: "Mrp_T_BomType",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Mrp_T_Bom_Scp_T_Material_MaterialId",
column: x => x.MaterialId,
principalTable: "Scp_T_Material",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Scp_T_MaterialSpecification",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SpecificationName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
SpecificationValue = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
UnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IsRequired = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Scp_T_MaterialSpecification", x => x.Id);
table.ForeignKey(
name: "FK_Scp_T_MaterialSpecification_Adm_T_Uom_UnitId",
column: x => x.UnitId,
principalTable: "Adm_T_Uom",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Scp_T_MaterialSpecification_Scp_T_Material_MaterialId",
column: x => x.MaterialId,
principalTable: "Scp_T_Material",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Sas_H_District",
columns: table => new
@ -4604,6 +4778,11 @@ namespace Erp.Platform.Migrations
principalTable: "Sas_T_Sector",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Adm_T_Partner_Scp_T_Material_MaterialId",
column: x => x.MaterialId,
principalTable: "Scp_T_Material",
principalColumn: "Id");
table.ForeignKey(
name: "FK_Adm_T_Partner_Scp_T_PaymentTerm_PaymentTermId",
column: x => x.PaymentTermId,
@ -4727,163 +4906,6 @@ namespace Erp.Platform.Migrations
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Adm_T_Uom",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UomCategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Type = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
Ratio = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
Rounding = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Adm_T_Uom", x => x.Id);
table.ForeignKey(
name: "FK_Adm_T_Uom_Adm_T_UomCategory_UomCategoryId",
column: x => x.UomCategoryId,
principalTable: "Adm_T_UomCategory",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Scp_T_Material",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Barcode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MaterialTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaterialGroupId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UomId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CostPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
SalesPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
Currency = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
TotalStock = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
TrackingType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Scp_T_Material", x => x.Id);
table.ForeignKey(
name: "FK_Scp_T_Material_Adm_T_Uom_UomId",
column: x => x.UomId,
principalTable: "Adm_T_Uom",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Scp_T_Material_Scp_T_MaterialGroup_MaterialGroupId",
column: x => x.MaterialGroupId,
principalTable: "Scp_T_MaterialGroup",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Scp_T_Material_Scp_T_MaterialType_MaterialTypeId",
column: x => x.MaterialTypeId,
principalTable: "Scp_T_MaterialType",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Mrp_T_Bom",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BomTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Version = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
ValidFrom = table.Column<DateTime>(type: "datetime2", nullable: false),
ValidTo = table.Column<DateTime>(type: "datetime2", nullable: true),
BaseQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 1m),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Mrp_T_Bom", x => x.Id);
table.ForeignKey(
name: "FK_Mrp_T_Bom_Mrp_T_BomType_BomTypeId",
column: x => x.BomTypeId,
principalTable: "Mrp_T_BomType",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Mrp_T_Bom_Scp_T_Material_MaterialId",
column: x => x.MaterialId,
principalTable: "Scp_T_Material",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Scp_T_MaterialSpecification",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SpecificationName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
SpecificationValue = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
UnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IsRequired = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Scp_T_MaterialSpecification", x => x.Id);
table.ForeignKey(
name: "FK_Scp_T_MaterialSpecification_Adm_T_Uom_UnitId",
column: x => x.UnitId,
principalTable: "Adm_T_Uom",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Scp_T_MaterialSpecification_Scp_T_Material_MaterialId",
column: x => x.MaterialId,
principalTable: "Scp_T_Material",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Crm_T_Activity",
columns: table => new
@ -5262,7 +5284,8 @@ namespace Erp.Platform.Migrations
BaseSalary = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
Currency = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: false),
PayrollGroup = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
BankAccountId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
BankId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IbanNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
BadgeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
EmployeeStatus = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
@ -5278,9 +5301,9 @@ namespace Erp.Platform.Migrations
{
table.PrimaryKey("PK_Hr_T_Employee", x => x.Id);
table.ForeignKey(
name: "FK_Hr_T_Employee_Acc_T_BankAccount_BankAccountId",
column: x => x.BankAccountId,
principalTable: "Acc_T_BankAccount",
name: "FK_Hr_T_Employee_Acc_T_Bank_BankId",
column: x => x.BankId,
principalTable: "Acc_T_Bank",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
@ -5412,7 +5435,7 @@ namespace Erp.Platform.Migrations
WorkcenterId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SpecificationName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
SpecificationValue = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
UomId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Uom = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsRequired = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
@ -5425,12 +5448,6 @@ namespace Erp.Platform.Migrations
constraints: table =>
{
table.PrimaryKey("PK_Mnt_T_WorkcenterSpecification", x => x.Id);
table.ForeignKey(
name: "FK_Mnt_T_WorkcenterSpecification_Adm_T_Uom_UomId",
column: x => x.UomId,
principalTable: "Adm_T_Uom",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Mnt_T_WorkcenterSpecification_Mnt_T_Workcenter_WorkcenterId",
column: x => x.WorkcenterId,
@ -6106,7 +6123,7 @@ namespace Erp.Platform.Migrations
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OperationId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
UomId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Uom = table.Column<string>(type: "nvarchar(max)", nullable: false),
ScrapPercentage = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
IsPhantom = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
Position = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
@ -6124,12 +6141,6 @@ namespace Erp.Platform.Migrations
constraints: table =>
{
table.PrimaryKey("PK_Mrp_T_BomComponent", x => x.Id);
table.ForeignKey(
name: "FK_Mrp_T_BomComponent_Adm_T_Uom_UomId",
column: x => x.UomId,
principalTable: "Adm_T_Uom",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Mrp_T_BomComponent_Mrp_T_Bom_BomId",
column: x => x.BomId,
@ -6428,7 +6439,7 @@ namespace Erp.Platform.Migrations
RequestId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
UomId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Uom = table.Column<string>(type: "nvarchar(max)", nullable: false),
EstimatedPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
Specification = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
Justification = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
@ -6444,12 +6455,6 @@ namespace Erp.Platform.Migrations
constraints: table =>
{
table.PrimaryKey("PK_Scp_T_RequestItem", x => x.Id);
table.ForeignKey(
name: "FK_Scp_T_RequestItem_Adm_T_Uom_UomId",
column: x => x.UomId,
principalTable: "Adm_T_Uom",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Scp_T_RequestItem_Scp_T_Material_MaterialId",
column: x => x.MaterialId,
@ -6615,7 +6620,7 @@ namespace Erp.Platform.Migrations
Capacity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
CurrentStock = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
Kind = table.Column<int>(type: "int", nullable: false),
UomId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
@ -6628,11 +6633,6 @@ namespace Erp.Platform.Migrations
constraints: table =>
{
table.PrimaryKey("PK_Str_T_Location", x => x.Id);
table.ForeignKey(
name: "FK_Str_T_Location_Adm_T_Uom_UomId",
column: x => x.UomId,
principalTable: "Adm_T_Uom",
principalColumn: "Id");
table.ForeignKey(
name: "FK_Str_T_Location_Str_T_LocationType_LocationTypeId",
column: x => x.LocationTypeId,
@ -6986,11 +6986,6 @@ namespace Erp.Platform.Migrations
table: "Adm_T_SkillLevel",
column: "SkillTypeId");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_Uom_MaterialId",
table: "Adm_T_Uom",
column: "MaterialId");
migrationBuilder.CreateIndex(
name: "IX_Adm_T_Uom_UomCategoryId",
table: "Adm_T_Uom",
@ -7184,9 +7179,9 @@ namespace Erp.Platform.Migrations
column: "BadgeId");
migrationBuilder.CreateIndex(
name: "IX_Hr_T_Employee_BankAccountId",
name: "IX_Hr_T_Employee_BankId",
table: "Hr_T_Employee",
column: "BankAccountId");
column: "BankId");
migrationBuilder.CreateIndex(
name: "IX_Hr_T_Employee_DepartmentId",
@ -7293,6 +7288,11 @@ namespace Erp.Platform.Migrations
table: "MaintenanceWorkorderMaterial",
column: "WorkOrderId");
migrationBuilder.CreateIndex(
name: "IX_MaterialUom_MaterialsId",
table: "MaterialUom",
column: "MaterialsId");
migrationBuilder.CreateIndex(
name: "IX_Mnt_T_Fault_FaultStatusId",
table: "Mnt_T_Fault",
@ -7338,11 +7338,6 @@ namespace Erp.Platform.Migrations
table: "Mnt_T_Workcenter",
column: "WorkcenterTypeId");
migrationBuilder.CreateIndex(
name: "IX_Mnt_T_WorkcenterSpecification_UomId",
table: "Mnt_T_WorkcenterSpecification",
column: "UomId");
migrationBuilder.CreateIndex(
name: "IX_Mnt_T_WorkcenterSpecification_WorkcenterId",
table: "Mnt_T_WorkcenterSpecification",
@ -7373,11 +7368,6 @@ namespace Erp.Platform.Migrations
table: "Mrp_T_BomComponent",
column: "OperationId");
migrationBuilder.CreateIndex(
name: "IX_Mrp_T_BomComponent_UomId",
table: "Mrp_T_BomComponent",
column: "UomId");
migrationBuilder.CreateIndex(
name: "IX_Mrp_T_BomOperation_BomId",
table: "Mrp_T_BomOperation",
@ -7729,11 +7719,6 @@ namespace Erp.Platform.Migrations
table: "Scp_T_Material",
column: "MaterialTypeId");
migrationBuilder.CreateIndex(
name: "IX_Scp_T_Material_UomId",
table: "Scp_T_Material",
column: "UomId");
migrationBuilder.CreateIndex(
name: "IX_Scp_T_MaterialGroup_ParentGroupId",
table: "Scp_T_MaterialGroup",
@ -7774,21 +7759,11 @@ namespace Erp.Platform.Migrations
table: "Scp_T_RequestItem",
column: "RequestId");
migrationBuilder.CreateIndex(
name: "IX_Scp_T_RequestItem_UomId",
table: "Scp_T_RequestItem",
column: "UomId");
migrationBuilder.CreateIndex(
name: "IX_Str_T_Location_LocationTypeId",
table: "Str_T_Location",
column: "LocationTypeId");
migrationBuilder.CreateIndex(
name: "IX_Str_T_Location_UomId",
table: "Str_T_Location",
column: "UomId");
migrationBuilder.CreateIndex(
name: "IX_Str_T_Location_WarehouseId",
table: "Str_T_Location",
@ -7867,20 +7842,6 @@ namespace Erp.Platform.Migrations
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Adm_T_Partner_Scp_T_Material_MaterialId",
table: "Adm_T_Partner",
column: "MaterialId",
principalTable: "Scp_T_Material",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Adm_T_Uom_Scp_T_Material_MaterialId",
table: "Adm_T_Uom",
column: "MaterialId",
principalTable: "Scp_T_Material",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Crm_T_Activity_Crm_T_Opportunity_OpportunityId",
table: "Crm_T_Activity",
@ -7931,8 +7892,8 @@ namespace Erp.Platform.Migrations
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Acc_T_BankAccount_Acc_T_Bank_BankId",
table: "Acc_T_BankAccount");
name: "FK_Hr_T_Employee_Acc_T_Bank_BankId",
table: "Hr_T_Employee");
migrationBuilder.DropForeignKey(
name: "FK_Hr_T_CostCenter_Hr_T_Employee_ResponsibleEmployeeId",
@ -7942,10 +7903,6 @@ namespace Erp.Platform.Migrations
name: "FK_Hr_T_Department_Hr_T_Employee_ManagerId",
table: "Hr_T_Department");
migrationBuilder.DropForeignKey(
name: "FK_Adm_T_Uom_Scp_T_Material_MaterialId",
table: "Adm_T_Uom");
migrationBuilder.DropForeignKey(
name: "FK_Hr_T_CostCenter_Hr_T_Department_DepartmentId",
table: "Hr_T_CostCenter");
@ -8022,6 +7979,9 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "AbpUserTokens");
migrationBuilder.DropTable(
name: "Acc_T_BankAccount");
migrationBuilder.DropTable(
name: "Acc_T_Cash");
@ -8166,6 +8126,9 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "MaintenanceWorkorderMaterial");
migrationBuilder.DropTable(
name: "MaterialUom");
migrationBuilder.DropTable(
name: "Mnt_T_Fault");
@ -8457,6 +8420,9 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Scp_T_Approval");
migrationBuilder.DropTable(
name: "Adm_T_Uom");
migrationBuilder.DropTable(
name: "Scp_T_Request");
@ -8517,6 +8483,9 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Mrp_T_BomType");
migrationBuilder.DropTable(
name: "Scp_T_Material");
migrationBuilder.DropTable(
name: "Mrp_T_OperationType");
@ -8547,6 +8516,9 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Sas_T_ReportCategory");
migrationBuilder.DropTable(
name: "Adm_T_UomCategory");
migrationBuilder.DropTable(
name: "Scp_T_RequestType");
@ -8562,6 +8534,12 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Mnt_T_Workcenter");
migrationBuilder.DropTable(
name: "Scp_T_MaterialGroup");
migrationBuilder.DropTable(
name: "Scp_T_MaterialType");
migrationBuilder.DropTable(
name: "Mrp_T_OperationCategory");
@ -8583,9 +8561,6 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Hr_T_Employee");
migrationBuilder.DropTable(
name: "Acc_T_BankAccount");
migrationBuilder.DropTable(
name: "Hr_T_Badge");
@ -8595,21 +8570,6 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Hr_T_JobPosition");
migrationBuilder.DropTable(
name: "Scp_T_Material");
migrationBuilder.DropTable(
name: "Adm_T_Uom");
migrationBuilder.DropTable(
name: "Scp_T_MaterialGroup");
migrationBuilder.DropTable(
name: "Scp_T_MaterialType");
migrationBuilder.DropTable(
name: "Adm_T_UomCategory");
migrationBuilder.DropTable(
name: "Hr_T_Department");

View file

@ -1663,8 +1663,9 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<Guid>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ValidFrom")
.HasColumnType("datetime2");
@ -1680,8 +1681,6 @@ namespace Erp.Platform.Migrations
b.HasIndex("OperationId");
b.HasIndex("UomId");
b.ToTable("Mrp_T_BomComponent", (string)null);
});
@ -4471,7 +4470,7 @@ namespace Erp.Platform.Migrations
b.Property<Guid?>("BadgeId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("BankAccountId")
b.Property<Guid?>("BankId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("BaseSalary")
@ -4548,6 +4547,10 @@ namespace Erp.Platform.Migrations
b.Property<DateTime>("HireDate")
.HasColumnType("datetime2");
b.Property<string>("IbanNumber")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
@ -4613,7 +4616,7 @@ namespace Erp.Platform.Migrations
b.HasIndex("BadgeId");
b.HasIndex("BankAccountId");
b.HasIndex("BankId");
b.HasIndex("DepartmentId");
@ -6672,8 +6675,8 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<Guid?>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("WarehouseId")
.HasColumnType("uniqueidentifier");
@ -6685,8 +6688,6 @@ namespace Erp.Platform.Migrations
b.HasIndex("LocationTypeId");
b.HasIndex("UomId");
b.HasIndex("WarehouseId");
b.HasIndex("ZoneId");
@ -7519,8 +7520,8 @@ namespace Erp.Platform.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<Guid?>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
@ -7528,8 +7529,6 @@ namespace Erp.Platform.Migrations
b.HasIndex("MaterialTypeId");
b.HasIndex("UomId");
b.ToTable("Scp_T_Material", (string)null);
});
@ -10764,8 +10763,9 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<Guid>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
@ -10773,8 +10773,6 @@ namespace Erp.Platform.Migrations
b.HasIndex("RequestId");
b.HasIndex("UomId");
b.ToTable("Scp_T_RequestItem", (string)null);
});
@ -12638,9 +12636,6 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<Guid?>("MaterialId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
@ -12668,8 +12663,6 @@ namespace Erp.Platform.Migrations
b.HasKey("Id");
b.HasIndex("MaterialId");
b.HasIndex("UomCategoryId");
b.ToTable("Adm_T_Uom", (string)null);
@ -13389,16 +13382,15 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<Guid>("UomId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Uom")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<Guid>("WorkcenterId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("UomId");
b.HasIndex("WorkcenterId");
b.ToTable("Mnt_T_WorkcenterSpecification", (string)null);
@ -14024,6 +14016,21 @@ namespace Erp.Platform.Migrations
b.ToTable("Plat_H_SettingDefinition", (string)null);
});
modelBuilder.Entity("MaterialUom", b =>
{
b.Property<Guid>("AlternativeUomsId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("MaterialsId")
.HasColumnType("uniqueidentifier");
b.HasKey("AlternativeUomsId", "MaterialsId");
b.HasIndex("MaterialsId");
b.ToTable("MaterialUom");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
@ -16019,19 +16026,11 @@ namespace Erp.Platform.Migrations
.WithMany()
.HasForeignKey("OperationId");
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany()
.HasForeignKey("UomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Bom");
b.Navigation("Material");
b.Navigation("Operation");
b.Navigation("Uom");
});
modelBuilder.Entity("Erp.Platform.Entities.BomOperation", b =>
@ -16290,9 +16289,9 @@ namespace Erp.Platform.Migrations
.WithMany()
.HasForeignKey("BadgeId");
b.HasOne("Erp.Platform.Entities.BankAccount", "BankAccount")
b.HasOne("Erp.Platform.Entities.Bank", "Bank")
.WithMany()
.HasForeignKey("BankAccountId")
.HasForeignKey("BankId")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("Erp.Platform.Entities.Department", "Department")
@ -16313,7 +16312,7 @@ namespace Erp.Platform.Migrations
b.Navigation("Badge");
b.Navigation("BankAccount");
b.Navigation("Bank");
b.Navigation("Department");
@ -16508,10 +16507,6 @@ namespace Erp.Platform.Migrations
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany()
.HasForeignKey("UomId");
b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse")
.WithMany("Locations")
.HasForeignKey("WarehouseId")
@ -16526,8 +16521,6 @@ namespace Erp.Platform.Migrations
b.Navigation("LocationType");
b.Navigation("Uom");
b.Navigation("Warehouse");
b.Navigation("Zone");
@ -16637,16 +16630,9 @@ namespace Erp.Platform.Migrations
.HasForeignKey("MaterialTypeId")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany("Materials")
.HasForeignKey("UomId")
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("MaterialGroup");
b.Navigation("MaterialType");
b.Navigation("Uom");
});
modelBuilder.Entity("Erp.Platform.Entities.MaterialGroup", b =>
@ -17016,17 +17002,9 @@ namespace Erp.Platform.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany()
.HasForeignKey("UomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Material");
b.Navigation("Request");
b.Navigation("Uom");
});
modelBuilder.Entity("Erp.Platform.Entities.Reservation", b =>
@ -17220,10 +17198,6 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.Uom", b =>
{
b.HasOne("Erp.Platform.Entities.Material", null)
.WithMany("AlternativeUoms")
.HasForeignKey("MaterialId");
b.HasOne("Erp.Platform.Entities.UomCategory", "UomCategory")
.WithMany("Uoms")
.HasForeignKey("UomCategoryId")
@ -17287,20 +17261,12 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.WorkcenterSpecification", b =>
{
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
.WithMany()
.HasForeignKey("UomId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter")
.WithMany("Specifications")
.HasForeignKey("WorkcenterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Uom");
b.Navigation("Workcenter");
});
@ -17352,6 +17318,21 @@ namespace Erp.Platform.Migrations
b.Navigation("Category");
});
modelBuilder.Entity("MaterialUom", b =>
{
b.HasOne("Erp.Platform.Entities.Uom", null)
.WithMany()
.HasForeignKey("AlternativeUomsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Erp.Platform.Entities.Material", null)
.WithMany()
.HasForeignKey("MaterialsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
@ -17700,8 +17681,6 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
{
b.Navigation("AlternativeUoms");
b.Navigation("BomComponents");
b.Navigation("Boms");
@ -17883,8 +17862,6 @@ namespace Erp.Platform.Migrations
modelBuilder.Entity("Erp.Platform.Entities.Uom", b =>
{
b.Navigation("MaterialSpecifications");
b.Navigation("Materials");
});
modelBuilder.Entity("Erp.Platform.Entities.UomCategory", b =>

View file

@ -2900,7 +2900,7 @@
"managerCode": null,
"currency": "TRY",
"payrollGroup": "Monthly",
"bankAccountNumber": "1",
"ibanNumber": "TR330006200001123456789012",
"badgeCode": "B001",
"employeeStatus": "Aktif",
"isActive": true,
@ -2940,7 +2940,7 @@
"managerCode": "EMP-001",
"currency": "TRY",
"payrollGroup": "Monthly",
"bankAccountNumber": "2",
"ibanNumber": "TR330006200001123456781112",
"badgeCode": "B002",
"employeeStatus": "Aktif",
"isActive": true,
@ -2980,7 +2980,7 @@
"managerCode": "EMP-001",
"currency": "TRY",
"payrollGroup": "Monthly",
"bankAccountNumber": "2",
"ibanNumber": "TR322006200001123456781112",
"badgeCode": "B003",
"employeeStatus": "Aktif",
"isActive": true,
@ -3020,7 +3020,7 @@
"managerCode": "EMP-003",
"currency": "TRY",
"payrollGroup": "Monthly",
"bankAccountNumber": "3",
"ibanNumber": "TR110006200001123456781112",
"badgeCode": "B004",
"employeeStatus": "Aktif",
"isActive": true,
@ -3060,7 +3060,7 @@
"managerCode": "EMP-001",
"currency": "TRY",
"payrollGroup": "Monthly",
"bankAccountNumber": "4",
"ibanNumber": "TR440006200001123456782222",
"badgeCode": "B005",
"employeeStatus": "Aktif",
"isActive": true,
@ -4288,7 +4288,7 @@
"description": "Çelik Levha 2mm",
"materialTypeCode": "RAW",
"materialGroupCode": "METAL",
"uomName": "Adet",
"uom": "Adet",
"costPrice": 15.5,
"salesPrice": 18.75,
"currency": "TRY",
@ -4303,7 +4303,7 @@
"description": "Alüminyum Profil 40x40",
"materialTypeCode": "SEMI",
"materialGroupCode": "METAL",
"uomName": "kg",
"uom": "kg",
"costPrice": 45.0,
"salesPrice": 55.0,
"currency": "TRY",
@ -4318,7 +4318,7 @@
"description": "Motor Grubu A-Type",
"materialTypeCode": "FINISHED",
"materialGroupCode": "MOTOR",
"uomName": "Adet",
"uom": "Adet",
"costPrice": 850.0,
"salesPrice": 1200.0,
"currency": "TRY",
@ -4333,7 +4333,7 @@
"description": "Kesme Yağı Premium",
"materialTypeCode": "FINISHED",
"materialGroupCode": "PLASTIK",
"uomName": "Adet",
"uom": "Adet",
"costPrice": 25.0,
"salesPrice": 35.0,
"currency": "TRY",
@ -4348,7 +4348,7 @@
"description": "Plastik Kapak",
"materialTypeCode": "SEMI",
"materialGroupCode": "KIMYA",
"uomName": "Adet",
"uom": "Adet",
"costPrice": 8.5,
"salesPrice": 15.0,
"currency": "TRY",
@ -5379,7 +5379,7 @@
"capacity": 100,
"currentStock": 75,
"kind": 2,
"uomName": "Kg",
"uom": "Kg",
"isActive": true
},
{
@ -5392,7 +5392,7 @@
"capacity": 50,
"currentStock": 30,
"kind": 10,
"uomName": "Kg",
"uom": "Kg",
"isActive": true
},
{
@ -5405,7 +5405,7 @@
"capacity": 200,
"currentStock": 180,
"kind": 3,
"uomName": "Kg",
"uom": "Kg",
"isActive": true
},
{
@ -5418,7 +5418,7 @@
"capacity": 200,
"currentStock": 180,
"kind": 1,
"uomName": "Kg",
"uom": "Kg",
"isActive": true
},
{
@ -5431,7 +5431,7 @@
"capacity": 200,
"currentStock": 180,
"kind": 8,
"uomName": "Adet",
"uom": "Adet",
"isActive": true
}
],
@ -5696,7 +5696,7 @@
"materialCode": "MT001",
"operationCode": "OP001",
"quantity": 2,
"uomName": "Adet",
"uom": "Adet",
"scrapPercentage": 0.05,
"isPhantom": false,
"validFrom": "2024-01-01T00:00:00.000Z",
@ -5708,7 +5708,7 @@
"materialCode": "MT002",
"operationCode": "OP001",
"quantity": 4,
"uomName": "Adet",
"uom": "Adet",
"scrapPercentage": 0.01,
"validFrom": "2024-01-01T00:00:00.000Z",
"isPhantom": false,
@ -5720,7 +5720,7 @@
"materialCode": "PR001",
"operationCode": "OP001",
"quantity": 1,
"uomName": "Adet",
"uom": "Adet",
"scrapPercentage": 0.01,
"isPhantom": false,
"validFrom": "2024-01-01T00:00:00.000Z",
@ -5732,7 +5732,7 @@
"materialCode": "MT002",
"operationCode": "OP001",
"quantity": 1,
"uomName": "Adet",
"uom": "Adet",
"scrapPercentage": 0.01,
"isPhantom": false,
"validFrom": "2024-01-01T00:00:00.000Z",

View file

@ -71,7 +71,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
private readonly IRepository<CostCenter, Guid> _costCenterRepository;
private readonly IRepository<Employee, Guid> _employeeRepository;
private readonly IRepository<Bank, Guid> _bankRepository;
private readonly IRepository<BankAccount, Guid> _bankAccountRepository;
private readonly IRepository<Leave, Guid> _leaveRepository;
private readonly IRepository<Overtime, Guid> _overtimeRepository;
private readonly IRepository<Payroll, Guid> _payrollRepository;
@ -183,7 +182,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
IRepository<Employee, Guid> employeeRepository,
IRepository<Badge, Guid> badgeRepository,
IRepository<Bank, Guid> bankRepository,
IRepository<BankAccount, Guid> bankAccountRepository,
IRepository<Leave, Guid> leaveRepository,
IRepository<Overtime, Guid> overtimeRepository,
IRepository<Payroll, Guid> payrollRepository,
@ -295,7 +293,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
_employeeRepository = employeeRepository;
_badgeRepository = badgeRepository;
_bankRepository = bankRepository;
_bankAccountRepository = bankAccountRepository;
_leaveRepository = leaveRepository;
_overtimeRepository = overtimeRepository;
_payrollRepository = payrollRepository;
@ -1090,7 +1087,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode);
var jobPosition = await _jobPositionRepository.FirstOrDefaultAsync(x => x.Code == item.JobPositionCode);
var manager = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.ManagerCode);
var bankAccount = await _bankAccountRepository.FirstOrDefaultAsync(x => x.AccountNumber == item.BankAccountNumber);
var bank = await _bankRepository.FirstOrDefaultAsync(x => x.Code == item.BankCode);
var badge = await _badgeRepository.FirstOrDefaultAsync(x => x.Code == item.BadgeCode);
await _employeeRepository.InsertAsync(new Employee
@ -1120,17 +1117,18 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
HireDate = item.HireDate,
TerminationDate = item.TerminationDate != null ? item.TerminationDate : null,
EmploymentTypeId = employmentType != null ? employmentType.Id : null,
JobPositionId = jobPosition != null ? jobPosition.Id : null,
DepartmentId = department != null ? department.Id : null,
EmploymentTypeId = employmentType?.Id,
JobPositionId = jobPosition?.Id,
DepartmentId = department?.Id,
WorkLocation = item.WorkLocation,
BaseSalary = item.BaseSalary,
ManagerId = manager != null ? manager.Id : null,
ManagerId = manager?.Id,
Currency = item.Currency,
PayrollGroup = item.PayrollGroup,
BankAccountId = bankAccount != null ? bankAccount.Id : null,
BankId = bank?.Id,
IbanNumber = item.IbanNumber,
BadgeId = badge != null ? badge.Id : null,
BadgeId = badge?.Id,
EmployeeStatus = item.EmployeeStatus,
IsActive = item.IsActive
}, autoSave: true);
@ -1754,14 +1752,13 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
var type = await _materialTypeRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialTypeCode);
var group = await _materialGroupRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialGroupCode);
var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.UomName);
await _materialRepository.InsertAsync(new Material
{
Code = item.Code,
Name = item.Name,
Description = item.Description,
UomId = uom?.Id,
Uom = item.Uom,
CostPrice = item.CostPrice,
SalesPrice = item.SalesPrice,
Currency = item.Currency,
@ -2250,7 +2247,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode);
var zone = await _zoneRepository.FirstOrDefaultAsync(x => x.Code == item.ZoneCode);
var locationtype = await _locationTypeRepository.FirstOrDefaultAsync(x => x.Code == item.LocationTypeCode);
var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.UomName);
var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.Uom);
await _locationRepository.InsertAsync(new Location
{
@ -2263,7 +2260,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
IsActive = item.IsActive,
Capacity = item.Capacity,
Kind = item.Kind,
UomId = uom?.Id,
Uom = item.Uom,
CurrentStock = item.CurrentStock
}, autoSave: true);
}
@ -2400,7 +2397,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
{
var bom = await _bomRepository.FirstOrDefaultAsync(x => x.Code == item.BomCode);
var material = await _materialRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialCode);
var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.UomName);
var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.Uom);
var operation = await _operationRepository.FirstOrDefaultAsync(x => x.Code == item.OperationCode);
var exists = await _bomComponentRepository.AnyAsync(x => x.BomId == bom.Id && x.MaterialId == material.Id);
@ -2413,7 +2410,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
MaterialId = material?.Id,
OperationId = operation?.Id,
Quantity = item.Quantity,
UomId = uom?.Id,
Uom = item.Uom,
ScrapPercentage = item.ScrapPercentage,
IsPhantom = item.IsPhantom,
Position = item.Position,

View file

@ -150,7 +150,7 @@ public class BomComponentSeedDto
public string OperationCode { get; set; }
public decimal Quantity { get; set; }
public string UomName { get; set; }
public string Uom { get; set; }
public decimal ScrapPercentage { get; set; }
public bool IsPhantom { get; set; }
@ -247,7 +247,7 @@ public class LocationSeedDto
public decimal Capacity { get; set; }
public decimal CurrentStock { get; set; }
public int Kind { get; set; }
public string UomName { get; set; }
public string Uom { get; set; }
public bool IsActive { get; set; }
}
@ -528,7 +528,7 @@ public class MaterialSeedDto
public string Description { get; set; }
public string MaterialTypeCode { get; set; }
public string MaterialGroupCode { get; set; }
public string UomName { get; set; }
public string Uom { get; set; }
public decimal CostPrice { get; set; }
public decimal SalesPrice { get; set; }
public string Currency { get; set; }
@ -828,7 +828,8 @@ public class EmployeeSeedDto
public string Currency { get; set; }
public string PayrollGroup { get; set; }
public string BankAccountNumber { get; set; }
public string BankCode { get; set; }
public string IbanNumber { get; set; }
public string BadgeCode { get; set; }
public string EmployeeStatus { get; set; }

View file

@ -4319,6 +4319,8 @@ h-1.5
h-2.5
h-3.5
h-1.2
h-1.3
h-1.4
h-1/2
h-1/3
h-2/3
@ -4379,6 +4381,8 @@ w-1.5
w-2.5
w-3.5
w-1.2
w-1.3
w-1.4
w-1/2
w-1/3
w-2/3
@ -4450,6 +4454,8 @@ ml-1.5
ml-2.5
ml-3.5
ml-1.2
ml-1.3
ml-1.4
mr-0
mr-1
mr-2
@ -4487,4 +4493,6 @@ mr-1.5
mr-2.5
mr-3.5
mr-1.2
mr-1.3
mr-1.4
erp-*

View file

@ -1,5 +1,5 @@
.menu-item {
@apply cursor-pointer font-medium rounded-md flex items-center w-full whitespace-nowrap px-1.2;
@apply cursor-pointer font-medium rounded-md flex items-center w-full whitespace-nowrap px-1.3;
&.menu-item-light {
@apply text-gray-600;

View file

@ -36,7 +36,9 @@ export default {
},
},
spacing: {
'1.2': '0.3rem', // istediğin değeri yaz
'1.2': '0.35rem', // istediğin değeri yaz
'1.3': '0.40rem', // istediğin değeri yaz
'1.4': '0.45rem', // istediğin değeri yaz
},
},
},