/*
*  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.shop;

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.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author lyf
* @date 2024-02-02
**/
@Entity
@Data
@Table(name="tb_merchant_third_apply")
public class TbMerchantThirdApply implements Serializable {

    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "自增id")
    private Integer id;

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

    @Column(name = "`app_id`",unique = true)
    @ApiModelProperty(value = "商户应用")
    private String appId;

    @Column(name = "`small_appid`")
    @ApiModelProperty(value = "小程序appid")
    private String smallAppid;

    @Column(name = "`store_id`")
    @ApiModelProperty(value = "店铺id")
    private String storeId;

    @Column(name = "`app_token`")
    @ApiModelProperty(value = "商户token")
    private String appToken;

    @Column(name = "`status`")
    @ApiModelProperty(value = "审核详情-1未提交，0已提交（不可修改） 1审核通过")
    private Integer status;

    @Column(name = "`pay_password`")
    @ApiModelProperty(value = "支付密码")
    private String payPassword;

    @Column(name = "`created_at`")
    @ApiModelProperty(value = "createdAt")
    private Long createdAt;

    @Column(name = "`updated_at`")
    @ApiModelProperty(value = "updatedAt")
    private Long updatedAt;

    @Column(name = "`shop_id`")
    @ApiModelProperty(value = "shopId")
    private Integer shopId;

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