package com.gci.boot.modules.finance.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@TableName("tb_finance_base")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="财务测算基本表", description="财务测算基本表")
public class BaseFinance implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ExcelIgnore
    private String id;

    /**
     * 项目
     */
    private String projectId;
    /**
     * 租赁年限
     */
    private Integer yearLimit;
    /**
     * 融资比例（%）
     */
    private BigDecimal financingRatio;
    /**
     * 融资利率（%）
     */
    private BigDecimal financingRate;
    /**
     * 管理费用分担（%）
     */
    private BigDecimal overheadSharing;

    @JsonPropertyDescription("所属机构")
    @ExcelIgnore
    private String sysOrgCode;
    @JsonPropertyDescription("创建时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private Date createTime;
    @JsonPropertyDescription("更新时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private Date updateTime;
    @JsonPropertyDescription("创建人")
    @ExcelIgnore
    private String createBy;
    @JsonPropertyDescription("更新人")
    @ExcelIgnore
    private String updateBy;

    /**
     * 车辆费用子项
     */
    @ExcelIgnore
    @TableField(exist = false)
    private List<FinanceVehicleCost> vehicleCostList;

}
