contract CommunityToken is HashFutureToken{

    string internal privilege;
    string internal contractIntroduction;

    constructor() HashFutureToken("HashFuture CommunityToken", "HFCT") public {
        privilege = "1.Privilege of enjoying a monthly airdrop of 10 Antarctic Lands; 2.Privilege of enjoying higher priority in pre-sale shares of tokenized assets in HashFuture trading platform; 3.Privilege of 20% discount in the commission fee of trading in HashFuture trading platform;";
        contractIntroduction = "1. This token cannot be transferred, only the holder himself or herself can hold the token and enjoy the privileges; 2. The privileges of this token will be upgraded with the development of HashFuture; 3. If the holder quits from the HashFuture platform, this token and its privileges will be destroyed as well;";
    }

    struct IdentityInfo {
        string hashID;
        string name;
        string country;
    }

    mapping(uint256 => IdentityInfo) IdentityInfoOfId;

    /**
     * @param _hashID token holder customized field, the HashFuture account ID
     * @param _name token holder customized field, the name of the holder
     * @param _country token holder customized field.
     **/
    function issueToken(
        address _to,
        string _hashID,
        string _name,
        string _country
    )
        public onlyOwner
    {
        uint256 _tokenId = allTokens.length;

        IdentityInfoOfId[_tokenId] = IdentityInfo(
            _hashID, _name, _country
        );

        _mint(_to, _tokenId);
    }

    /**
     * @dev the contract owner can burn (recycle) any token in circulation.
     **/
    function burnToken(uint256 _tokenId) public onlyOwner{
        address tokenOwner = ownerOf(_tokenId);
        require(tokenOwner != address(0));

        delete IdentityInfoOfId[_tokenId];
        _burn(tokenOwner, _tokenId);
    }

    /**
     * @dev Get the holder's info of a token.
     * @param _tokenId id of interested token
     **/
    function getTokenInfo(uint256 _tokenId) external view returns (string, string, string) {
        address tokenOwner = ownerOf(_tokenId);
        require(tokenOwner != address(0));

        IdentityInfo storage pInfo = IdentityInfoOfId[_tokenId];
        return (
            pInfo.hashID,
            pInfo.name,
            pInfo.country
        );
    }

    /**
     * @dev Get the privilege of the token
     **/
    function getPrivilege() external view returns (string) {
        return privilege;
    }

    /**
     * @dev Get the introduction of the token
     **/
    function getContractIntroduction() external view returns (string) {
        return contractIntroduction;
    }

    /**
     * @dev Update token holder's privileges
     * only official operator can use this function
     **/
    function updatePrivilege(string _privilege) public onlyOwner {
        privilege = _privilege;
    }

}
/**
 * Official token issued by HashFuture Inc.
 * This is the token for HashFuture pioneers.
 */
function issueToken(
    address _to,
    string _hashID,
    string _name,
    string _country
)
    public onlyOwner
{
    uint256 _tokenId = allTokens.length;

    IdentityInfoOfId[_tokenId] = IdentityInfo(
        _hashID, _name, _country
    );

    _mint(_to, _tokenId);
}

/**
 * @param _hashID token holder customized field, the HashFuture account ID
 * @param _name token holder customized field, the name of the holder
 * @param _country token holder customized field.
 **/