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

/**
* @website https://eladmin.vip
* @description /
* @author lyf
* @date 2023-11-03
**/
@Entity
@Data
@Table(name="tb_shop_pay_type")
public class TbShopPayType implements Serializable {

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

    @Column(name = "`pay_type`")
    @ApiModelProperty(value = "支付类型cash,alipay,weixin,deposit,arrears,virtual,member-account")
    private String payType;

    @Column(name = "`pay_name`")
    @ApiModelProperty(value = "支付类型名称支付类型名称：现金，支付宝，刷卡deposit，挂单arrears，储值member-account自定义virtual")
    private String payName;

    @Column(name = "`is_show_shortcut`")
    @ApiModelProperty(value = "是否快捷展示1是0否")
    private Integer isShowShortcut;

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

    @Column(name = "`is_refundable`")
    @ApiModelProperty(value = "0允许退款 1-不允许退款")
    private Integer isRefundable;

    @Column(name = "`is_open_cash_drawer`")
    @ApiModelProperty(value = "是否打开钱箱")
    private Integer isOpenCashDrawer;

    @Column(name = "`is_system`")
    @ApiModelProperty(value = "0不是 1是 [系统级支付]")
    private Integer isSystem;

    @Column(name = "`is_ideal`")
    @ApiModelProperty(value = "0-非虚拟 1虚拟 virtual")
    private Integer isIdeal;

    @Column(name = "`is_display`")
    @ApiModelProperty(value = "0-不显示1显示")
    private Integer isDisplay;

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

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

    @Column(name = "`sorts`")
    @ApiModelProperty(value = "排序")
    private Integer sorts;

    @Column(name = "icon")
    @ApiModelProperty(value = "图标")
    private String icon;

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