import { Expose } from 'class-transformer';
import { ProcessedByEntity } from './money-corp.entity';

/**
 * 기업머니 충전요청 Entity
 */
export class MoneyChargeRequestEntity {
  @Expose()
  mcrId!: number;

  @Expose()
  agcId!: number;

  @Expose()
  requestMemId!: number | null;

  @Expose()
  mcrStatus!: string;

  @Expose()
  mcrPaymentMethod!: string;

  @Expose()
  mcrTitle!: string;

  @Expose()
  mcrReason!: string | null;

  @Expose()
  mcrAmount!: number;

  @Expose()
  mcrAdminMemo!: string | null;

  @Expose()
  mcrRejectedReason!: string | null;

  @Expose()
  mcrApprovedAt!: string | null;

  @Expose()
  mcrRejectedAt!: string | null;

  @Expose()
  mcrCanceledAt!: string | null;

  @Expose()
  mcrCreatedAt!: string;

  @Expose()
  mcrUpdatedAt!: string | null;

  @Expose()
  agcCorporateName?: string;

  @Expose()
  agcCorporateCode?: string;

  @Expose()
  sagName?: string | null;

  @Expose()
  requestMemLoginId?: string | null;

  @Expose()
  requestMemName?: string | null;

  //* 이 화면이 M7 이전부터 보이던 승인자 **이름**. 서버가 감사 열람 자격에 걸어 내린다
  //*  (`processedByOnly` — 로컬 코드리뷰 CRITICAL). 자격 밖에서는 `null` 이고 공유 포매터가
  //*  계정 표기로만 떨어진다. 형제 키 `approvedAdmId`·`approvedAdmLoginId` 는 `processedBy` 와
  //*  값이 같아 지웠다 — 같은 사실을 두 이름으로 실으면 가림이 한쪽만 걸린다.
  @Expose()
  approvedAdmName?: string | null;

  //* 이 화면은 이미 승인자 **이름**을 복호화해 보이고 있었다 — 그것을 지우지 않고 계정을
  //*  덧붙인다(계획 M7 D1). 표기 조립은 공유 포매터가 진다.
  @Expose()
  processedBy?: ProcessedByEntity;
}
