campus-errand/server/Models/Dtos/CertificationDtos.cs
2026-03-01 05:01:47 +08:00

60 lines
1.7 KiB
C#
Raw Permalink 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.ComponentModel.DataAnnotations;
namespace CampusErrand.Models.Dtos;
/// <summary>
/// 提交跑腿认证请求
/// </summary>
public class CertificationRequest
{
/// <summary>真实姓名</summary>
[Required(ErrorMessage = "姓名不能为空")]
[MaxLength(32)]
public string RealName { get; set; } = string.Empty;
/// <summary>手机号</summary>
[Required(ErrorMessage = "手机号不能为空")]
[MaxLength(20)]
public string Phone { get; set; } = string.Empty;
}
/// <summary>
/// 跑腿认证响应
/// </summary>
public class CertificationResponse
{
public int Id { get; set; }
public int UserId { get; set; }
public string RealName { get; set; } = string.Empty;
public string Phone { get; set; } = string.Empty;
public string Status { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
public DateTime? ReviewedAt { get; set; }
}
/// <summary>
/// 管理端认证列表项响应(含用户信息)
/// </summary>
public class AdminCertificationResponse
{
public int Id { get; set; }
public int UserId { get; set; }
public string RealName { get; set; } = string.Empty;
public string Phone { get; set; } = string.Empty;
public string Status { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
public DateTime? ReviewedAt { get; set; }
public string? UserNickname { get; set; }
public string? UserPhone { get; set; }
}
/// <summary>
/// 审核认证请求
/// </summary>
public class ReviewCertificationRequest
{
/// <summary>审核结果Approved 或 Rejected</summary>
[Required(ErrorMessage = "审核结果不能为空")]
public string Status { get; set; } = string.Empty;
}