/*
 * ST_FEEDECOMP.h - st 서비스 ST_FEEDECOMP 카피북 (copybook / record header).
 * 수수료 3층 분해: MDR = interchange(발급사) + scheme_fee(카드망) + markup(매입사).
 * st_interchange_rate / st_scheme_fee 요율 조회 후 st_fee_component 로 UPSERT.
 */
#ifndef ST_FEEDECOMP_H
#define ST_FEEDECOMP_H

#include "st_svc.h"

typedef struct {
    long purchase_id;
    long amount;
    long interchange;   /* 발급사 귀속 */
    long scheme_fee;    /* 카드망 귀속 */
    long markup;        /* 매입사 수익 */
    long mdr_total;     /* = interchange + scheme_fee + markup */
    char card_type[16]; /* CREDIT/CHECK/PREPAID */
    char scheme[16];    /* BC/VISA/MASTER/LOCAL */
    char channel[16];
    char biz_date[16];
} st_st_feedecomp_rec_t;

void ST_FEEDECOMP(TPSVCINFO *p);

#endif /* ST_FEEDECOMP_H */
