DD.WellWorkover.Cloud/AsbCloudDb/Model/Well.cs
Фролов 30a59d0809 cleanup
2021-09-10 11:28:57 +05:00

57 lines
1.7 KiB
C#

using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
#nullable disable
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; }
[Column("id_cluster")]
public int? IdCluster { get; set; }
[Column("id_telemetry")]
public int? IdTelemetry { get; set; }
[Column("id_well_type")]
public int? IdWellType { get; set; }
[Column("latitude")]
public double? Latitude { get; set; }
[Column("longitude")]
public double? Longitude { get; set; }
[ForeignKey(nameof(IdWellType))]
[InverseProperty(nameof(Model.WellType.Wells))]
public virtual WellType WellType { get; set; }
[InverseProperty(nameof(RelationCompanyWell.Well))]
public virtual ICollection<RelationCompanyWell> RelationCompaniesWells { get; set; }
[ForeignKey(nameof(IdCluster))]
[InverseProperty(nameof(Model.Cluster.Wells))]
public virtual Cluster Cluster { get; set; }
[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; }
}
}