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_settlement")
@ApiModel(value = "CollaborationSettlementEntity对象", description = "合作结款表")
public class CollaborationSettlementEntity extends BaseEntity<CollaborationSettlementEntity> {

    @TableId(value = "settlement_id", type = IdType.AUTO)
    private Long settlementId;

    @TableField("record_id")
    private Long recordId;

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

    @TableField("method")
    private String method;

    @TableField("income")
    private BigDecimal income;

    @TableField("purpose")
    private String purpose;

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

}
