package com.caliverse.admin.dynamodb.service;

import com.caliverse.admin.domain.entity.MenuBanner;
import com.caliverse.admin.domain.request.MenuRequest;
import com.caliverse.admin.dynamodb.repository.BannerRepository;
import com.caliverse.admin.global.common.annotation.DynamoDBTransaction;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
@Slf4j
public class DynamodbMenuService {
    private final BannerRepository bannerRepository;

    @DynamoDBTransaction
    public void insertBanner(MenuBanner banner) {
        bannerRepository.insertBanner(banner);
    }

    @DynamoDBTransaction
    public void updateBanner(MenuBanner banner) {
        bannerRepository.updateBanner(banner);
    }

    @DynamoDBTransaction
    public void deleteBanner(Integer bannerId) {
        bannerRepository.deleteBanner(bannerId);
    }
}
