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