/*
*  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-01-08
**/
@Entity
@Data
@Table(name="tb_receipt_sales")
public class TbReceiptSales implements Serializable {

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

    @Column(name = "`title`")
    @ApiModelProperty(value = "标题")
    private String title="";

    @Column(name = "`logo`")
    @ApiModelProperty(value = "是否显示公司Logo")
    private String logo="";

    @Column(name = "`show_contact_info`")
    @ApiModelProperty(value = "打印联系电话等信息")
    private Integer showContactInfo=0;

    @Column(name = "`show_member`")
    @ApiModelProperty(value = "打印会员开关 0？1")
    private Integer showMember=0;

    @Column(name = "`show_member_code`")
    @ApiModelProperty(value = "打印会员编号开关")
    private Integer showMemberCode=0;

    @Column(name = "`show_member_score`")
    @ApiModelProperty(value = "打印会员积分")
    private Integer showMemberScore=0;

    @Column(name = "`show_member_wallet`")
    @ApiModelProperty(value = "打印会员余额开关 0？1")
    private Integer showMemberWallet=0;

    @Column(name = "`footer_remark`")
    @ApiModelProperty(value = "店铺Id")
    private String footerRemark="";

    @Column(name = "`show_cash_charge`")
    @ApiModelProperty(value = "打印找零")
    private Integer showCashCharge=0;

    @Column(name = "`show_serial_no`")
    @ApiModelProperty(value = "流水号")
    private Integer showSerialNo=0;

    @Column(name = "`big_serial_no`")
    @ApiModelProperty(value = "用大号字打印流水号  在showSerialNo可用前提下")
    private Integer bigSerialNo;

    @Column(name = "`header_text`")
    @ApiModelProperty(value = "头部文字")
    private String headerText;

    @Column(name = "`header_text_align`")
    @ApiModelProperty(value = "文字 对齐方式")
    private String headerTextAlign;

    @Column(name = "`footer_text`")
    @ApiModelProperty(value = "尾部文字")
    private String footerText="";

    @Column(name = "`footer_text_align`")
    @ApiModelProperty(value = "文字 对齐方式")
    private String footerTextAlign;

    @Column(name = "`footer_image`")
    @ApiModelProperty(value = "尾部图像")
    private String footerImage="";

    @Column(name = "`pre_print`")
    @ApiModelProperty(value = "预打印，YES开启 NO不开启")
    private String prePrint;

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

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

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