/**
 * 
 */
package com.kancolle.server.model.po.ship;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonView;
import com.kancolle.server.model.po.View;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;

/**
 * @author J.K.SAGE
 * @Date 2015年7月26日
 *
 */
@Alias("BaseShip")
public class BaseShip implements Serializable {

    private static final long serialVersionUID = -7322805228630342223L;

    @JsonView(View.BaseShip.class)
    @JSONField(ordinal = 1, name = "api_id")
    private int shipId;

    @JsonView(View.BaseShip.class)
    @JSONField(ordinal = 3, name = "api_name")
    private String name;

    @JsonView(View.BaseShip.class)
    @JSONField(ordinal = 4, name = "api_yomi")
    private String yomi;

    @JsonView(View.BaseShip.class)
    @JSONField(ordinal = 5, name = "api_stype")
    public int getShipTypeId() {
        return getType().getShipTypeId();
    }

    @JsonView(View.BaseShip.class)
    @JSONField(serialize = false, deserialize = false)
    private ShipType type;

    /** 速力 */
    @JsonView(View.BaseShip.class)
    @JSONField(ordinal = 14, name = "api_soku")
    private int soku;

    /** 可装备数 */
    @JsonView(View.BaseShip.class)
    @JSONField(ordinal = 16, name = "api_slot_num")
    private int soltNum;

    public int getShipId() {
        return shipId;
    }

    public void setShipId(int shipId) {
        this.shipId = shipId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getYomi() {
        return yomi;
    }

    public void setYomi(String yomi) {
        this.yomi = yomi;
    }

    public ShipType getType() {
        return type;
    }

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

    public int getSoku() {
        return soku;
    }

    public void setSoku(int soku) {
        this.soku = soku;
    }

    public int getSoltNum() {
        return soltNum;
    }

    public void setSoltNum(int soltNum) {
        this.soltNum = soltNum;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + shipId;
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        BaseShip other = (BaseShip) obj;
        if (shipId != other.shipId)
            return false;
        return true;
    }

    @Override
    public String toString() {
        return String.format("BaseShip [name=%s]", name);
    }
}

@@ -105,16 +105,184 @@
 Field;%0D%0A
+import com.fasterxml.jackson.annotation.JsonIgnore;%0D%0Aimport com.fasterxml.jackson.annotation.JsonProperty;%0D%0Aimport com.fasterxml.jackson.annotation.JsonPropertyOrder;%0D%0A
 import c
@@ -320,24 +320,24 @@
 .JsonView;%0D%0A
-
 import com.k
@@ -515,16 +515,83 @@
 Ship%22)%0D%0A
+@JsonPropertyOrder(%7B%22shipId%22, %22name%22, %22yomi%22, %22soku%22, %22soltNum%22%7D)%0D%0A
 public c
@@ -736,32 +736,61 @@
 aseShip.class)%0D%0A
+    @JsonProperty(%22api_id%22)%0D%0A
     @JSONField(o
@@ -874,32 +874,63 @@
 aseShip.class)%0D%0A
+    @JsonProperty(%22api_name%22)%0D%0A
     @JSONField(o
@@ -1017,32 +1017,63 @@
 aseShip.class)%0D%0A
+    @JsonProperty(%22api_yomi%22)%0D%0A
     @JSONField(o
@@ -1160,32 +1160,64 @@
 aseShip.class)%0D%0A
+    @JsonProperty(%22api_stype%22)%0D%0A
     @JSONField(o
@@ -1348,33 +1348,14 @@
 Json
-View(View.BaseShip.class)
+Ignore
 %0D%0A  
@@ -1481,32 +1481,63 @@
 aseShip.class)%0D%0A
+    @JsonProperty(%22api_soku%22)%0D%0A
     @JSONField(o
@@ -1607,24 +1607,24 @@
 ** %E5%8F%AF%E8%A3%85%E5%A4%87%E6%95%B0 */%0D%0A
-
     @JsonVie
@@ -1643,24 +1643,59 @@
 hip.class)%0D%0A
+    @JsonProperty(%22api_slot_num%22)%0D%0A
     @JSONFie

add base ship view