// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/// @title ICoupon — 券 NFT 接口
/// @notice 定义 Coupon ERC-721 合约的外部调用接口
interface ICoupon {
    enum CouponType { Utility, Security }

    struct CouponConfig {
        CouponType couponType;
        bool transferable;
        uint8 maxResaleCount;
        uint256 maxPrice;
        uint256 expiryDate;
        uint256 minPurchase;
        bool stackable;
        bytes32[] allowedStores;
        address issuer;
        uint256 faceValue;
    }

    function getConfig(uint256 tokenId) external view returns (CouponConfig memory);
    function getFaceValue(uint256 tokenId) external view returns (uint256);
    function getResaleCount(uint256 tokenId) external view returns (uint256);
    function incrementResaleCount(uint256 tokenId) external;
    function ownerOf(uint256 tokenId) external view returns (address);
    function burn(uint256 tokenId) external;
    function safeTransferFrom(address from, address to, uint256 tokenId) external;
    function mint(address to, uint256 faceValue, CouponConfig calldata config) external returns (uint256 tokenId);
}
