package com.alterdekim.game.service;

import com.alterdekim.flash.decompiler.mapper.OutputObjectCallback;
import com.alterdekim.game.entity.GoodSmile;
import com.alterdekim.game.repository.GoodSmileRepository;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@NoArgsConstructor
@Service
public class GoodSmileService implements OutputObjectCallback {

    @Autowired
    private GoodSmileRepository repository;

    @Override
    public void onOutputObjectReady(Object o) {
        this.repository.save((GoodSmile) o);
    }
}
