2024-07-04 11:02:45 +05:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
2021-07-21 12:30:51 +05:00
|
|
|
using System.Collections.Generic;
|
2021-04-02 17:28:07 +05:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2021-08-16 10:21:46 +05:00
|
|
|
using System.Text.Json.Serialization;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
namespace AsbCloudDb.Model
|
|
|
|
{
|
|
|
|
[Table("t_well"), Comment("скважины")]
|
2021-07-19 15:11:01 +05:00
|
|
|
public partial class Well : IId, IMapPoint
|
2021-04-02 17:28:07 +05:00
|
|
|
{
|
|
|
|
[Key]
|
|
|
|
[Column("id")]
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
[Column("caption")]
|
|
|
|
[StringLength(255)]
|
2023-02-17 15:30:17 +05:00
|
|
|
public string Caption { get; set; } = null!;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
[Column("id_cluster")]
|
2023-02-17 15:30:17 +05:00
|
|
|
public int IdCluster { get; set; }
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
[Column("id_telemetry")]
|
|
|
|
public int? IdTelemetry { get; set; }
|
|
|
|
|
2021-07-21 15:22:58 +05:00
|
|
|
[Column("id_well_type")]
|
2023-02-17 15:30:17 +05:00
|
|
|
public int IdWellType { get; set; }
|
2022-04-11 18:00:34 +05:00
|
|
|
|
2021-10-18 12:38:49 +05:00
|
|
|
[Column("state"), Comment("0 - неизвестно, 1 - в работе, 2 - завершена")]
|
2021-10-20 11:21:14 +05:00
|
|
|
public int IdState { get; set; }
|
2021-07-19 15:11:01 +05:00
|
|
|
|
|
|
|
[Column("latitude")]
|
2021-07-21 15:22:58 +05:00
|
|
|
public double? Latitude { get; set; }
|
2021-07-19 15:11:01 +05:00
|
|
|
|
|
|
|
[Column("longitude")]
|
2021-07-21 15:22:58 +05:00
|
|
|
public double? Longitude { get; set; }
|
|
|
|
|
2022-01-02 12:33:18 +05:00
|
|
|
[Column("timezone", TypeName = "jsonb"), Comment("Смещение часового пояса от UTC")]
|
2023-02-17 15:30:17 +05:00
|
|
|
public SimpleTimezone Timezone { get; set; } = null!;
|
2022-01-02 12:33:18 +05:00
|
|
|
|
2021-07-21 15:22:58 +05:00
|
|
|
[ForeignKey(nameof(IdWellType))]
|
|
|
|
[InverseProperty(nameof(Model.WellType.Wells))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual WellType WellType { get; set; } = null!;
|
2021-07-21 15:29:19 +05:00
|
|
|
|
2021-07-21 16:30:57 +05:00
|
|
|
[InverseProperty(nameof(RelationCompanyWell.Well))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual ICollection<RelationCompanyWell> RelationCompaniesWells { get; set; } = null!;
|
2021-07-21 15:22:58 +05:00
|
|
|
|
|
|
|
[ForeignKey(nameof(IdCluster))]
|
|
|
|
[InverseProperty(nameof(Model.Cluster.Wells))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual Cluster Cluster { get; set; } = null!;
|
2021-07-21 15:22:58 +05:00
|
|
|
|
|
|
|
[ForeignKey(nameof(IdTelemetry))]
|
|
|
|
[InverseProperty(nameof(Model.Telemetry.Well))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual Telemetry? Telemetry { get; set; }
|
2021-08-16 10:21:46 +05:00
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
[InverseProperty(nameof(WellOperation.Well))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual ICollection<WellOperation> WellOperations { get; set; } = null!;
|
2021-10-12 10:39:42 +05:00
|
|
|
|
|
|
|
[InverseProperty(nameof(WellComposite.Well))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual ICollection<WellComposite> WellComposites { get; set; } = null!;
|
2021-10-12 10:39:42 +05:00
|
|
|
|
|
|
|
[InverseProperty(nameof(WellComposite.WellSrc))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual ICollection<WellComposite> WellCompositeSrcs { get; set; } = null!;
|
2022-02-12 11:28:16 +05:00
|
|
|
|
|
|
|
[InverseProperty(nameof(DrillingProgramPart.Well))]
|
2023-02-17 15:30:17 +05:00
|
|
|
public virtual ICollection<DrillingProgramPart> DrillingProgramParts { get; set; } = null!;
|
2023-02-16 16:27:14 +05:00
|
|
|
|
2023-10-12 16:33:30 +05:00
|
|
|
[InverseProperty(nameof(Contact.Well))]
|
|
|
|
public virtual ICollection<Contact> Contacts { get; set; } = null!;
|
2021-04-02 17:28:07 +05:00
|
|
|
}
|
2023-10-09 15:06:03 +05:00
|
|
|
}
|