package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.GeneratedValue;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * usermargin对象 user_margin
 * 
 * @author ruoyi
 * @date 2023-08-03
 */
@Data
@TableName(value = "user_margin")
@EqualsAndHashCode(callSuper = false)
public class UserMargin
{
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @GeneratedValue
    /** id */
    private Long id;

    /** 订单id */
    @Excel(name = "订单id")
    private String ddId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 保证金类型（0商户，1骑手） */
    @Excel(name = "保证金类型", readConverterExp = "0=商户，1骑手")
    private Long type;

    /** 金额 */
    @Excel(name = "金额")
    private BigDecimal amount;

    /** 属性 */
    @Excel(name = "属性")
    private Long state;

    /** 支付连接 */
    @Excel(name = "支付连接")
    private String payUrl;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date cretim;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setType(Long type) 
    {
        this.type = type;
    }

    public Long getType() 
    {
        return type;
    }
    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }
    public void setCretim(Date cretim) 
    {
        this.cretim = cretim;
    }

    public Date getCretim() 
    {
        return cretim;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("type", getType())
            .append("amount", getAmount())
            .append("cretim", getCretim())
            .toString();
    }
}
