package com.xinelu.manage.domain.patientsignininfo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * 会员用户签到记录对象 patient_sign_in_info
 *
 * @author xinyilu
 * @date 2023-02-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "会员用户签到记录对象", description = "patient_sign_in_info")
public class PatientSignInInfo extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -6783715945093928258L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 会员id
     */
    @ApiModelProperty(value = "会员id")
    @Excel(name = "会员id")
    private Long patientId;

    /**
     * 签到时间，yyyy-MM-dd，同一天只记录一次
     */
    @ApiModelProperty(value = "签到时间，yyyy-MM-dd，同一天只记录一次")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签到时间，yyyy-MM-dd，同一天只记录一次", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDate signInTime;

    /**
     * 签到方式，手机App：MOBILE_APP，微信小程序：WECHAT_APPLET，支付宝小程序：ALI_PAY_APPLET
     */
    @ApiModelProperty(value = "签到方式，手机App：MOBILE_APP，微信小程序：WECHAT_APPLET，支付宝小程序：ALI_PAY_APPLET")
    @Excel(name = "签到方式，手机App：MOBILE_APP，微信小程序：WECHAT_APPLET，支付宝小程序：ALI_PAY_APPLET")
    private String signInChannel;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("patientId", getPatientId())
                .append("signInTime", getSignInTime())
                .append("signInChannel", getSignInChannel())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
