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

namespace Strata.Code.DataAccess.Models;

[Table("TEScheduledTask")]
public partial class TescheduledTask
{
    [Key]
    [Column("ScheduledTaskGUID")]
    public Guid ScheduledTaskGuid { get; set; }

    [StringLength(64)]
    public string Name { get; set; } = null!;

    [StringLength(450)]
    public string Description { get; set; } = null!;

    public int RepeatType { get; set; }

    public int RepeatFrequency { get; set; }

    public int DayOfWeek { get; set; }

    public int DayOfMonth { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime StartDate { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime EndDate { get; set; }

    public bool HasEndDate { get; set; }

    [Column("SetupXML")]
    public string SetupXml { get; set; } = null!;

    [StringLength(450)]
    public string AssemblyQualifiedName { get; set; } = null!;

    public bool HasRun { get; set; }

    public bool IsDisabled { get; set; }

    public bool HasDisabledExpirationDate { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime DisabledExpirationDate { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime DateCreatedUtc { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime LastRunDateUtc { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime LastSubmittedDateUtc { get; set; }

    public TimeOnly StartTime { get; set; }

    [StringLength(50)]
    public string TimeZoneId { get; set; } = null!;
}
