using System.ComponentModel.DataAnnotations;
namespace CampusErrand.Models.Dtos;
///
/// 提交评价请求
///
public class SubmitReviewRequest
{
/// 星级 1-5
[Required(ErrorMessage = "评分不能为空")]
[Range(1, 5, ErrorMessage = "评分必须在 1-5 之间")]
public int Rating { get; set; }
/// 评价内容(非必填)
[MaxLength(512)]
public string? Content { get; set; }
}
///
/// 评价响应
///
public class ReviewResponse
{
public int Id { get; set; }
public int OrderId { get; set; }
public int RunnerId { get; set; }
public int Rating { get; set; }
/// 评价内容(仅管理员可见)
public string? Content { get; set; }
public int ScoreChange { get; set; }
public bool IsDisabled { get; set; }
public DateTime CreatedAt { get; set; }
}
///
/// 管理端评价列表项响应
///
public class AdminReviewResponse
{
public int Id { get; set; }
public int OrderId { get; set; }
public string OrderNo { get; set; } = string.Empty;
public int RunnerId { get; set; }
public string? RunnerNickname { get; set; }
public int Rating { get; set; }
public string? Content { get; set; }
public int ScoreChange { get; set; }
public bool IsDisabled { get; set; }
public DateTime CreatedAt { get; set; }
}