package com.ruoyi.blockchain.domain;

import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 智能合约对象 dc_smart_contract
 * 
 * @author ruoyi
 * @date 2025-12-17
 */
public class SmartContract extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 合约ID */
    private Long contractId;

    /** 合约名称 */
    @Excel(name = "合约名称")
    @NotBlank(message = "合约名称不能为空")
    @Size(max = 100, message = "合约名称长度不能超过100个字符")
    private String contractName;

    /** 合约地址 */
    @Excel(name = "合约地址")
    @NotBlank(message = "合约地址不能为空")
    @Size(max = 100, message = "合约地址长度不能超过100个字符")
    private String contractAddress;

    /** 合约版本 */
    @Excel(name = "合约版本")
    @NotBlank(message = "合约版本不能为空")
    @Size(max = 20, message = "合约版本长度不能超过20个字符")
    private String contractVersion;

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

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

    /** 部署交易哈希 */
    @Excel(name = "部署交易哈希")
    @Size(max = 128, message = "部署交易哈希长度不能超过128个字符")
    private String deployTxHash;

    /** 部署时间 */
    @Excel(name = "部署时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "部署时间不能为空")
    private Date deployTime;

    /** 部署者地址 */
    @Excel(name = "部署者地址")
    @Size(max = 100, message = "部署者地址长度不能超过100个字符")
    private String deployerAddress;

    /** 合约ABI */
    @Size(max = 5000, message = "合约ABI长度不能超过5000个字符")
    private String contractAbi;

    /** 合约字节码 */
    @Size(max = 10000, message = "合约字节码长度不能超过10000个字符")
    private String contractBytecode;

    /** 描述 */
    @Excel(name = "描述")
    @Size(max = 500, message = "描述长度不能超过500个字符")
    private String description;

    public void setContractId(Long contractId) 
    {
        this.contractId = contractId;
    }

    public Long getContractId() 
    {
        return contractId;
    }
    public void setContractName(String contractName) 
    {
        this.contractName = contractName;
    }

    public String getContractName() 
    {
        return contractName;
    }
    public void setContractAddress(String contractAddress) 
    {
        this.contractAddress = contractAddress;
    }

    public String getContractAddress() 
    {
        return contractAddress;
    }
    public void setContractVersion(String contractVersion) 
    {
        this.contractVersion = contractVersion;
    }

    public String getContractVersion() 
    {
        return contractVersion;
    }
    public void setContractType(String contractType) 
    {
        this.contractType = contractType;
    }

    public String getContractType() 
    {
        return contractType;
    }
    public void setContractStatus(String contractStatus) 
    {
        this.contractStatus = contractStatus;
    }

    public String getContractStatus() 
    {
        return contractStatus;
    }
    public void setDeployTxHash(String deployTxHash) 
    {
        this.deployTxHash = deployTxHash;
    }

    public String getDeployTxHash() 
    {
        return deployTxHash;
    }
    public void setDeployTime(Date deployTime) 
    {
        this.deployTime = deployTime;
    }

    public Date getDeployTime() 
    {
        return deployTime;
    }
    public void setDeployerAddress(String deployerAddress) 
    {
        this.deployerAddress = deployerAddress;
    }

    public String getDeployerAddress() 
    {
        return deployerAddress;
    }
    public void setContractAbi(String contractAbi) 
    {
        this.contractAbi = contractAbi;
    }

    public String getContractAbi() 
    {
        return contractAbi;
    }
    public void setContractBytecode(String contractBytecode) 
    {
        this.contractBytecode = contractBytecode;
    }

    public String getContractBytecode() 
    {
        return contractBytecode;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    @Override
    public String toString() {
        return "SmartContract{" +
                "contractId=" + contractId +
                ", contractName='" + contractName + '\'' +
                ", contractAddress='" + contractAddress + '\'' +
                ", contractVersion='" + contractVersion + '\'' +
                ", contractType='" + contractType + '\'' +
                ", contractStatus='" + contractStatus + '\'' +
                ", deployTxHash='" + deployTxHash + '\'' +
                ", deployTime=" + deployTime +
                ", deployerAddress='" + deployerAddress + '\'' +
                ", contractAbi='" + contractAbi + '\'' +
                ", contractBytecode='" + contractBytecode + '\'' +
                ", description='" + description + '\'' +
                '}';
    }
}