Test Pinned via API
This commit is contained in:
40
Shared/DataModels/Pinned.cs
Normal file
40
Shared/DataModels/Pinned.cs
Normal file
@ -0,0 +1,40 @@
|
||||
namespace OI.Metrology.Shared.DataModels;
|
||||
|
||||
public class Pinned : HeaderCommon
|
||||
{
|
||||
|
||||
public string PointA { get; set; }
|
||||
public string PointB { get; set; }
|
||||
public string PointC { get; set; }
|
||||
public string PointD { get; set; }
|
||||
public string PointE { get; set; }
|
||||
public string PointF { get; set; }
|
||||
public string PointG { get; set; }
|
||||
public string PointH { get; set; }
|
||||
public string PointI { get; set; }
|
||||
|
||||
public Pinned(HeaderCommon headerCommon, List<string> values)
|
||||
{
|
||||
ID = headerCommon.ID;
|
||||
InsertDate = headerCommon.InsertDate;
|
||||
AttachmentID = headerCommon.AttachmentID;
|
||||
Title = headerCommon.Title;
|
||||
Recipe = headerCommon.Recipe;
|
||||
Date = headerCommon.Date;
|
||||
ToolTypeID = headerCommon.ToolTypeID;
|
||||
ToolTypeName = headerCommon.ToolTypeName;
|
||||
Reactor = headerCommon.Reactor;
|
||||
RDS = headerCommon.RDS;
|
||||
PSN = headerCommon.PSN;
|
||||
PointA = values[0];
|
||||
PointB = values[1];
|
||||
PointC = values[2];
|
||||
PointD = values[3];
|
||||
PointE = values[4];
|
||||
PointF = values[5];
|
||||
PointG = values[6];
|
||||
PointH = values[7];
|
||||
PointI = values[8];
|
||||
}
|
||||
|
||||
}
|
15
Shared/Models/Stateless/IPinController.cs
Normal file
15
Shared/Models/Stateless/IPinController.cs
Normal file
@ -0,0 +1,15 @@
|
||||
namespace OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
public interface IPinController<T>
|
||||
{
|
||||
|
||||
enum Action : int
|
||||
{
|
||||
Index = 0,
|
||||
MarkAsPinned = 1
|
||||
}
|
||||
|
||||
static string GetRouteName() => nameof(IPinController<T>)[1..^10];
|
||||
T MarkAsPinned(DataModels.HeaderCommon headerCommon);
|
||||
|
||||
}
|
20
Shared/Models/Stateless/IPinRepository.cs
Normal file
20
Shared/Models/Stateless/IPinRepository.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using OI.Metrology.Shared.DataModels;
|
||||
|
||||
namespace OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
public interface IPinRepository
|
||||
{
|
||||
|
||||
enum ToolId
|
||||
{
|
||||
BioRad = 1,
|
||||
CDE = 2,
|
||||
Tencor = 3,
|
||||
HgCV = 4,
|
||||
Stratus = 5,
|
||||
SP1 = 6,
|
||||
}
|
||||
|
||||
Result<Pinned[]> GetPinnedTable(IMetrologyRepository metrologyRepository, int id, string? bioRad, string? cde);
|
||||
|
||||
}
|
Reference in New Issue
Block a user