package com.boman.system.common;

import com.alibaba.fastjson.JSONObject;


import com.boman.gen.domain.GenTable;
import com.google.common.collect.Maps;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


import java.util.Map;

/**
 * @author shiqian
 * @description
 * @date 2021年03月22日 10:04
 **/
@Data
public class MainTableRecord {

    private static final Logger LOGGER = LoggerFactory.getLogger(MainTableRecord.class);

    private TableServiceContext context;
    private RowRecord mainData;

    @Setter
    @Getter
    private RowResult result;


    public MainTableRecord(TableServiceContext context, GenTable genTable, Long id, JSONObject fixedData, JSONObject delTables) {
        this.context = context;
        this.mainData = new RowRecord(id, genTable, fixedData);
    }

    public Long getId() {
        return mainData.getId();
    }

    public void setId(Long value) {
        mainData.setId(value);
    }

    public GenTable getTable() {
        return mainData.getGenTable();
    }

    public JSONObject getCommitData() {
        return mainData.getCommitData();
    }

    public JSONObject getOriginalData() {
        return mainData.getOriginalData();
    }
}
