//-----------------------------------------------------------------------
//
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
//
//-----------------------------------------------------------------------
namespace AliasServerDb;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AliasVault.Shared.Models.Enums;
///
/// Represents a task runner job entry in the AliasServerDb.
///
public class TaskRunnerJob
{
///
/// Gets or sets the ID of the task runner job.
///
[Key]
public int Id { get; set; }
///
/// Gets or sets the name of the task runner job.
///
[Required]
[MaxLength(50)]
public string Name { get; set; } = null!;
///
/// Gets or sets the date the job was run.
///
public DateTime RunDate { get; set; }
///
/// Gets or sets the start time of the job.
///
public TimeOnly StartTime { get; set; }
///
/// Gets or sets the end time of the job.
///
public TimeOnly? EndTime { get; set; }
///
/// Gets or sets the status of the job.
///
public TaskRunnerJobStatus Status { get; set; }
///
/// Gets or sets the error message of the job.
///
public string? ErrorMessage { get; set; }
///
/// Gets or sets a value indicating whether this is an on-demand run.
///
public bool IsOnDemand { get; set; }
}