using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using QuestionSwapDoc.SwapQuestionModel;
using YGNT.QuestionLibrary.Core.Disciplines;
using YGNT.QuestionLibrary.Core.Models;
using YGNT.QuestionLibrary.Core.Tasks.Enum;

namespace YGNT.QuestionLibrary.Core.Tasks
{
    /// <summary>
    /// 试题解析任务
    /// </summary>
    public class QuestionResolveTask : Entity<long>, IFullAudited
    {
        /// <summary>
        /// 用户id
        /// </summary>
        [Required]
        public long UserId { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 所属学科id
        /// </summary>
        [Required]
        public int DisciplineId { get; set; }

        /// <summary>
        /// 任务状态
        /// </summary>
        public TaskState State { get; set; }

        /// <summary>
        /// 备注说明
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 目标位置
        /// </summary>
        [Required]
        public long TargetId { get; set; }

        /// <summary>
        /// 目标类型
        /// </summary>
        [Required]
        public ImportTargetType TargetType { get; set; }

        /// <summary>
        /// 所属学科
        /// </summary>
        [ForeignKey(nameof(DisciplineId))]
        [Required]
        public Discipline Discipline { get; set; }

        /// <summary>
        /// 文件id
        /// </summary>
        [Required]
        public Guid FileId { get; set; }

        public DateTime CreationTime { get; set; }

        public long? CreatorUserId { get; set; }

        public DateTime? LastModificationTime { get; set; }

        public long? LastModifierUserId { get; set; }

        public bool IsDeleted { get; set; }

        public DateTime? DeletionTime { get; set; }

        public long? DeleterUserId { get; set; }


    }
}