mi-assessment/server/MiAssessment/src/MiAssessment.Model/Entities/AssessmentRecord.cs
2026-03-24 23:55:50 +08:00

134 lines
2.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace MiAssessment.Model.Entities;
/// <summary>
/// 测评记录表
/// </summary>
[Table("assessment_records")]
public class AssessmentRecord
{
/// <summary>
/// 主键ID
/// </summary>
[Key]
public long Id { get; set; }
/// <summary>
/// 用户ID
/// </summary>
public long UserId { get; set; }
/// <summary>
/// 订单ID
/// </summary>
public long OrderId { get; set; }
/// <summary>
/// 测评类型ID
/// </summary>
public long AssessmentTypeId { get; set; }
/// <summary>
/// 测评人姓名
/// </summary>
[Required]
[MaxLength(50)]
public string Name { get; set; } = null!;
/// <summary>
/// 手机号
/// </summary>
[Required]
[MaxLength(20)]
public string Phone { get; set; } = null!;
/// <summary>
/// 性别1男 2女
/// </summary>
public int Gender { get; set; }
/// <summary>
/// 年龄
/// </summary>
public int Age { get; set; }
/// <summary>
/// 学业阶段1小学及以下 2初中 3高中 4大专 5本科 6研究生及以上
/// </summary>
public int EducationStage { get; set; }
/// <summary>
/// 省份
/// </summary>
[Required]
[MaxLength(50)]
public string Province { get; set; } = null!;
/// <summary>
/// 城市
/// </summary>
[Required]
[MaxLength(50)]
public string City { get; set; } = null!;
/// <summary>
/// 区县
/// </summary>
[Required]
[MaxLength(50)]
public string District { get; set; } = null!;
/// <summary>
/// 状态0待支付 1待测评 2测评中 3生成中 4已完成
/// </summary>
public int Status { get; set; }
/// <summary>
/// 开始答题时间
/// </summary>
public DateTime? StartTime { get; set; }
/// <summary>
/// 提交答题时间
/// </summary>
public DateTime? SubmitTime { get; set; }
/// <summary>
/// 报告生成完成时间
/// </summary>
public DateTime? CompleteTime { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// 软删除标记
/// </summary>
public bool IsDeleted { get; set; }
/// <summary>
/// PDF 报告文件访问 URL
/// </summary>
[MaxLength(500)]
public string? ReportUrl { get; set; }
// Note: Navigation property to User removed due to type mismatch (User.Id is int, UserId is long)
// The relationship is maintained at the database level but not enforced by EF Core
/// <summary>
/// 关联的测评类型
/// </summary>
[ForeignKey(nameof(AssessmentTypeId))]
public virtual AssessmentType? AssessmentType { get; set; }
}