79492184d0
- WBS-CRM-02: 상담 이력 (consultations 테이블 V008, ClientDetail.razor) - WBS-CRM-03: 문의→고객 전환 (V009 client_id FK, InquiryDetail 고객등록 버튼) - WBS-CRM-04: 신고 일정 캘린더 (tax_filings 테이블 V010, TaxFilingList.razor) - WBS-CRM-05: 문의 상태 5단계 확장 (V011, InquiryStatus enum, InquiryList 탭) - WBS-MKT-04: 시즌 시뮬레이터 어드민 페이지 (SeasonSimulator.razor) - WBS-UX-04: 개인정보처리방침 /taxbaik/privacy, 이용약관 /taxbaik/terms - Dashboard.razor 마감 임박 신고 위젯 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
1.0 KiB
C#
26 lines
1.0 KiB
C#
namespace TaxBaik.Application.Services;
|
|
|
|
using TaxBaik.Domain.Entities;
|
|
using TaxBaik.Domain.Interfaces;
|
|
|
|
public class ConsultationService(IConsultationRepository repository)
|
|
{
|
|
public static readonly string[] Results =
|
|
["상담 중", "계약 완료", "보류", "거절", "완료"];
|
|
|
|
public async Task<IEnumerable<Consultation>> GetByClientIdAsync(int clientId, CancellationToken ct = default) =>
|
|
await repository.GetByClientIdAsync(clientId, ct);
|
|
|
|
public async Task<int> CreateAsync(Consultation consultation, CancellationToken ct = default)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(consultation.Summary))
|
|
throw new ValidationException("상담 내용을 입력하세요.");
|
|
if (consultation.ClientId <= 0)
|
|
throw new ValidationException("고객을 선택하세요.");
|
|
return await repository.CreateAsync(consultation, ct);
|
|
}
|
|
|
|
public async Task DeleteAsync(int id, CancellationToken ct = default) =>
|
|
await repository.DeleteAsync(id, ct);
|
|
}
|