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

namespace AsbCloudDb.Model.ProcessMaps;

[Table("t_process_map_functions_shock_test"), Comment("ShockTest")]
public class ProcessMapPlanFunctionsShockTest : ProcessMapPlanBase
{
    [Column("stickslip"), Comment("StickSlip")]
    [Range(0.0, 1000.0)]
    [Required]
    public double StickSlip { get; set; }

    [Column("whirl"), Comment("Whirl")]
    [Range(0.0, 1000.0)]
    [Required]
    public double Whirl { get; set; }

    [Column("axial_vibrations"), Comment("Осевые вибрации")]
    [Range(0.0, 1000.0)]
    [Required]
    public double AxialVibrations { get; set; }

    [Column("combined_vibrations"), Comment("Комбинированные вибрации")]
    [Range(0.0, 1000.0)]
    [Required]
    public double CombinedVibrations { get; set; }

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

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

    [Column("id_autostart_or_warning"), Comment("Автозапуск или Предупреждение")]
    [Required]
    public bool IdAutostartOrWarning { get; set; }

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

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