package com.alterdekim.game.service;

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

@Service
@NoArgsConstructor
public class MAService implements OutputObjectCallback {

    @Autowired
    private MagicAbilityRepository repository;

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