package com.yh.saas.plugin.yiliangyiyun.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;

import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yh.saas.common.support.entity.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 收支明细
 * </p>
 *
 * @author Gdc
 * @since 2022-03-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("reve_expe_info")
public class ReveExpeInfo extends BaseModel<ReveExpeInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.UUID)
    private String id;
    /**
     * 公司id
     */
    private String compId;
    /**
     * 收支类型
     */
    private String reexType;
    /**
     * 收支类型key
     */
    private String reexTypeKey;
    /**
     * 金额
     */
    private Double amountMoney;
    /**
     * 费用名称
     */
    private String expenseName;
    /**
     * 费用说明
     */
    private String expenseRemarks;
    /**
     * 毛利润
     */
    private Double grossProfit;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date startDate;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date endDate;
    /**
     * 模糊查询
     */
    @TableField(exist = false)
    private String searchKeyWord;
    /**
     * 查询类型
     */
    @TableField(exist = false)
    private String searchType;

    /**
     * 合同收入
     */
    @TableField(exist = false)
    private Double inContractMoney;
    /**
     * 合同支出
     */
    @TableField(exist = false)
    private Double outContractMoney;
    /**
     * 仓库收入
     */
    @TableField(exist = false)
    private Double inWarehouseMoney;
    /**
     * 仓库支出
     */
    @TableField(exist = false)
    private Double outWarehouseMoney;
    /**
     * 经营收入
     */
    @TableField(exist = false)
    private Double inManageMoney;
    /**
     * 经营支出
     */
    @TableField(exist = false)
    private Double outManageMoney;
    /**
     * 总收入
     */
    @TableField(exist = false)
    private Double inTotalMoney;
    /**
     * 总支出
     */
    @TableField(exist = false)
    private Double outTotalMoney;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
