using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace YBEE.EQM.Core;

/// <summary>
/// 家长问卷填答进度
/// </summary>
[Comment("家长问卷填答进度")]
public class ExamPatriarchQuestionnaireProgress : IEntity
{
    /// <summary>
    /// 主键
    /// </summary>
    [Comment("主键")]
    [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public long Id { get; set; }
    /// <summary>
    /// 问卷编码
    /// </summary>
    [Comment("问卷编码")]
    [Required, StringLength(20)]
    public string QuestionnaireCode { get; set; }
    /// <summary>
    /// 监测学生ID
    /// </summary>
    [Comment("监测学生ID")]
    [Required]
    public long ExamStudentId { get; set; }
    /// <summary>
    /// 填答手机号码
    /// </summary>
    [Comment("填答手机号码")]
    [StringLength(20)]
    public string Mobile { get; set; }
    /// <summary>
    /// 提交时间
    /// </summary>
    [Comment("提交时间")]
    public DateTime? SubmitTime { get; set; }
    /// <summary>
    /// 是否已完成
    /// </summary>
    [Comment("是否已完成")]
    [Required]
    public bool IsCompleted { get; set; } = false;
    /// <summary>
    /// 创建时间
    /// </summary>
    [Comment("创建时间")]
    [Required]
    public DateTime CreateTime { get; set; }
    /// <summary>
    /// 更新时间
    /// </summary>
    [Comment("更新时间")]
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 一对一引用（监测学生）
    /// </summary>
    public virtual ExamStudent ExamStudent { get; set; }
}
