package com.alterdekim.game.entity;

import com.alterdekim.flash.decompiler.mapper.FlashClass;
import com.alterdekim.flash.decompiler.mapper.FlashField;
import com.alterdekim.flash.decompiler.mapper.FlashValue;
import com.alterdekim.flash.decompiler.mapper.FlashValueType;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.*;

@ToString
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name="magic_ability")
@FlashClass(name = "ma")
public class MagicAbility {
    @Id
    @FlashValue(type = FlashValueType.Id)
    @JacksonXmlProperty(isAttribute = true, localName = "Id")
    private Long id;

    @Column(nullable = false)
    @FlashField(name = "TypeId")
    @JacksonXmlProperty(isAttribute = true, localName = "TypeId")
    private Integer typeId;

    @Column(nullable = true)
    @FlashField(name = "duration")
    @JacksonXmlProperty(isAttribute = true, localName = "Duration")
    private Integer duration;

    @Column(nullable = true)
    @FlashField(name = "TweenerId")
    @JacksonXmlProperty(isAttribute = true, localName = "TweenerId")
    private Integer tweenerId;

    @Column(nullable = false)
    @FlashField(name = "MRId")
    @JacksonXmlProperty(isAttribute = true, localName = "MediaResourceID")
    private Integer mediaResourceId;

    @Column(nullable = false)
    @FlashField(name = "TRId")
    @JacksonXmlProperty(isAttribute = true, localName = "TRId")
    private Integer textResourceId;

    @Column(nullable = false)
    @FlashField(name = "IconMRId")
    private Integer iconMRId;

    @Column(nullable = false)
    @FlashField(name = "IsVisibleInInfoPanel")
    private Boolean isVisibleInInfoPanel;

    @Column(nullable = true)
    @FlashField(name = "IsMovable")
    @JacksonXmlProperty(isAttribute = true, localName = "IsMovable")
    private Boolean isMovable;
}
