SPMS_API/SPMS.Domain/Common/ErrorCodes.cs
SEAN 8b6fd84b98 feat: Domain Enum 및 에러 코드 상수 정의 (#10)
- 12개 Enum 추가 (Platform, ServiceStatus, SubTier, AdminRole, DeviceStatus, MessageStatus, PushResult, PaymentStatus, TargetType, LinkType, WebhookEvent, WebhookStatus)
- ErrorCodes 상수 클래스 추가 (Error_Codes.md 기반 3자리 코드)
- Entity byte 필드를 Enum 타입으로 변경 (Service, Admin, Device, PushSendLog, WebhookLog, Payment)
- WebhookLog.EventType 컬럼 타입 변경 (varchar→tinyint) 마이그레이션 적용
2026-02-09 13:31:50 +09:00

34 lines
1.0 KiB
C#

namespace SPMS.Domain.Common;
/// <summary>
/// SPMS 에러 코드 상수
/// 코드 체계: [상태(0=성공,1=실패)][도메인(0~8)][순번]
/// </summary>
public static class ErrorCodes
{
// === 성공 ===
public const string Success = "000";
// === 공통 (0) ===
public const string BadRequest = "101";
public const string Unauthorized = "102";
public const string NotFound = "103";
public const string InternalError = "104";
public const string NoChange = "105";
public const string LimitExceeded = "106";
public const string Conflict = "107";
// === Auth (1) ===
public const string VerificationCodeError = "111";
public const string LoginFailed = "112";
public const string LoginAttemptExceeded = "113";
// === Account (2) ===
public const string PasswordValidationFailed = "121";
public const string ResetTokenError = "122";
// === Push (6) ===
public const string PushSendFailed = "161";
public const string PushStateChangeNotAllowed = "162";
}