package com.kcim.dao.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 全院损益表
 *
 * @author huangrui
 * @email
 * @date 2021-08-27 14:20:53
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("cost_hosp_profit_and_loss")
public class HospProfitAndLoss implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private Long id;
    /**
     * 年
     */
    private Integer dateYear;
    /**
     * 月
     */
    private Integer dateMonth;
    /**
     * 报表项目id
     */
    private Integer reportNum;
    /**
     * 报表项目名称
     */
    private String reportName;
    /**
     * 成本类型
     */
    private Integer costType;
    /**
     * 收入类型
     */
    private Integer incomeType;

    // 0. 报表项目 1. 全院其他收支
    private Integer originType;
    /**
     * 金额
     */
    private BigDecimal amount;
    private Long hospId;

    private String responsibilityCode;

    private String responsibilityName;

    private Integer reportType;
    /**
     * 创建时间
     */
    private Long createTime;
    /**
     * 删除时间
     */
    @TableLogic(value = "0", delval = "UNIX_TIMESTAMP(NOW()) * 1000")
    private Long deleteTime;

    private BigDecimal percent;

    @TableField(exist = false)
    private Integer type;

    @TableField(exist = false)
    private Integer fraction;

    /**
     * 父类责任中心名称
     */
    @TableField(exist = false)
    private String parentResponsibilityCode;
    @TableField(exist = false)
    private String parentResponsibilityName;

    /**
     * 预算金额
     */
    private BigDecimal budgetAmount;

    /**
     * 上期金额
     */
    private BigDecimal prevPeriodAmount;

    /**
     * 同期金额
     */
    private BigDecimal samePeriodAmount;

    /**
     * 完成率
     */
    private BigDecimal completionRate;

    /**
     * 环比
     */
    private BigDecimal momRate;

    /**
     * 同比
     */
    private BigDecimal yoyRate;
}
