contract ChainDrawingsGeneration is ChainDrawingsAuction {
  //为原创者创建上链跑图
  function createAuthorDrawings(bytes32 _chainID, 
                                bytes32 _author, 
                                address _owner, 
                                string _metaUrl) public onlyOwner {
    //通过chainID查找跑图
    uint256 tokenID = chainIDToTokenID[_chainID];
    if(tokenID != 0){  //链跑图已存在，仅修改跑图属性
      ChainDrawings storage drawing = drawings[tokenID];
      drawing.author = _author;

      return;
    }

    if(_owner == address(0)){
      _owner = owner;
    }
    _createDrawings(_chainID, _author, _owner, _metaUrl);
  }

  //为跑地图创建上链跑图(原创者署名为”跑地图“的跑图，即是创意跑步设计作品)
  function createInternalAuction(bytes32 _chainID, 
                                bytes32 _author, 
                                uint256 _startingPrice,
                                uint256 _endingPrice,
                                uint256 _duration, 
                                string _metaUrl) public onlyOwner {
    //通过chainID查找跑图
    uint256 tokenID  = chainIDToTokenID[_chainID];
    if(tokenID != 0){  //链跑图已存在，仅修改跑图属性
      ChainDrawings storage drawing = drawings[tokenID];
      drawing.author = _author;

      return;
    }

    uint256 newTokenID = _createDrawings(_chainID, _author, address(this), _metaUrl);
    _approve(newTokenID, saleAuction);

    saleAuction.createAuction(
      newTokenID,
      _startingPrice,
      _endingPrice,
      _duration,
      address(this)
    );
  }
}
function createAuthorDrawings(bytes32 _chainID, 
                                bytes32 _author, 
                                address _owner, 
                                string _metaUrl) public onlyOwner {
    //通过chainID查找跑图
    uint256 tokenID = chainIDToTokenID[_chainID];
    if(tokenID != 0){  //链跑图已存在，仅修改跑图属性
      ChainDrawings storage drawing = drawings[tokenID];
      drawing.author = _author;

      return;
    }

    if(_owner == address(0)){
      _owner = owner;
    }
    _createDrawings(_chainID, _author, _owner, _metaUrl);
  }
//为原创者创建上链跑图