/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package cn.ysk.cashier.pojo;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import java.sql.Timestamp;
import java.math.BigDecimal;
import java.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author admin
* @date 2023-10-30
**/
@Entity
@Data
@Table(name="bot_user")
public class BotUser implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "`father_id`")
    @ApiModelProperty(value = "fatherId")
    private Integer fatherId;

    @Column(name = "`father_telegram_id`")
    @ApiModelProperty(value = "父级电报号")
    private String fatherTelegramId;

    @Column(name = "`user_telegram_id`")
    @ApiModelProperty(value = "电报号")
    private String userTelegramId;

    @Column(name = "`user_name`")
    @ApiModelProperty(value = "用户名称")
    private String userName;

    @Column(name = "`group_telegram_id`")
    @ApiModelProperty(value = "组电报号")
    private String groupTelegramId;

    @Column(name = "`user_code`")
    @ApiModelProperty(value = "用户代码")
    private String userCode;

    @Column(name = "`user_pay_pass`")
    @ApiModelProperty(value = "userPayPass")
    private String userPayPass;

    @Column(name = "`bomb_status`")
    @ApiModelProperty(value = "bombStatus")
    private String bombStatus;

    @Column(name = "`bot_status`")
    @ApiModelProperty(value = "用户状态")
    private String botStatus;

    @Column(name = "`usdt_recharge_total`")
    @ApiModelProperty(value = "总充值")
    private BigDecimal usdtRechargeTotal;

    @Column(name = "`usdt_withdraw_total`")
    @ApiModelProperty(value = "总提现")
    private BigDecimal usdtWithdrawTotal;

    @Column(name = "`balance`")
    @ApiModelProperty(value = "总资金")
    private BigDecimal balance;

    @Column(name = "`freeze_balance`")
    @ApiModelProperty(value = "冻结资金")
    private BigDecimal freezeBalance;

    @Column(name = "`version`")
    @ApiModelProperty(value = "版本号")
    private Integer version;

    @Column(name = "`create_time`")
    @ApiModelProperty(value = "创建时间")
    private Timestamp createTime;

    @Column(name = "`update_time`")
    @ApiModelProperty(value = "更新时间")
    private Timestamp updateTime;

    @Column(name = "`user_language`")
    @ApiModelProperty(value = "语言")
    private String userLanguage;

    @Column(name = "`chip_balance`")
    @ApiModelProperty(value = "质押资金")
    private BigDecimal chipBalance;

    @Column(name = "`father_bind_time`")
    @ApiModelProperty(value = "绑定时间")
    private Timestamp fatherBindTime;

    public void copy(BotUser source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
