package com.fs.fssync.sink.impl;

import com.fs.fssync.sink.AbstractCdcSinkStrategy;
import com.fs.store.domain.FsWarehouses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Slf4j
@Component
public class FsWarehousesSinkStrategy extends AbstractCdcSinkStrategy<FsWarehouses> implements Serializable {

    @Override
    public boolean canHandle(String table) {
        return "fs_warehouses".equals(table);
    }

    @Override
    public Class<FsWarehouses> getEntityClass() {
        return FsWarehouses.class;
    }

    @Override
    public String getKeyPrefix() {
        return "fs:warehouses:";
    }

    @Override
    protected String getIdField() {
        return "id";
    }
}
