using RobotNet.Script.Shares;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RobotNet.ScriptManager.Data;

#nullable disable

[Table("InstanceMissions")]
public class InstanceMission
{
    [Column("Id", TypeName = "uniqueidentifier")]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    [Key]
    [Required]
    public Guid Id { get; set; }

    [Column("MissionName", TypeName = "varchar(126)")]
    [Required]
    public string MissionName { get; set; }

    [Column("CreatedAt", TypeName = "datetime2")]
    [Required]
    public DateTime CreatedAt { get; set; }

    [Column("Parameters", TypeName = "nvarchar(max)")]
    public string Parameters { get; set; }

    [Column("Status", TypeName = "int")]
    [Required]
    public MissionStatus Status { get; set; }

    [Column("StopedAt", TypeName = "datetime2")]
    [Required]
    public DateTime StopedAt { get; set; }

    [Column("Log", TypeName = "nvarchar(max)")]
    public string Log { get; set; }
}
