package cn.ezhizao.project.business.order.domain;

import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
import cn.ezhizao.framework.web.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 合同明细对象 biz_archive_input_detail
 *
 * @author ruoyi
 * @date 2023-10-16
 */
@Data
@TableName(value = "biz_archive_input_detail")
public class BizArchiveInputDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 合同外键 */
    @ApiModelProperty(value = "${comment}")
    private Long contractId;

    /** 任务类型外键 */
    @ApiModelProperty(value = "${comment}")
    private Long taskTypeId;

    @ApiModelProperty("任务名称")
    @TableField(exist = false)
    private String taskTypeName;

    @ApiModelProperty(value = "客户外键")
    private Long companyId;

    /** 月数 */
//    @Excel(name = "月数")
//    @ApiModelProperty(value = "月数")
//    private Integer monthNum;

    /** 单价 */
    @Excel(name = "单价")
    @ApiModelProperty(value = "单价")
    private BigDecimal price;

    /** 总金额 */
    @Excel(name = "总金额")
    @ApiModelProperty(value = "总金额")
    private BigDecimal amount;

    /** 总金额 */
    @Excel(name = "总金额")
    @ApiModelProperty(value = "总金额")
    private BigDecimal addressAmount;

    /** $column.columnComment */
    @ApiModelProperty(value = "租户外键")
    private Long tenantId;

    @TableField(exist = false)
    private List<BizArchiveInputDetailProcess> processes;

    @TableField(exist = false)
    private Integer payAddress;

    @ApiModelProperty("地址类型")
    @Excel(name = "地址类型", readConverterExp = "1=自有地址,2=虚拟地址")
    private Integer addressStyle;

    @ApiModelProperty("地址")
    private String address;

    @ApiModelProperty("虚拟地址外键")
    private Long fictionAddressId;

    @Excel(name = "注册省份编码")
    @ApiModelProperty(value = "注册省份编码")
    private String provinceCode;

    /** 省 */
    @Excel(name = "省")
    @ApiModelProperty(value = "省")
    private String province;

    /** 注册城市编码 */
    @Excel(name = "注册城市编码")
    @ApiModelProperty(value = "注册城市编码")
    private String cityCode;

    /** 市 */
    @Excel(name = "市")
    @ApiModelProperty(value = "市")
    private String city;

    /** 注册行政区编码 */
    @Excel(name = "注册行政区编码")
    @ApiModelProperty(value = "注册行政区编码")
    private String districtCode;

    /** 区 */
    @Excel(name = "区")
    @ApiModelProperty(value = "区")
    private String district;


    @ApiModelProperty("服务月数")
    @Excel(name = "服务月数")
    private Integer serviceNum;
    @ApiModelProperty(name = "赠送月数")
    @Excel(name = "赠送月数")
    private Integer freeNum;

    @ApiModelProperty("变更来源外键")
    private Long fromId;

    @TableField(exist = false)
    private Boolean redirect;
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endMonth;

    @ApiModelProperty("变更类型")
    private String alterType;
}
