package com.fs.fssync.sink.impl;

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

import java.io.Serializable;

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

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

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

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