package com.huimv.employment.service.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 小程序当前用户信息，含登记状态及企业/临时工详情。
 */
@Schema(description = "小程序用户信息（含登记状态）")
public class MpUserInfoResponse {

    @Schema(description = "用户类型：enterprise / worker", example = "enterprise")
    private String userType;

    @Schema(description = "是否已完成档案登记", example = "false")
    private boolean registered;

    @Schema(description = "登录账号手机号脱敏", example = "138****8000")
    private String mobileMask;

    @Schema(description = "企业登记信息（userType=enterprise 且已登记时有值）")
    private EnterpriseInfo enterprise;

    @Schema(description = "临时工登记信息（userType=worker 且已登记时有值）")
    private WorkerInfo worker;

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public boolean isRegistered() {
        return registered;
    }

    public void setRegistered(boolean registered) {
        this.registered = registered;
    }

    public String getMobileMask() {
        return mobileMask;
    }

    public void setMobileMask(String mobileMask) {
        this.mobileMask = mobileMask;
    }

    public EnterpriseInfo getEnterprise() {
        return enterprise;
    }

    public void setEnterprise(EnterpriseInfo enterprise) {
        this.enterprise = enterprise;
    }

    public WorkerInfo getWorker() {
        return worker;
    }

    public void setWorker(WorkerInfo worker) {
        this.worker = worker;
    }

    /** 企业登记信息 */
    @Schema(description = "企业登记详情")
    public static class EnterpriseInfo {

        @Schema(description = "企业 ID", example = "1")
        private Long enterpriseId;

        @Schema(description = "企业编号")
        private String enterpriseCode;

        @Schema(description = "企业名称")
        private String name;

        @Schema(description = "统一社会信用代码")
        private String creditCode;

        @Schema(description = "法人姓名")
        private String legalPerson;

        @Schema(description = "法人身份证号（明文，仅本人企业 getInfo 回显）", example = "110101199001011234")
        private String legalPersonIdCard;

        @Schema(description = "法人身份证号脱敏")
        private String legalPersonIdCardMask;

        @Schema(description = "注册地址")
        private String registeredAddress;

        @Schema(description = "联系人姓名")
        private String contactName;

        @Schema(description = "联系人/法人手机号（明文，未脱敏，仅本人企业 getInfo 回显）", example = "13912345678")
        private String contactMobile;

        @Schema(description = "联系人手机号脱敏")
        private String contactMobileMask;

        @Schema(description = "认证状态")
        private String authStatus;

        public Long getEnterpriseId() {
            return enterpriseId;
        }

        public void setEnterpriseId(Long enterpriseId) {
            this.enterpriseId = enterpriseId;
        }

        public String getEnterpriseCode() {
            return enterpriseCode;
        }

        public void setEnterpriseCode(String enterpriseCode) {
            this.enterpriseCode = enterpriseCode;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getCreditCode() {
            return creditCode;
        }

        public void setCreditCode(String creditCode) {
            this.creditCode = creditCode;
        }

        public String getLegalPerson() {
            return legalPerson;
        }

        public void setLegalPerson(String legalPerson) {
            this.legalPerson = legalPerson;
        }

        public String getLegalPersonIdCard() {
            return legalPersonIdCard;
        }

        public void setLegalPersonIdCard(String legalPersonIdCard) {
            this.legalPersonIdCard = legalPersonIdCard;
        }

        public String getLegalPersonIdCardMask() {
            return legalPersonIdCardMask;
        }

        public void setLegalPersonIdCardMask(String legalPersonIdCardMask) {
            this.legalPersonIdCardMask = legalPersonIdCardMask;
        }

        public String getRegisteredAddress() {
            return registeredAddress;
        }

        public void setRegisteredAddress(String registeredAddress) {
            this.registeredAddress = registeredAddress;
        }

        public String getContactName() {
            return contactName;
        }

        public void setContactName(String contactName) {
            this.contactName = contactName;
        }

        public String getContactMobile() {
            return contactMobile;
        }

        public void setContactMobile(String contactMobile) {
            this.contactMobile = contactMobile;
        }

        public String getContactMobileMask() {
            return contactMobileMask;
        }

        public void setContactMobileMask(String contactMobileMask) {
            this.contactMobileMask = contactMobileMask;
        }

        public String getAuthStatus() {
            return authStatus;
        }

        public void setAuthStatus(String authStatus) {
            this.authStatus = authStatus;
        }
    }

    /** 临时工登记信息 */
    @Schema(description = "临时工登记详情")
    public static class WorkerInfo {

        @Schema(description = "临时工 ID", example = "1")
        private Long workerId;

        @Schema(description = "临时工编号")
        private String workerNo;

        @Schema(description = "真实姓名")
        private String realName;

        @Schema(description = "手机号脱敏")
        private String mobileMask;

        @Schema(description = "身份证号脱敏")
        private String idCardNoMask;

        @Schema(description = "银行卡号脱敏")
        private String bankAccountMask;

        @Schema(description = "开户银行")
        private String bankName;

        @Schema(description = "开户支行")
        private String bankBranch;

        @Schema(description = "实名认证状态")
        private String verifyStatus;

        public Long getWorkerId() {
            return workerId;
        }

        public void setWorkerId(Long workerId) {
            this.workerId = workerId;
        }

        public String getWorkerNo() {
            return workerNo;
        }

        public void setWorkerNo(String workerNo) {
            this.workerNo = workerNo;
        }

        public String getRealName() {
            return realName;
        }

        public void setRealName(String realName) {
            this.realName = realName;
        }

        public String getMobileMask() {
            return mobileMask;
        }

        public void setMobileMask(String mobileMask) {
            this.mobileMask = mobileMask;
        }

        public String getIdCardNoMask() {
            return idCardNoMask;
        }

        public void setIdCardNoMask(String idCardNoMask) {
            this.idCardNoMask = idCardNoMask;
        }

        public String getBankAccountMask() {
            return bankAccountMask;
        }

        public void setBankAccountMask(String bankAccountMask) {
            this.bankAccountMask = bankAccountMask;
        }

        public String getBankName() {
            return bankName;
        }

        public void setBankName(String bankName) {
            this.bankName = bankName;
        }

        public String getBankBranch() {
            return bankBranch;
        }

        public void setBankBranch(String bankBranch) {
            this.bankBranch = bankBranch;
        }

        public String getVerifyStatus() {
            return verifyStatus;
        }

        public void setVerifyStatus(String verifyStatus) {
            this.verifyStatus = verifyStatus;
        }
    }
}
