package com.caliverse.admin.mongodb.domain;

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

import java.time.LocalDateTime;
import java.util.List;

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

    private DynamoDBDocBase data;

    public DynamodbHistoryLogInfo(EDBOperationType operationType, HISTORYTYPEDETAIL historyType, String tableName, String message, String tranId, List<FieldChange> changed, String userId, String userIP, DynamoDBDocBase data) {
        super(DBType.DYNAMODB, LocalDateTime.now(), operationType, historyType, tableName, message, tranId, changed, userId, userIP);

        this.data = data;
    }
}
