package com.dhcc.finance.main.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ApiModel(value = "CwGlVoucher",description = "凭证信息")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CwGlVoucher { 
    @ApiModelProperty(value = "凭证主键", required = true, example = "")
    private String pkVoucher;

    @ApiModelProperty(value = "账套主键", required = false, example = "")
    private String pkGlorgbook;
    
    @ApiModelProperty(value = "分期募集编号", required = false, example = "")
    private String fqmjbh;
    
    @ApiModelProperty(value = "凭证类型", required = false, example = "")
    private String pkVoucherty;

    @ApiModelProperty(value = "来源系统", required = false, example = "")
    private String pkSystem;
    
    @ApiModelProperty(value = "交易码", required = false, example = "")
    private String tradecode;

    @ApiModelProperty(value = "凭证状态", required = false, example = "")
    private String vouchertype;
    
    @ApiModelProperty(value = "摘要", required = false, example = "")
    private String abstracts;

    @ApiModelProperty(value = "制单人", required = false, example = "")
    private String pkPrepared;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "制单日期", required = false, example = "")
    private Date preparedate;

    @ApiModelProperty(value = "是否已审核", required = false, example = "")
    private String isaudit;

    @ApiModelProperty(value = "审核人", required = false, example = "")
    private String pkAudit;

    @ApiModelProperty(value = "审核时间", required = false, example = "")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date auditdate;

    @ApiModelProperty(value = "是否已记账", required = false, example = "")
    private String issign;

    @ApiModelProperty(value = "记账人", required = false, example = "")
    private String pkSign;

    @ApiModelProperty(value = "记账时间", required = false, example = "")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date signdate;

    @ApiModelProperty(value = "凭证号", required = false, example = "")
    private String voucherno;

    @ApiModelProperty(value = "是否修改", required = false, example = "")
    private String ismodify;

    @ApiModelProperty(value = "年度", required = false, example = "")
    private String year;

    @ApiModelProperty(value = "会计期间", required = false, example = "")
    private String period;

    @ApiModelProperty(value = "暂存标识", required = false, example = "")
    private String tempsave;

    @ApiModelProperty(value = "借方合计", required = false, example = "")
    private BigDecimal totaldebit;

    @ApiModelProperty(value = "贷方合计", required = false, example = "")
    private BigDecimal totalcredit;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "业务发生时间", required = false, example = "")
    private Date occDate;
    
    @ApiModelProperty(value = "使用状态", required = false, example = "")
    private String useState;

    @ApiModelProperty(value = "录入人员", required = false, example = "")
    private String createUser;

    @ApiModelProperty(value = "录入时间", required = false, example = "")
    private Date createTime;

    @ApiModelProperty(value = "最后修改人员", required = false, example = "")
    private String updateUser;

    @ApiModelProperty(value = "最后修改时间", required = false, example = "CURRENT_TIMESTAMP")
    private Date updateTime;

    @ApiModelProperty(value = "备注", required = false, example = "")
    private String remark;
    
    @Override 
    public boolean equals(Object obj) { 
    	if(obj == null){ 
            return false; 
        } 
    	if(this == obj) {
    		return true;
    	}
    	if(getClass() != obj.getClass()) {
    		return false;
    	}
    	CwGlVoucher other = (CwGlVoucher)obj; 
    	if(period ==null) {
    		if(other.period != null)
    			return false;
    	}else if (!period.equals(other.period)) {
    		return false;
    	}
    	if(pkGlorgbook ==null) {
    		if(other.pkGlorgbook != null)
    			return false;
    	}else if (!pkGlorgbook.equals(other.pkGlorgbook)) {
    		return false;
    	}
    	 return true;
    }
    @Override 
    public int hashCode() { 
    	final int prime=31;
    	int result = 1;
    	result = prime * result + ((period == null) ? 0 : period.hashCode());
    	result = prime * result + ((pkGlorgbook == null) ? 0 : pkGlorgbook.hashCode());
    	return result;
    }
}