package com.fs.fssync.sink.impl;

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

import java.io.Serializable;

@Slf4j
@Component
public class FsStoreProductAttrValueSinkStrategy extends AbstractCdcSinkStrategy<FsStoreProductAttrValue> implements Serializable {
    @Override
    public boolean canHandle(String table) {
        return "fs_store_product_attr_value".equals(table);
    }

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

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

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