package org.linlinjava.litemall.db.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;

public class LitemallFileDetail {
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column litemall_file_detail.id
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column litemall_file_detail.file_id
     *
     * @mbg.generated
     */
    private Integer fileId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column litemall_file_detail.name
     *
     * @mbg.generated
     */
    private String name;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column litemall_file_detail.quantity
     *
     * @mbg.generated
     */
    private BigDecimal quantity;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column litemall_file_detail.length
     *
     * @mbg.generated
     */
    private BigDecimal length;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column litemall_file_detail.width
     *
     * @mbg.generated
     */
    private BigDecimal width;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column litemall_file_detail.height
     *
     * @mbg.generated
     */
    private BigDecimal height;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column litemall_file_detail.cube
     *
     * @mbg.generated
     */
    private BigDecimal cube;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_file_detail.id
     *
     * @return the value of litemall_file_detail.id
     *
     * @mbg.generated
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_file_detail.id
     *
     * @param id the value for litemall_file_detail.id
     *
     * @mbg.generated
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_file_detail.file_id
     *
     * @return the value of litemall_file_detail.file_id
     *
     * @mbg.generated
     */
    public Integer getFileId() {
        return fileId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_file_detail.file_id
     *
     * @param fileId the value for litemall_file_detail.file_id
     *
     * @mbg.generated
     */
    public void setFileId(Integer fileId) {
        this.fileId = fileId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_file_detail.name
     *
     * @return the value of litemall_file_detail.name
     *
     * @mbg.generated
     */
    public String getName() {
        return name;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_file_detail.name
     *
     * @param name the value for litemall_file_detail.name
     *
     * @mbg.generated
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_file_detail.quantity
     *
     * @return the value of litemall_file_detail.quantity
     *
     * @mbg.generated
     */
    public BigDecimal getQuantity() {
        return quantity;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_file_detail.quantity
     *
     * @param quantity the value for litemall_file_detail.quantity
     *
     * @mbg.generated
     */
    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_file_detail.length
     *
     * @return the value of litemall_file_detail.length
     *
     * @mbg.generated
     */
    public BigDecimal getLength() {
        return length;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_file_detail.length
     *
     * @param length the value for litemall_file_detail.length
     *
     * @mbg.generated
     */
    public void setLength(BigDecimal length) {
        this.length = length;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_file_detail.width
     *
     * @return the value of litemall_file_detail.width
     *
     * @mbg.generated
     */
    public BigDecimal getWidth() {
        return width;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_file_detail.width
     *
     * @param width the value for litemall_file_detail.width
     *
     * @mbg.generated
     */
    public void setWidth(BigDecimal width) {
        this.width = width;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_file_detail.height
     *
     * @return the value of litemall_file_detail.height
     *
     * @mbg.generated
     */
    public BigDecimal getHeight() {
        return height;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_file_detail.height
     *
     * @param height the value for litemall_file_detail.height
     *
     * @mbg.generated
     */
    public void setHeight(BigDecimal height) {
        this.height = height;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_file_detail.cube
     *
     * @return the value of litemall_file_detail.cube
     *
     * @mbg.generated
     */
    public BigDecimal getCube() {
        return cube;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_file_detail.cube
     *
     * @param cube the value for litemall_file_detail.cube
     *
     * @mbg.generated
     */
    public void setCube(BigDecimal cube) {
        this.cube = cube;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_file_detail
     *
     * @mbg.generated
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", fileId=").append(fileId);
        sb.append(", name=").append(name);
        sb.append(", quantity=").append(quantity);
        sb.append(", length=").append(length);
        sb.append(", width=").append(width);
        sb.append(", height=").append(height);
        sb.append(", cube=").append(cube);
        sb.append("]");
        return sb.toString();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_file_detail
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallFileDetail other = (LitemallFileDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFileId() == null ? other.getFileId() == null : this.getFileId().equals(other.getFileId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
            && (this.getLength() == null ? other.getLength() == null : this.getLength().equals(other.getLength()))
            && (this.getWidth() == null ? other.getWidth() == null : this.getWidth().equals(other.getWidth()))
            && (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
            && (this.getCube() == null ? other.getCube() == null : this.getCube().equals(other.getCube()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_file_detail
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFileId() == null) ? 0 : getFileId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getLength() == null) ? 0 : getLength().hashCode());
        result = prime * result + ((getWidth() == null) ? 0 : getWidth().hashCode());
        result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
        result = prime * result + ((getCube() == null) ? 0 : getCube().hashCode());
        return result;
    }

    /**
     * This enum was generated by MyBatis Generator.
     * This enum corresponds to the database table litemall_file_detail
     *
     * @mbg.generated
     */
    public enum Column {
        id("id", "id", "INTEGER", false),
        fileId("file_id", "fileId", "INTEGER", false),
        name("name", "name", "VARCHAR", true),
        quantity("quantity", "quantity", "DECIMAL", false),
        length("length", "length", "DECIMAL", true),
        width("width", "width", "DECIMAL", false),
        height("height", "height", "DECIMAL", false),
        cube("cube", "cube", "DECIMAL", true);

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        private static final String BEGINNING_DELIMITER = "`";

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        private static final String ENDING_DELIMITER = "`";

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        private final String column;

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        private final boolean isColumnNameDelimited;

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        private final String javaProperty;

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        private final String jdbcType;

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        public String value() {
            return this.column;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        public String getValue() {
            return this.column;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        public String getJavaProperty() {
            return this.javaProperty;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        public String getJdbcType() {
            return this.jdbcType;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_file_detail
         *
         * @mbg.generated
         */
        public String getAliasedEscapedColumnName() {
            return this.getEscapedColumnName();
        }
    }
}