Update Model, Tables Products in API
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 4m56s
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 4m56s
This commit is contained in:
parent
7c7dc287df
commit
e41dc8747d
15
Domain/Entities/EBusinessUnit.cs
Normal file
15
Domain/Entities/EBusinessUnit.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
namespace Domain.Entities
|
||||||
|
{
|
||||||
|
public class EBusinessUnit
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string? Code { get; set; }
|
||||||
|
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
public string? Manager { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
28
Domain/Entities/EProduct.cs
Normal file
28
Domain/Entities/EProduct.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
namespace Domain.Entities
|
||||||
|
{
|
||||||
|
public class EProduct
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int? BusinessunitsId { get; set; }
|
||||||
|
|
||||||
|
public string? Name { get; set; }
|
||||||
|
|
||||||
|
public string Description { get; set; } = null!;
|
||||||
|
|
||||||
|
public int? Categoryid { get; set; }
|
||||||
|
|
||||||
|
public string? Origin { get; set; }
|
||||||
|
|
||||||
|
public decimal Baseprice { get; set; }
|
||||||
|
|
||||||
|
public string Currency { get; set; } = null!;
|
||||||
|
|
||||||
|
public bool Isactive { get; set; }
|
||||||
|
|
||||||
|
public virtual EBusinessUnit? Businessunits { get; set; }
|
||||||
|
|
||||||
|
public virtual EProductCategory? Category { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
14
Domain/Entities/EProductCategory.cs
Normal file
14
Domain/Entities/EProductCategory.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
namespace Domain.Entities
|
||||||
|
{
|
||||||
|
public class EProductCategory
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; } = null!;
|
||||||
|
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
public bool Isactive { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\maski\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\maski\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.13.2</NuGetToolVersion>
|
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.13.1</NuGetToolVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
<SourceRoot Include="C:\Users\maski\.nuget\packages\" />
|
<SourceRoot Include="C:\Users\maski\.nuget\packages\" />
|
||||||
|
|||||||
@ -10,4 +10,6 @@ public partial class PhOhTaxCondition
|
|||||||
public string Description { get; set; } = null!;
|
public string Description { get; set; } = null!;
|
||||||
|
|
||||||
public string CmpClase { get; set; } = null!;
|
public string CmpClase { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<PhSCustomer> PhSCustomers { get; set; } = new List<PhSCustomer>();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ public partial class PhSBusinessUnit
|
|||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
public string? Name { get; set; }
|
public string? Code { get; set; }
|
||||||
|
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
|||||||
@ -30,4 +30,6 @@ public partial class PhSCustomer
|
|||||||
public virtual ICollection<PhSCustomerDocument> PhSCustomerDocuments { get; set; } = new List<PhSCustomerDocument>();
|
public virtual ICollection<PhSCustomerDocument> PhSCustomerDocuments { get; set; } = new List<PhSCustomerDocument>();
|
||||||
|
|
||||||
public virtual ICollection<PhSQuoteHeader> PhSQuoteHeaders { get; set; } = new List<PhSQuoteHeader>();
|
public virtual ICollection<PhSQuoteHeader> PhSQuoteHeaders { get; set; } = new List<PhSQuoteHeader>();
|
||||||
|
|
||||||
|
public virtual PhOhTaxCondition? TaxCondition { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,23 @@ public partial class PhSProduct
|
|||||||
|
|
||||||
public int? BusinessunitsId { get; set; }
|
public int? BusinessunitsId { get; set; }
|
||||||
|
|
||||||
|
public string? Name { get; set; }
|
||||||
|
|
||||||
|
public string Description { get; set; } = null!;
|
||||||
|
|
||||||
|
public int? Categoryid { get; set; }
|
||||||
|
|
||||||
|
public string? Origin { get; set; }
|
||||||
|
|
||||||
|
public decimal Baseprice { get; set; }
|
||||||
|
|
||||||
|
public string Currency { get; set; } = null!;
|
||||||
|
|
||||||
|
public bool Isactive { get; set; }
|
||||||
|
|
||||||
public virtual PhSBusinessUnit? Businessunits { get; set; }
|
public virtual PhSBusinessUnit? Businessunits { get; set; }
|
||||||
|
|
||||||
|
public virtual PhSProductCategory? Category { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<PhSQuoteDetail> PhSQuoteDetails { get; set; } = new List<PhSQuoteDetail>();
|
public virtual ICollection<PhSQuoteDetail> PhSQuoteDetails { get; set; } = new List<PhSQuoteDetail>();
|
||||||
}
|
}
|
||||||
|
|||||||
17
Models/Models/PhSProductCategory.cs
Normal file
17
Models/Models/PhSProductCategory.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Models.Models;
|
||||||
|
|
||||||
|
public partial class PhSProductCategory
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; } = null!;
|
||||||
|
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
public bool Isactive { get; set; }
|
||||||
|
|
||||||
|
public virtual ICollection<PhSProduct> PhSProducts { get; set; } = new List<PhSProduct>();
|
||||||
|
}
|
||||||
@ -33,6 +33,8 @@ public partial class PhronCareOperationsHubContext : DbContext
|
|||||||
|
|
||||||
public virtual DbSet<PhSProduct> PhSProducts { get; set; }
|
public virtual DbSet<PhSProduct> PhSProducts { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<PhSProductCategory> PhSProductCategories { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<PhSQuoteDetail> PhSQuoteDetails { get; set; }
|
public virtual DbSet<PhSQuoteDetail> PhSQuoteDetails { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<PhSQuoteHeader> PhSQuoteHeaders { get; set; }
|
public virtual DbSet<PhSQuoteHeader> PhSQuoteHeaders { get; set; }
|
||||||
@ -46,7 +48,7 @@ public partial class PhronCareOperationsHubContext : DbContext
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
//=> optionsBuilder.UseSqlServer("data source=srv01.saludlab.com.ar,39458;initial catalog=phronCare_OperationsHub;User ID=sa;Password=HS|s[~xxQzTo/n>9jO;encrypt=False;trustServerCertificate=True;MultipleActiveResultSets=True");
|
// => optionsBuilder.UseSqlServer("data source=srv01.saludlab.com.ar,39458;initial catalog=phronCare_OperationsHub;User ID=sa;Password=HS|s[~xxQzTo/n>9jO;encrypt=False;trustServerCertificate=True;MultipleActiveResultSets=True");
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
@ -113,15 +115,15 @@ public partial class PhronCareOperationsHubContext : DbContext
|
|||||||
entity.ToTable("PhS_BusinessUnits");
|
entity.ToTable("PhS_BusinessUnits");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id");
|
entity.Property(e => e.Id).HasColumnName("id");
|
||||||
|
entity.Property(e => e.Code)
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnName("code");
|
||||||
entity.Property(e => e.Description)
|
entity.Property(e => e.Description)
|
||||||
.HasMaxLength(100)
|
.HasMaxLength(100)
|
||||||
.HasColumnName("description");
|
.HasColumnName("description");
|
||||||
entity.Property(e => e.Manager)
|
entity.Property(e => e.Manager)
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasColumnName("manager");
|
.HasColumnName("manager");
|
||||||
entity.Property(e => e.Name)
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnName("name");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<PhSCustomer>(entity =>
|
modelBuilder.Entity<PhSCustomer>(entity =>
|
||||||
@ -150,6 +152,10 @@ public partial class PhronCareOperationsHubContext : DbContext
|
|||||||
entity.HasOne(d => d.Accounttypes).WithMany(p => p.PhSCustomers)
|
entity.HasOne(d => d.Accounttypes).WithMany(p => p.PhSCustomers)
|
||||||
.HasForeignKey(d => d.AccounttypesId)
|
.HasForeignKey(d => d.AccounttypesId)
|
||||||
.HasConstraintName("FK_PhS_Customers_PhS_AccountTypes");
|
.HasConstraintName("FK_PhS_Customers_PhS_AccountTypes");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.TaxCondition).WithMany(p => p.PhSCustomers)
|
||||||
|
.HasForeignKey(d => d.TaxConditionId)
|
||||||
|
.HasConstraintName("FK_PhS_Customers_PhOH_Tax_Conditions");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<PhSCustomerAddress>(entity =>
|
modelBuilder.Entity<PhSCustomerAddress>(entity =>
|
||||||
@ -258,11 +264,54 @@ public partial class PhronCareOperationsHubContext : DbContext
|
|||||||
entity.ToTable("PhS_Products");
|
entity.ToTable("PhS_Products");
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id");
|
entity.Property(e => e.Id).HasColumnName("id");
|
||||||
|
entity.Property(e => e.Baseprice)
|
||||||
|
.HasColumnType("decimal(18, 2)")
|
||||||
|
.HasColumnName("baseprice");
|
||||||
entity.Property(e => e.BusinessunitsId).HasColumnName("businessunits_id");
|
entity.Property(e => e.BusinessunitsId).HasColumnName("businessunits_id");
|
||||||
|
entity.Property(e => e.Categoryid).HasColumnName("categoryid");
|
||||||
|
entity.Property(e => e.Currency)
|
||||||
|
.HasMaxLength(3)
|
||||||
|
.IsUnicode(false)
|
||||||
|
.HasDefaultValue("ARS")
|
||||||
|
.HasColumnName("currency");
|
||||||
|
entity.Property(e => e.Description).HasColumnName("description");
|
||||||
|
entity.Property(e => e.Isactive)
|
||||||
|
.HasDefaultValue(true)
|
||||||
|
.HasColumnName("isactive");
|
||||||
|
entity.Property(e => e.Name)
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.IsFixedLength()
|
||||||
|
.HasColumnName("name");
|
||||||
|
entity.Property(e => e.Origin)
|
||||||
|
.HasMaxLength(12)
|
||||||
|
.IsUnicode(false)
|
||||||
|
.HasColumnName("origin");
|
||||||
|
|
||||||
entity.HasOne(d => d.Businessunits).WithMany(p => p.PhSProducts)
|
entity.HasOne(d => d.Businessunits).WithMany(p => p.PhSProducts)
|
||||||
.HasForeignKey(d => d.BusinessunitsId)
|
.HasForeignKey(d => d.BusinessunitsId)
|
||||||
.HasConstraintName("FK_PhS_Products_PhS_BusinessUnits");
|
.HasConstraintName("FK_PhS_Products_PhS_BusinessUnits");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.Category).WithMany(p => p.PhSProducts)
|
||||||
|
.HasForeignKey(d => d.Categoryid)
|
||||||
|
.HasConstraintName("FK_PhS_Products_Categories");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<PhSProductCategory>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("PK__PhS_Prod__3214EC070BF59892");
|
||||||
|
|
||||||
|
entity.ToTable("PhS_ProductCategories");
|
||||||
|
|
||||||
|
entity.Property(e => e.Id).HasColumnName("id");
|
||||||
|
entity.Property(e => e.Description)
|
||||||
|
.HasMaxLength(250)
|
||||||
|
.HasColumnName("description");
|
||||||
|
entity.Property(e => e.Isactive)
|
||||||
|
.HasDefaultValue(true)
|
||||||
|
.HasColumnName("isactive");
|
||||||
|
entity.Property(e => e.Name)
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnName("name");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<PhSQuoteDetail>(entity =>
|
modelBuilder.Entity<PhSQuoteDetail>(entity =>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\maski\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\maski\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.13.2</NuGetToolVersion>
|
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.13.1</NuGetToolVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
<SourceRoot Include="C:\Users\maski\.nuget\packages\" />
|
<SourceRoot Include="C:\Users\maski\.nuget\packages\" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user