package com.mossle.asset.persistence.domain;

// Generated by Hibernate Tools
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * SkuCategory sku分类.
 * 
 * @author Lingo
 */
@Entity
@Table(name = "SKU_CATEGORY")
public class SkuCategory implements java.io.Serializable {
    private static final long serialVersionUID = 0L;

    /** 主键. */
    private Long id;

    /** null. */
    private SkuCategory skuCategory;

    /** null. */
    private String code;

    /** null. */
    private String name;

    /** null. */
    private String productCategory;

    /** null. */
    private String purpose;

    /** null. */
    private String productName;

    /** null. */
    private String productModel;

    /** null. */
    private Integer productPrice;

    /** null. */
    private Integer productNum;

    /** null. */
    private String description;

    /** null. */
    private String tenantId;

    /** . */
    private Set<SkuInfo> skuInfos = new HashSet<SkuInfo>(0);

    /** . */
    private Set<SkuCategory> skuCategories = new HashSet<SkuCategory>(0);

    public SkuCategory() {
    }

    public SkuCategory(Long id) {
        this.id = id;
    }

    public SkuCategory(Long id, SkuCategory skuCategory, String code,
            String name, String productCategory, String purpose,
            String productName, String productModel, Integer productPrice,
            Integer productNum, String description, String tenantId,
            Set<SkuInfo> skuInfos, Set<SkuCategory> skuCategories) {
        this.id = id;
        this.skuCategory = skuCategory;
        this.code = code;
        this.name = name;
        this.productCategory = productCategory;
        this.purpose = purpose;
        this.productName = productName;
        this.productModel = productModel;
        this.productPrice = productPrice;
        this.productNum = productNum;
        this.description = description;
        this.tenantId = tenantId;
        this.skuInfos = skuInfos;
        this.skuCategories = skuCategories;
    }

    /** @return 主键. */
    @Id
    @Column(name = "ID", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    /**
     * @param id
     *            主键.
     */
    public void setId(Long id) {
        this.id = id;
    }

    /** @return null. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PARENT_ID")
    public SkuCategory getSkuCategory() {
        return this.skuCategory;
    }

    /**
     * @param skuCategory
     *            null.
     */
    public void setSkuCategory(SkuCategory skuCategory) {
        this.skuCategory = skuCategory;
    }

    /** @return null. */
    @Column(name = "CODE", length = 100)
    public String getCode() {
        return this.code;
    }

    /**
     * @param code
     *            null.
     */
    public void setCode(String code) {
        this.code = code;
    }

    /** @return null. */
    @Column(name = "NAME", length = 100)
    public String getName() {
        return this.name;
    }

    /**
     * @param name
     *            null.
     */
    public void setName(String name) {
        this.name = name;
    }

    /** @return null. */
    @Column(name = "PRODUCT_CATEGORY", length = 100)
    public String getProductCategory() {
        return this.productCategory;
    }

    /**
     * @param productCategory
     *            null.
     */
    public void setProductCategory(String productCategory) {
        this.productCategory = productCategory;
    }

    /** @return null. */
    @Column(name = "PURPOSE", length = 100)
    public String getPurpose() {
        return this.purpose;
    }

    /**
     * @param purpose
     *            null.
     */
    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    /** @return null. */
    @Column(name = "PRODUCT_NAME", length = 200)
    public String getProductName() {
        return this.productName;
    }

    /**
     * @param productName
     *            null.
     */
    public void setProductName(String productName) {
        this.productName = productName;
    }

    /** @return null. */
    @Column(name = "PRODUCT_MODEL", length = 50)
    public String getProductModel() {
        return this.productModel;
    }

    /**
     * @param productModel
     *            null.
     */
    public void setProductModel(String productModel) {
        this.productModel = productModel;
    }

    /** @return null. */
    @Column(name = "PRODUCT_PRICE")
    public Integer getProductPrice() {
        return this.productPrice;
    }

    /**
     * @param productPrice
     *            null.
     */
    public void setProductPrice(Integer productPrice) {
        this.productPrice = productPrice;
    }

    /** @return null. */
    @Column(name = "PRODUCT_NUM")
    public Integer getProductNum() {
        return this.productNum;
    }

    /**
     * @param productNum
     *            null.
     */
    public void setProductNum(Integer productNum) {
        this.productNum = productNum;
    }

    /** @return null. */
    @Column(name = "DESCRIPTION", length = 200)
    public String getDescription() {
        return this.description;
    }

    /**
     * @param description
     *            null.
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /** @return null. */
    @Column(name = "TENANT_ID", length = 64)
    public String getTenantId() {
        return this.tenantId;
    }

    /**
     * @param tenantId
     *            null.
     */
    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "skuCategory")
    public Set<SkuInfo> getSkuInfos() {
        return this.skuInfos;
    }

    /**
     * @param skuInfos
     *            .
     */
    public void setSkuInfos(Set<SkuInfo> skuInfos) {
        this.skuInfos = skuInfos;
    }

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "skuCategory")
    public Set<SkuCategory> getSkuCategories() {
        return this.skuCategories;
    }

    /**
     * @param skuCategories
     *            .
     */
    public void setSkuCategories(Set<SkuCategory> skuCategories) {
        this.skuCategories = skuCategories;
    }
}
