package com.caliverse.admin.history.domain;

import com.caliverse.admin.domain.adminlog.FieldChange;
import com.caliverse.admin.domain.entity.HISTORYTYPE;
import com.caliverse.admin.dynamodb.domain.doc.DynamoDBDocBase;
import com.caliverse.admin.global.common.utils.DateUtils;
import com.caliverse.admin.history.entity.DBType;
import com.caliverse.admin.history.entity.EDBOperationType;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

@Getter
@Setter
@Document(collection = "historyLog")
public class DynamodbHistoryLogInfo extends HistoryLogInfoBase {

    private DynamoDBDocBase data;

    public DynamodbHistoryLogInfo(EDBOperationType operationType, HISTORYTYPE historytype, String tableName, String message, String tranId, List<FieldChange> changed, String userId, String userIP, DynamoDBDocBase data) {
        super(DBType.DYNAMODB, DateUtils.nowDateTime(), operationType, historytype, tableName, message, tranId,changed, userId, userIP);

        this.data = data;
    }
}
