chore: 初始化项目基础文件

This commit is contained in:
2025-11-22 21:27:38 +08:00
parent b587e8c1e1
commit ddf584f212
49 changed files with 6629 additions and 15 deletions

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
namespace TakeoutSaaS.Shared.Abstractions.Exceptions;
/// <summary>
/// 验证异常(用于聚合验证错误信息)。
/// </summary>
public class ValidationException : Exception
{
/// <summary>
/// 字段/属性的错误集合。
/// </summary>
public IDictionary<string, string[]> Errors { get; }
public ValidationException(IDictionary<string, string[]> errors)
: base("一个或多个验证错误")
{
Errors = errors;
}
}