DD.WellWorkover.Cloud/AsbCloudDb/Model/Well.cs

72 lines
2.6 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace AsbCloudDb.Model
{
[Table("t_well"), Comment("скважины")]
public partial class Well : IId, IMapPoint
{
[Key]
[Column("id")]
public int Id { get; set; }
[Column("caption")]
[StringLength(255)]
public string Caption { get; set; } = null!;
[Column("id_cluster")]
public int IdCluster { get; set; }
[Column("id_telemetry")]
public int? IdTelemetry { get; set; }
2021-07-21 15:22:58 +05:00
[Column("id_well_type")]
public int IdWellType { get; set; }
2022-04-11 18:00:34 +05:00
[Column("state"), Comment("0 - неизвестно, 1 - в работе, 2 - завершена")]
2021-10-20 11:21:14 +05:00
public int IdState { get; set; }
[Column("latitude")]
2021-07-21 15:22:58 +05:00
public double? Latitude { get; set; }
[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")]
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))]
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))]
public virtual ICollection<RelationCompanyWell> RelationCompaniesWells { get; set; } = null!;
2021-07-21 15:22:58 +05:00
[ForeignKey(nameof(IdCluster))]
[InverseProperty(nameof(Model.Cluster.Wells))]
public virtual Cluster Cluster { get; set; } = null!;
2021-07-21 15:22:58 +05:00
[ForeignKey(nameof(IdTelemetry))]
[InverseProperty(nameof(Model.Telemetry.Well))]
public virtual Telemetry? Telemetry { get; set; }
[JsonIgnore]
[InverseProperty(nameof(WellOperation.Well))]
public virtual ICollection<WellOperation> WellOperations { get; set; } = null!;
2021-10-12 10:39:42 +05:00
[InverseProperty(nameof(WellComposite.Well))]
public virtual ICollection<WellComposite> WellComposites { get; set; } = null!;
2021-10-12 10:39:42 +05:00
[InverseProperty(nameof(WellComposite.WellSrc))]
public virtual ICollection<WellComposite> WellCompositeSrcs { get; set; } = null!;
[InverseProperty(nameof(DrillingProgramPart.Well))]
public virtual ICollection<DrillingProgramPart> DrillingProgramParts { get; set; } = null!;
2023-02-16 16:27:14 +05:00
[InverseProperty(nameof(Contact.Well))]
public virtual ICollection<Contact> Contacts { get; set; } = null!;
}
}