DD.WellWorkover.Cloud/AsbCloudWebApi.IntegrationTests/Data/Defaults.cs

112 lines
3.1 KiB
C#
Raw Normal View History

2024-01-19 17:49:09 +05:00
using AsbCloudDb.Model;
namespace AsbCloudWebApi.IntegrationTests.Data
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2211:Поля, не являющиеся константами, не должны быть видимыми", Justification = "<Ожидание>")]
public static class Defaults
{
public static Driller[] Drillers = new Driller[]
{
new()
{
Id = 1,
2024-02-27 13:44:14 +05:00
Name = "test1",
Surname = "test1",
Patronymic = "test1"
},
new()
{
Id = 2,
Name = "test2",
Surname = "test2",
Patronymic = "test2"
}
};
public static WellOperation[] WellOperations = new WellOperation[]
{
new()
{
Id = 1,
IdWell = 1,
IdType = 1,
DateStart = DateTimeOffset.UtcNow.AddDays(-1),
CategoryInfo = "1",
Comment = "1",
DepthEnd = 20,
DepthStart = 10,
DurationHours = 1,
IdCategory = 5000,
IdPlan = null,
IdUser = 1,
IdWellSectionType = 1,
LastUpdateDate = DateTimeOffset.UtcNow
}
};
2024-01-19 17:49:09 +05:00
public static Deposit[] Deposits = new Deposit[] {
new()
{
Id = 1,
Caption = "Deposit1",
Latitude = 10,
Longitude = 20,
Timezone = GetTimezone()
2024-01-19 17:49:09 +05:00
}
};
public static Cluster[] Clusters = new Cluster[] {
new()
{
Id = 1,
IdDeposit = Deposits[0].Id,
Caption = "Cluster1",
Latitude = 10,
Longitude = 20,
Timezone = GetTimezone()
2024-01-19 17:49:09 +05:00
}
};
public static Telemetry[] Telemetries = new Telemetry[]
{
new()
{
Id = 1,
RemoteUid = "555-555-555",
TimeZone = GetTimezone()
}
};
2024-01-19 17:49:09 +05:00
public static Well[] Wells = new Well[] {
new()
{
Id = 1,
IdCluster = Clusters[0].Id,
IdWellType = 1,
IdState = 1,
Caption = "Well1",
Latitude = 10,
Longitude = 20,
IdTelemetry = Telemetries[0].Id,
Timezone = GetTimezone()
2024-01-19 17:49:09 +05:00
}
};
public static RelationCompanyWell[] RelationsCompanyWell = new RelationCompanyWell[]
{
new() { IdCompany = 1, IdWell = Wells[0].Id },
2024-01-19 17:49:09 +05:00
};
public static RelationUserUserRole[] RelationsUserUserRole = new RelationUserUserRole[]
{
new(){ IdUserRole= 1, IdUser = 1}
};
private static SimpleTimezone GetTimezone() =>
new ()
{
Hours = 1
};
2024-01-19 17:49:09 +05:00
}
}