package com.fs.fssync.sink.impl;

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

import java.io.Serializable;

@Slf4j
@Component
public class FsStoreProductAttrSinkStrategy extends AbstractCdcSinkStrategy<FsStoreProductAttr> implements Serializable {

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

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

    @Override
    public String getKeyPrefix() {
        return "fs:store:product:attr:";
    }

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