package com.mca.cmmn.vo;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class LogVO {

  private String log_cd;
  private String userid;
  private String action;
  private String etc;
  private LocalDateTime created_date;

  public String getLog_cd() {
    return log_cd;
  }

  public void setLog_cd(String log_cd) {
    this.log_cd = log_cd;
  }

  public String getUserid() {
    return userid;
  }

  public void setUserid(String userid) {
    this.userid = userid;
  }

  public String getAction() {
    return action;
  }

  public void setAction(String action) {
    this.action = action;
  }

  public String getEtc() {
    return etc;
  }

  public void setEtc(String etc) {
    this.etc = etc;
  }

  public LocalDateTime getCreated_date() {
    return created_date;
  }

  public void setCreated_date(LocalDateTime created_date) {
    this.created_date = created_date;
  }

  public void setLog(String userid, String logAction, String etc, LocalDateTime now){
    setLog_cd(now.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS")).substring(2));
    setUserid(userid);
    setAction(logAction);
    setEtc(etc);
    setCreated_date(now);
  }
}
