package com.remax.visualnovel.entity.response

/**
 * Created by HJW on 2025/9/16
 */
data class AlbumCreateCountOutput(
    /**
     * 购买创作次数
     */
    val buyNum: Int,
    val usedBuyNum: Int,

    /**
     * 免费创作次数
     */
    val freeNum: Int,
    val usedFreeNum: Int,

    /**
     * 会员赠送创作次数
     */
    val memberNum: Int,
    val usedMemberNum: Int
) {
    val hasFree: Boolean
        get() = usedFreeNum < freeNum

    val hasVipTime: Boolean
        get() = usedMemberNum < memberNum

    val hasNum: Boolean
        get() = usedBuyNum < buyNum

    val canCreate: Boolean
        get() = hasFree || hasVipTime || hasNum

    val canUseCount: Int
        get() = (buyNum - usedBuyNum) + (memberNum - usedMemberNum) + (freeNum - usedFreeNum)
}
