package com.fshark.overseas.advert.entity.mapper;


import com.fshark.overseas.advert.modle.mapping.Media;
import org.jdbi.v3.core.mapper.RowMapper;
import org.jdbi.v3.core.statement.StatementContext;

import java.sql.ResultSet;
import java.sql.SQLException;

public class MediaMapper implements RowMapper<Media> {

    @Override
    public Media map(ResultSet rs, StatementContext ctx) throws SQLException {
        return Media.builder()
                .media_source(rs.getString("af_media_id"))
                .id(rs.getLong("id"))
                .build();
    }
}
