using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AsbCloudDb.Model
{
    [Table("t_planned_trajectory"), Comment("Загрузка плановой траектории")]
    public class PlannedTrajectory : IId, IWellRelated
    {
        [Column("id"), Key]
        public int Id { get; set; }

        [Column("id_user"), Comment("ID пользователя который внес/изменил запись")]
        public int IdUser { get; set; }

        [Column("id_well"), Comment("ID скважины")]
        public int IdWell { get; set; }

        [Column("update_date"), Comment("Дата загрузки траектории")]
        public DateTimeOffset UpdateDate { get; set; }

        [Column("wellbore_depth"), Comment("Глубина по стволу")]
        public double WellboreDepth { get; set; }

        [Column("zenith_angle"), Comment("Угол зенитный")]
        public double ZenithAngle { get; set; }

        [Column("azimuth_geo"), Comment("Азимут Географ.")]
        public double AzimuthGeo { get; set; }

        [Column("azimuth_magnetic"), Comment("Азимут Магнитный")]
        public double AzimuthMagnetic { get; set; }

        [Column("vertical_depth"), Comment("Глубина вертикальная")]
        public double VerticalDepth { get; set; }

        [Column("absolute_mark"), Comment("Абсолютная отметка")]
        public double AbsoluteMark { get; set; }

        [Column("north_orifice"), Comment("Север отн-но устья")]
        public double NorthOrifice { get; set; }

        [Column("east_orifice"), Comment("Восток отн-но устья")]
        public double EastOrifice { get; set; }

        [Column("east_cartographic"), Comment("Восток картографический")]
        public double EastCartographic { get; set; }

        [Column("north_cartographic"), Comment("Север картографический")]
        public double NorthCartographic { get; set; }

        [Column("spatial_intensity"), Comment("Пространственная интенсивность")]
        public double SpatialIntensity { get; set; }

        [Column("angle_intensity"), Comment("Интенсивность по углу")]
        public double AngleIntensity { get; set; }

        [Column("azimuth_intensity"), Comment("Интенсивность по азимуту")]
        public double AzimuthIntensity { get; set; }

        [Column("orifice_offset"), Comment("Смещение от устья")]
        public double OrificeOffset { get; set; }

        [Column("comment"), Comment("Комментарии")]
        public string? Comment { get; set; }

        [Column("radius_target"), Comment("Радиус цели")]
        public double? RadiusTarget { get; set; }

        [ForeignKey(nameof(IdWell))]
        public virtual Well Well { get; set; } = null!;

        [ForeignKey(nameof(IdUser))]
        public virtual User User { get; set; } = null!;
    }
}