package com.zioinfo.mall.loyalty;

import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 포인트 원장 (mall_point_ledger).
 *
 * <p>entryType: EARN(적립 +) / USE(사용 -) / EXPIRE(만료 -) / ADJUST(조정).
 * 잔액 = SUM(points).
 */
@Data
public class MallPointLedger {
    private Long id;
    private String owner;
    private String entryType;     // EARN/USE/EXPIRE/ADJUST
    private Integer points;       // 적립 +, 사용/만료 -
    private String orderNo;
    private String reason;
    private LocalDate expireAt;    // 적립분 만료일(EARN)
    private LocalDateTime createdAt;
}
