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

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 javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @author admin
* @date 2024-07-25
**/
@Entity
@Data
@Table(name="tb_handover")
public class TbHandover implements Serializable {

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

    @Column(name = "`trade_day`")
    @ApiModelProperty(value = "交班日期")
    private String tradeDay;

    @Column(name = "`print_no`")
    @ApiModelProperty(value = "打印机编号")
    private String printNo;

    @Column(name = "`duty_id`")
    @ApiModelProperty(value = "dutyId")
    private Integer dutyId;

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

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

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

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

    @Column(name = "`staff_id`")
    @ApiModelProperty(value = "staffId")
    private Integer staffId;

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

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

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

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

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

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

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

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



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


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



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



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



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



    @Column(name = "`create_time`")
    @ApiModelProperty(value = "createTime")
    private Timestamp createTime;




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