/* * 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 me.zhengjie.modules.contract.domain; import lombok.Data; import cn.hutool.core.bean.BeanUtil; import io.swagger.annotations.ApiModelProperty; import cn.hutool.core.bean.copier.CopyOptions; import me.zhengjie.base.BaseEntity; import javax.persistence.*; import javax.validation.constraints.*; import java.sql.Timestamp; import java.math.BigDecimal; import java.io.Serializable; /** * @website https://eladmin.vip * @description / * @author 赵士淞 * @date 2023-02-02 **/ @Entity @Data @Table(name="contract_invoice") public class ContractInvoice extends BaseEntity implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "`invoice_id`") @ApiModelProperty(value = "ID") private Long invoiceId; @Column(name = "`contract_id`") @ApiModelProperty(value = "合同ID") private Long contractId; @Column(name = "`billing_time`") @ApiModelProperty(value = "开票时间") private Timestamp billingTime; @Column(name = "`invoice_type`") @ApiModelProperty(value = "发票类型") private String invoiceType; @Column(name = "`before_tax_amount`") @ApiModelProperty(value = "税前金额") private BigDecimal beforeTaxAmount; @Column(name = "`tax_rate`") @ApiModelProperty(value = "税率") private Double taxRate; @Column(name = "`tax_amount`") @ApiModelProperty(value = "税额") private BigDecimal taxAmount; @Column(name = "`after_tax_amount`") @ApiModelProperty(value = "税后金额") private BigDecimal afterTaxAmount; @Column(name = "`related_documents`") @ApiModelProperty(value = "相关文件") private String relatedDocuments; @Column(name = "`remarks`") @ApiModelProperty(value = "备注信息") private String remarks; public void copy(ContractInvoice source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } }