package com.izouma.zhirongip.domain.demand;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.izouma.zhirongip.annotations.Searchable;
import com.izouma.zhirongip.domain.BaseEntity;
import com.izouma.zhirongip.enums.*;
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 TechProductDemand extends BaseEntity {
    @ExcelIgnore
    private Long userId;

    @Searchable
    @ApiModelProperty(value = "产品名称")
    private String name;

    /*
    setting
     */
    @ExcelIgnore
    @ApiModelProperty(value = "所属行业")
    private Long industry;

    /*
    技术没有
     */
    @ApiModelProperty(value = "是否需要专利技术")
    private Boolean isPatented;

    /*
    技术没有 选择是时，出现
    */
    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "专利类型")
    private PatentType patentType;

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

    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "所属阶段")
    private Stage stage;


    @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;

    @ExcelIgnore
    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "技术/产品")
    private TpType tpType;

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

    @Enumerated(EnumType.STRING)
    private ApplyStatus status;

    @Transient
    private String industryName;
}
