package com.agileboot.domain.collaboration.record.db;

import com.agileboot.common.core.base.BaseEntity;
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 io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;

/**
 * @author codex
 */
@Getter
@Setter
@TableName("collaboration_expenditure")
@ApiModel(value = "CollaborationExpenditureEntity对象", description = "合作支出表")
public class CollaborationExpenditureEntity extends BaseEntity<CollaborationExpenditureEntity> {

    @TableId(value = "expenditure_id", type = IdType.AUTO)
    private Long expenditureId;

    @TableField("record_id")
    private Long recordId;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField("spend_date")
    private Date spendDate;

    @TableField("amount")
    private BigDecimal amount;

    @TableField("purpose")
    private String purpose;

    @Override
    public Serializable pkVal() {
        return this.expenditureId;
    }

}
