package com.gh.gamecenter.entity;

import com.gh.gamecenter.common.entity.CommunityEntity;
import com.gh.gamecenter.common.entity.Display;
import com.gh.gamecenter.room.converter.SignDataConverter;
import com.google.gson.annotations.SerializedName;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;

/**
 * Created by khy on 7/04/18.
 */
@Entity
public class SignEntity {

    @PrimaryKey
    @NonNull
    private String id;

    private int experience;

    @SerializedName("serial_sign")
    private int serialSign;

    private int coefficients;

    @SerializedName("last_time")
    private long lastTime;

    private String title;

    @TypeConverters(SignDataConverter.class)
    private Data data;

    @NonNull
    public String getId() {
        return id;
    }

    public void setId(@NonNull String id) {
        this.id = id;
    }

    public int getExperience() {
        return experience;
    }

    public void setExperience(int experience) {
        this.experience = experience;
    }

    public int getSerialSign() {
        return serialSign;
    }

    public void setSerialSign(int serialSign) {
        this.serialSign = serialSign;
    }

    public int getCoefficients() {
        return coefficients;
    }

    public void setCoefficients(int coefficients) {
        this.coefficients = coefficients;
    }

    public long getLastTime() {
        return lastTime;
    }

    public void setLastTime(long lastTime) {
        this.lastTime = lastTime;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public SignEntity.Data getData() {
        return data;
    }

    public void setData(SignEntity.Data data) {
        this.data = data;
    }

    public class Data {
        private String text;

        private String link;

        private String type;

        private Display display;

        @SerializedName("link_community")
        private CommunityEntity community;

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }

        public String getLink() {
            return link;
        }

        public void setLink(String link) {
            this.link = link;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public Display getDisplay() {
            return display;
        }

        public void setDisplay(Display display) {
            this.display = display;
        }

        public CommunityEntity getCommunity() {
            return community;
        }

        public void setCommunity(CommunityEntity community) {
            this.community = community;
        }
    }
}