package com.bbitcn.silk.model.net;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * @Description TODO
 * @Author DuanKaiji
 * @CreateTime 2024年04月03日 17:36:22
 */
public class ToTareSubmit {

    @SerializedName("czsysid")
    private String czsysid;
    @SerializedName("items")
    private List<ItemsDTO> items;

    public String getCzsysid() {
        return czsysid;
    }

    public void setCzsysid(String czsysid) {
        this.czsysid = czsysid;
    }

    public List<ItemsDTO> getItems() {
        return items;
    }

    public void setItems(List<ItemsDTO> items) {
        this.items = items;
    }

    public static class ItemsDTO {
        @SerializedName("sgtypesysid")
        private String sgtypesysid;
        @SerializedName("pizhong")
        private Double pizhong;
        @SerializedName("kouzhong")
        private Double kouzhong;
        @SerializedName("price")
        private Double price;

        public String getSgtypesysid() {
            return sgtypesysid;
        }

        public void setSgtypesysid(String sgtypesysid) {
            this.sgtypesysid = sgtypesysid;
        }

        public Double getPizhong() {
            return pizhong;
        }

        public void setPizhong(Double pizhong) {
            this.pizhong = pizhong;
        }

        public Double getKouzhong() {
            return kouzhong;
        }

        public void setKouzhong(Double kouzhong) {
            this.kouzhong = kouzhong;
        }

        public Double getPrice() {
            return price;
        }

        public void setPrice(Double price) {
            this.price = price;
        }

        /**
         * 重写equals方法 使用sgtypesysid判断是否相等
         */
        @Override
        public boolean equals(Object obj) {
            if (obj instanceof ItemsDTO) {
                return ((ItemsDTO) obj).getSgtypesysid().equals(this.sgtypesysid);
            }
            return super.equals(obj);
        }

        /**
         * 重写hashCode方法 使用sgtypesysid的hashCode
         */
        @Override
        public int hashCode() {
            return sgtypesysid.hashCode();
        }
    }
}
