package com.izouma.zhirongip.domain.demand;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.izouma.zhirongip.annotations.EnumFormat;
import com.izouma.zhirongip.annotations.Searchable;
import com.izouma.zhirongip.domain.BaseEntity;
import com.izouma.zhirongip.enums.*;
import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@ApiModel(value = "专利")
@Where(clause = "del = 0")
public class PatentDemand extends BaseEntity {
    @ExcelIgnore
    private Long userId;

    /*
    一种***方法 或 一种***装置
     */
    @ApiModelProperty(value = "专利名称")
    private String name;

    @ApiModelProperty(value = "包含关键字")
    private String keyword;

    /*
    脱密专利没有
     */
    @ApiModelProperty(value = "专利类型")
    private String patentType;
    @ApiModelProperty(value = "专利类型")
    private Long patentTypeId;

    /*
    脱密专利没有
     */

    @ApiModelProperty(value = "专利状态")
    private String patentStatus;
    @ApiModelProperty(value = "专利状态")
    private Long patentStatusId;

    /*
    setting
     */
    @ExcelIgnore
    @ApiModelProperty(value = "行业分类")
    private Long industryClass;

    @Searchable
    @ExcelIgnore
    @Column(columnDefinition = "TEXT")
    @ApiModelProperty(value = "需求描述")
    private String description;


    @ApiModelProperty(value = "转移转化方式")
    private String mode;
    @ApiModelProperty(value = "转移转化方式")
    private Long modeId;

    /*
    （万元）
     */
    @ApiModelProperty(value = "预算（万元）")
    private BigDecimal expectedPrice;

    @ApiModelProperty(value = "面议")
    private Boolean negotiateDirectly;

    @ApiModelProperty(value = "联系人")
    private String contact;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "所在地区")
    private String address;

    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "专利分类")
    private CaseType caseType;

    @Transient
    private String industryName;

    @ApiModelProperty(value = "浏览量")
    private long view;

    @Enumerated(EnumType.STRING)
    private ApplyStatus status;
}