package com.ruoyi.credit.domain;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.credit.annotation.EncryptedField;

/**
 * 公司信息对象 dc_company_info
 * 
 * @author ruoyi
 * @date 2025-12-17
 */
public class CompanyInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 公司ID */
    private Long companyId;

    /** 公司名称 */
    @Excel(name = "公司名称")
    @NotBlank(message = "公司名称不能为空")
    @Size(max = 200, message = "公司名称长度不能超过200个字符")
    private String companyName;

    /** 公司类型 */
    @Excel(name = "公司类型")
    @NotBlank(message = "公司类型不能为空")
    @Size(max = 20, message = "公司类型长度不能超过20个字符")
    private String companyType;

    /** 统一社会信用代码 */
    @Excel(name = "统一社会信用代码")
    @NotBlank(message = "统一社会信用代码不能为空")
    @Size(max = 18, message = "统一社会信用代码长度不能超过18个字符")
    @Pattern(regexp = "^[0-9A-HJ-NPQRTUWXY]{2}\\d{6}[0-9A-HJ-NPQRTUWXY]{10}$", message = "统一社会信用代码格式不正确")
    private String creditCode;

    /** 法定代表人 */
    @Excel(name = "法定代表人")
    @NotBlank(message = "法定代表人不能为空")
    @Size(max = 50, message = "法定代表人长度不能超过50个字符")
    private String legalRepresentative;

    /** 注册地址(加密) */
    @Excel(name = "注册地址")
    @NotBlank(message = "注册地址不能为空")
    @Size(max = 500, message = "注册地址长度不能超过500个字符")
    @EncryptedField(algorithm = "AES-256-GCM")
    private String registeredAddress;

    /** 联系电话(加密) */
    @Excel(name = "联系电话")
    @NotBlank(message = "联系电话不能为空")
    @Size(max = 20, message = "联系电话长度不能超过20个字符")
    @EncryptedField(algorithm = "AES-256-GCM")
    private String contactPhone;

    /** 联系邮箱(加密) */
    @Excel(name = "联系邮箱")
    @Email(message = "邮箱格式不正确")
    @Size(max = 100, message = "联系邮箱长度不能超过100个字符")
    @EncryptedField(algorithm = "AES-256-GCM")
    private String contactEmail;

    /** 银行账户(加密) */
    @Excel(name = "银行账户")
    @Size(max = 50, message = "银行账户长度不能超过50个字符")
    @EncryptedField(algorithm = "AES-256-GCM")
    private String bankAccount;

    /** 开户银行 */
    @Excel(name = "开户银行")
    @Size(max = 100, message = "开户银行长度不能超过100个字符")
    private String bankName;

    /** 公司状态 */
    @Excel(name = "公司状态")
    @NotBlank(message = "公司状态不能为空")
    @Size(max = 20, message = "公司状态长度不能超过20个字符")
    private String companyStatus;

    /** 信用等级 */
    @Excel(name = "信用等级")
    @Size(max = 10, message = "信用等级长度不能超过10个字符")
    private String creditRating;

    public void setCompanyId(Long companyId) 
    {
        this.companyId = companyId;
    }

    public Long getCompanyId() 
    {
        return companyId;
    }
    public void setCompanyName(String companyName) 
    {
        this.companyName = companyName;
    }

    public String getCompanyName() 
    {
        return companyName;
    }
    public void setCompanyType(String companyType) 
    {
        this.companyType = companyType;
    }

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

    public String getCreditCode() 
    {
        return creditCode;
    }
    public void setLegalRepresentative(String legalRepresentative) 
    {
        this.legalRepresentative = legalRepresentative;
    }

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

    public String getRegisteredAddress() 
    {
        return registeredAddress;
    }
    public void setContactPhone(String contactPhone) 
    {
        this.contactPhone = contactPhone;
    }

    public String getContactPhone() 
    {
        return contactPhone;
    }
    public void setContactEmail(String contactEmail) 
    {
        this.contactEmail = contactEmail;
    }

    public String getContactEmail() 
    {
        return contactEmail;
    }
    public void setBankAccount(String bankAccount) 
    {
        this.bankAccount = bankAccount;
    }

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

    public String getBankName() 
    {
        return bankName;
    }
    public void setCompanyStatus(String companyStatus) 
    {
        this.companyStatus = companyStatus;
    }

    public String getCompanyStatus() 
    {
        return companyStatus;
    }
    public void setCreditRating(String creditRating) 
    {
        this.creditRating = creditRating;
    }

    public String getCreditRating() 
    {
        return creditRating;
    }

    @Override
    public String toString() {
        return "CompanyInfo{" +
                "companyId=" + companyId +
                ", companyName='" + companyName + '\'' +
                ", companyType='" + companyType + '\'' +
                ", creditCode='" + creditCode + '\'' +
                ", legalRepresentative='" + legalRepresentative + '\'' +
                ", registeredAddress='[ENCRYPTED]'" +
                ", contactPhone='[ENCRYPTED]'" +
                ", contactEmail='[ENCRYPTED]'" +
                ", bankAccount='[ENCRYPTED]'" +
                ", bankName='" + bankName + '\'' +
                ", companyStatus='" + companyStatus + '\'' +
                ", creditRating='" + creditRating + '\'' +
                '}';
    }
}