contract AdditionalToken is MintableToken {

    uint256 public maxProportion;
    uint256 public lockedYears;
    uint256 public initTime;

    mapping(uint256 => uint256) public records;
    mapping(uint256 => uint256) public maxAmountPer;
    
    event MintRequest(uint256 _curTimes, uint256 _maxAmountPer, uint256 _curAmount);


    constructor(uint256 _maxProportion, uint256 _lockedYears) public {
        require(_maxProportion >= 0);
        require(_lockedYears >= 0);
        
        maxProportion = _maxProportion;
        lockedYears = _lockedYears;
        initTime = block.timestamp;
    }

  /**
   * @dev Function to Increase tokens
   * @param _to The address that will receive the minted tokens.
   * @param _amount The amount of the minted tokens.
   * @return A boolean that indicates if the operation was successful.
   */
    function mint(address _to, uint256 _amount) onlyAdminer public returns (bool) {
        uint256 curTime = block.timestamp;
        uint256 curTimes = curTime.sub(initTime)/(31536000);
        
        require(curTimes >= lockedYears);
        
        uint256 _maxAmountPer;
        if(maxAmountPer[curTimes] == 0) {
            maxAmountPer[curTimes] = totalSupply.mul(maxProportion).div(100);
        }
        _maxAmountPer = maxAmountPer[curTimes];
        require(records[curTimes].add(_amount) <= _maxAmountPer);
        records[curTimes] = records[curTimes].add(_amount);
        emit MintRequest(curTimes, _maxAmountPer, records[curTimes]);        
        return(super.mint(_to, _amount));
    }

}
/**
 * @title Additioal token
 * @dev Mintable token with a token can be increased with proportion.
 */
function mint(address _to, uint256 _amount) onlyAdminer public returns (bool) {
    uint256 curTime = block.timestamp;
    uint256 curTimes = curTime.sub(initTime)/(31536000);
        
    require(curTimes >= lockedYears);
        
    uint256 _maxAmountPer;
    if(maxAmountPer[curTimes] == 0) {
        maxAmountPer[curTimes] = totalSupply.mul(maxProportion).div(100);
    }
    _maxAmountPer = maxAmountPer[curTimes];
    require(records[curTimes].add(_amount) <= _maxAmountPer);
    records[curTimes] = records[curTimes].add(_amount);
    emit MintRequest(curTimes, _maxAmountPer, records[curTimes]);        
    return(super.mint(_to, _amount));
}

/**
 * @dev Function to Increase tokens
 * @param _to The address that will receive the minted tokens.
 * @param _amount The amount of the minted tokens.
 * @return A boolean that indicates if the operation was successful.
 */