// SPDX-License-Identifier: MIT

pragma solidity 0.8.13;

//import "github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";

contract ZhaengNFT is ERC721URIStorage {
    uint public counter;

    constructor()ERC721("ZhaengNFT","ZNFT") {
        counter = 0;
    }

    function createNFTs (string memory url) public returns(uint) {
        uint tokenId = counter;

        _safeMint(msg.sender,tokenId);
        _setTokenURI(tokenId,url);
        counter++;
        return tokenId;
    }

    function burn(uint256 tokenId)public virtual{
        require(_isApprovedOrOwner(msg.sender,tokenId),"You are not owner or approved!");
        super._burn(tokenId);
    }

}