package com.lightinit.hsdataplatform.entity;

import com.lightinit.hsdataplatform.annotation.FieldDescriber;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.util.Date;

public class DataCatelogItem {
    private Long id;

    private Long dataCatelogId;
    @NotEmpty
    @FieldDescriber(descripton = "信息项名称")
    private String itemName;
    @NotEmpty
    @FieldDescriber(descripton = "数据项类型")
    private String itemType;
    @NotEmpty
    @FieldDescriber(descripton = "数据长度")
    private String itemLength;
    @NotEmpty
    @FieldDescriber(descripton = "共享类型")
    private String shareType;
    @NotEmpty
    @FieldDescriber(descripton = "共享条件")
    private String shareCondition;
    @NotEmpty
    @FieldDescriber(descripton = "共享方式分类")
    private String shareMethodCategory;
    @NotEmpty
    @FieldDescriber(descripton = "共享方式类型")
    private String shareMethodType;
    @NotNull(message="{notnull.message}")
    @FieldDescriber(descripton = "是否向社会开放")
    private Byte isOpen;

    private String openCondition;

    private Date createdAt;

    private Long createdBy;

    private Date deletedAt;

    private Long deletedBy;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDataCatelogId() {
        return dataCatelogId;
    }

    public void setDataCatelogId(Long dataCatelogId) {
        this.dataCatelogId = dataCatelogId;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName == null ? null : itemName.trim();
    }

    public String getItemType() {
        return itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType == null ? null : itemType.trim();
    }

    public String getItemLength() {
        return itemLength;
    }

    public void setItemLength(String itemLength) {
        this.itemLength = itemLength == null ? null : itemLength.trim();
    }

    public String getShareType() {
        return shareType;
    }

    public void setShareType(String shareType) {
        this.shareType = shareType == null ? null : shareType.trim();
    }

    public String getShareCondition() {
        return shareCondition;
    }

    public void setShareCondition(String shareCondition) {
        this.shareCondition = shareCondition == null ? null : shareCondition.trim();
    }

    public String getShareMethodCategory() {
        return shareMethodCategory;
    }

    public void setShareMethodCategory(String shareMethodCategory) {
        this.shareMethodCategory = shareMethodCategory == null ? null : shareMethodCategory.trim();
    }

    public String getShareMethodType() {
        return shareMethodType;
    }

    public void setShareMethodType(String shareMethodType) {
        this.shareMethodType = shareMethodType == null ? null : shareMethodType.trim();
    }

    public Byte getIsOpen() {
        return isOpen;
    }

    public void setIsOpen(Byte isOpen) {
        this.isOpen = isOpen;
    }

    public String getOpenCondition() {
        return openCondition;
    }

    public void setOpenCondition(String openCondition) {
        this.openCondition = openCondition == null ? null : openCondition.trim();
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Long getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(Long createdBy) {
        this.createdBy = createdBy;
    }

    public Date getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(Date deletedAt) {
        this.deletedAt = deletedAt;
    }

    public Long getDeletedBy() {
        return deletedBy;
    }

    public void setDeletedBy(Long deletedBy) {
        this.deletedBy = deletedBy;
    }
}