package com.fs.fssync.sink.impl;

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

import java.io.Serializable;

@Slf4j
@Component
public class FsUserAddressSinkStrategy extends AbstractCdcSinkStrategy<FsUserAddress> implements Serializable {

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

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

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

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