"""
库存变动视图模块

使用类视图重构，提供更好的代码复用和可维护性
"""

from .mixins import StockChangeViewMixin
from .create import (
    CreateStockChangeView,
    CreateStockChangeRelaxedView,
    CreateStockChangeRestrictView,
)
from .list import ListStockChangesView, ListStockChangeDetailsView
from .detail import GetStockChangeView
from .finish import FinishStockChangeView
from .settings import SetMerchantAutoCompleteView
from .offset import OffsetStockChangeView
from .transfer import StockTransferView

# 向后兼容：保持原有的函数式接口
create_full_stock_change = CreateStockChangeView.as_view()
create_relaxed_stock_change = CreateStockChangeRelaxedView.as_view()
create_restrict_stock_change = CreateStockChangeRestrictView.as_view()
list_stock_changes = ListStockChangesView.as_view()
list_stock_change_details = ListStockChangeDetailsView.as_view()
get_stock_change = GetStockChangeView.as_view()
finish_stock_change = FinishStockChangeView.as_view()
set_merchant_auto_complete_stock_change = SetMerchantAutoCompleteView.as_view()
offset_stock_change = OffsetStockChangeView.as_view()
transfer_stock_change = StockTransferView.as_view()

__all__ = [
    'StockChangeViewMixin',
    'CreateStockChangeView',
    'CreateStockChangeRelaxedView',
    'CreateStockChangeRestrictView',
    'ListStockChangesView',
    'ListStockChangeDetailsView',
    'GetStockChangeView',
    'FinishStockChangeView',
    'SetMerchantAutoCompleteView',
    'OffsetStockChangeView',
    'StockTransferView',
    'create_full_stock_change',
    'create_relaxed_stock_change',
    'create_restrict_stock_change',
    'list_stock_changes',
    'list_stock_change_details',
    'get_stock_change',
    'finish_stock_change',
    'set_merchant_auto_complete_stock_change',
    'offset_stock_change',
    'transfer_stock_change',
]
