8fec057752
CI / build (push) Failing after 14m48s
- account_entry pending/notif_key 컬럼 추가(멱등 마이그레이션)
- CardNotificationParser: 카드사·금액·가맹점·승인/취소 파싱
- POST /entries/notification(미확인 지출 생성, 중복방지, 카드 자동매칭)
- POST /entries/{id}/confirm(확정), GET /entries/pending/count
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
49 lines
1.4 KiB
Java
49 lines
1.4 KiB
Java
package com.sb.web.account.dto;
|
|
|
|
import com.sb.web.account.domain.AccountEntry;
|
|
import lombok.Builder;
|
|
import lombok.Data;
|
|
|
|
import java.time.LocalDate;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 가계부 항목 응답 (소유자 ID 제외, 태그 이름 포함).
|
|
*/
|
|
@Data
|
|
@Builder
|
|
public class AccountEntryResponse {
|
|
|
|
private Long id;
|
|
private LocalDate entryDate;
|
|
private String type;
|
|
private String category;
|
|
private Long amount;
|
|
private String memo;
|
|
private Long walletId;
|
|
private String walletName;
|
|
private Long toWalletId;
|
|
private String toWalletName;
|
|
private Integer installmentMonths;
|
|
private Boolean pending;
|
|
private List<String> tags;
|
|
|
|
public static AccountEntryResponse from(AccountEntry e, List<String> tags) {
|
|
return AccountEntryResponse.builder()
|
|
.id(e.getId())
|
|
.entryDate(e.getEntryDate())
|
|
.type(e.getType())
|
|
.category(e.getCategory())
|
|
.amount(e.getAmount())
|
|
.memo(e.getMemo())
|
|
.walletId(e.getWalletId())
|
|
.walletName(e.getWalletName())
|
|
.toWalletId(e.getToWalletId())
|
|
.toWalletName(e.getToWalletName())
|
|
.installmentMonths(e.getInstallmentMonths())
|
|
.pending(Boolean.TRUE.equals(e.getPending()))
|
|
.tags(tags)
|
|
.build();
|
|
}
|
|
}
|