Add beam shear converting to DTO
This commit is contained in:
30
DataAccess/DTOs/DTOEntities/BeamShears/BeamShearActionDTO.cs
Normal file
30
DataAccess/DTOs/DTOEntities/BeamShears/BeamShearActionDTO.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
|
||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class BeamShearActionDTO : IBeamShearAction
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("ExternalForce")]
|
||||
public IFactoredForceTuple ExternalForce { get; set; } = new FactoredForceTupleDTO(Guid.Empty);
|
||||
[JsonProperty("SupportAction")]
|
||||
public IBeamShearAxisAction SupportAction { get; set; } = new BeamShearAxisActionDTO(Guid.Empty);
|
||||
|
||||
public BeamShearActionDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Models.Analyses;
|
||||
using StructureHelperLogics.Models.Analyses;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class BeamShearAnalysisDTO : IBeamShearAnalysis
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("Tags")]
|
||||
public string Tags { get; set; }
|
||||
[JsonProperty("Comment")]
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
[JsonProperty("Color")]
|
||||
public Color Color { get; set; }
|
||||
public IVersionProcessor VersionProcessor { get; set; } = new VersionProcessorDTO(Guid.NewGuid());
|
||||
public BeamShearAnalysisDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
|
||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class BeamShearAxisActionDTO : IBeamShearAxisAction
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("SupportForce")]
|
||||
public IFactoredForceTuple SupportForce { get; set; }
|
||||
[JsonProperty("SpanLoads")]
|
||||
public List<IBeamSpanLoad> ShearLoads { get; } = new();
|
||||
|
||||
public BeamShearAxisActionDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
|
||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class BeamShearCalculatorDTO : IBeamShearCalculator
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
[JsonProperty("InputData")]
|
||||
public IBeamShearCalculatorInputData InputData { get; set; } = new BeamShearCalculatorInputDataDTO(Guid.Empty);
|
||||
[JsonProperty("ShowTraceData")]
|
||||
public bool ShowTraceData { get; set; }
|
||||
[JsonIgnore]
|
||||
public IResult Result => throw new NotImplementedException();
|
||||
[JsonIgnore]
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public BeamShearCalculatorDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Run()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class BeamShearCalculatorInputDataDTO : IBeamShearCalculatorInputData
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Actions")]
|
||||
public List<IBeamShearAction> Actions { get; } = new();
|
||||
[JsonProperty("Sections")]
|
||||
public List<IBeamShearSection> Sections { get; } = new();
|
||||
[JsonProperty("Stirrups")]
|
||||
public List<IStirrup> Stirrups { get; } = new();
|
||||
public BeamShearCalculatorInputDataDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
DataAccess/DTOs/DTOEntities/BeamShears/BeamShearDTO.cs
Normal file
23
DataAccess/DTOs/DTOEntities/BeamShears/BeamShearDTO.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class BeamShearDTO : IBeamShear
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Repository")]
|
||||
public IBeamShearRepository Repository { get; set; } = new BeamShearRepositoryDTO(Guid.NewGuid());
|
||||
|
||||
public BeamShearDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class BeamShearRepositoryDTO : IBeamShearRepository
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Actions")]
|
||||
public List<IBeamShearAction> Actions { get; } = new();
|
||||
[JsonProperty("Sections")]
|
||||
public List<IBeamShearSection> Sections { get; } = new();
|
||||
[JsonProperty("Stirrups")]
|
||||
public List<IStirrup> Stirrups { get; } = new();
|
||||
[JsonProperty("Calculators")]
|
||||
public List<ICalculator> Calculators { get; } = new();
|
||||
public BeamShearRepositoryDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
|
||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class BeamShearSectionDTO : IBeamShearSection
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Name")]
|
||||
public string? Name { get; set; }
|
||||
[JsonProperty("Shape")]
|
||||
public IShape Shape { get; set; } = new RectangleShapeDTO(Guid.Empty);
|
||||
[JsonProperty("Material")]
|
||||
public IConcreteLibMaterial Material { get; set; }
|
||||
[JsonProperty("CenterCover")]
|
||||
public double CenterCover { get; set; }
|
||||
public BeamShearSectionDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class StirrupByDensityDTO : IStirrupByDensity
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Name")]
|
||||
public string? Name { get; set; } = string.Empty;
|
||||
[JsonProperty("StirrupDensity")]
|
||||
public double StirrupDensity { get; set; }
|
||||
[JsonProperty("CompressedGap")]
|
||||
public double CompressedGap { get; set; }
|
||||
|
||||
public StirrupByDensityDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
34
DataAccess/DTOs/DTOEntities/BeamShears/StirrupByRebarDTO.cs
Normal file
34
DataAccess/DTOs/DTOEntities/BeamShears/StirrupByRebarDTO.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class StirrupByRebarDTO : IStirrupByRebar
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; }
|
||||
[JsonProperty("Name")]
|
||||
public string? Name { get; set; }
|
||||
[JsonProperty("LegCount")]
|
||||
public double LegCount { get; set; }
|
||||
[JsonProperty("Diameter")]
|
||||
public double Diameter { get; set; }
|
||||
[JsonProperty("Material")]
|
||||
public IReinforcementLibMaterial Material { get; set; }
|
||||
[JsonProperty("Spacing")]
|
||||
public double Spacing { get; set; }
|
||||
[JsonProperty("CompressedGap")]
|
||||
public double CompressedGap { get; set; }
|
||||
|
||||
public StirrupByRebarDTO(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user