using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AsbCloudDb.Model.ProcessMapPlan;
using Microsoft.EntityFrameworkCore;

namespace AsbCloudDb.Model.ProcessMapPlan.Functions;

[Table("t_process_map_plan_drilltest"), Comment("DrillTest")]
public class ProcessMapPlanDrillTest : ProcessMapPlanBase
{
    [Column("weight_on_bit_min"), Comment("Нагрузка минимальная, т")]
    [Range(1.0, 30.0)]
    [Required]
    public double WeightOnBitMin { get; set; }

    [Column("weight_on_bit_steps_count"), Comment("Количество шагов по нагрузке")]
    [Range(1, 5)]
    [Required]
    public int WeightOnBitStepsCount { get; set; }

    [Column("rpm_min"), Comment("Минимальные обороты на ВСП, об/мин.")]
    [Range(5, 200)]
    [Required]
    public double RpmMin { get; set; }

    [Column("rpm_steps_count"), Comment("Количество шагов оборотов на ВСП, об/мин.")]
    [Range(1, 5)]
    [Required]
    public int RpmStepsCount { get; set; }

    [Column("length_step"), Comment("Величина проходки шага, м.")]
    [Range(0.1, 2.0)]
    [Required]
    public double LengthStep { get; set; }

    [Column("note"), Comment("Примечание"), StringLength(1024)]
    public string? Note { get; set; }

    [ForeignKey(nameof(IdPrevious))]
    public virtual ProcessMapPlanDrillTest? Previous { get; set; }
}