from rest_framework import routers

from core.views import CustomUserViewSet
from companies.views import CompanyViewSet, AdminCompanyViewSet
from products.views import ProductViewSet, MyProductsViewSet, AdminProductsViewSet
from history.views import HistorySyncViewSet
from stats.views import StatsLogViewSet

from geo import views as geo_views

router = routers.DefaultRouter()


router.register('users', CustomUserViewSet, basename='users')
router.register('companies', CompanyViewSet, basename='company')
router.register('admin_companies', AdminCompanyViewSet, basename='admin-companies')
router.register('products', ProductViewSet, basename='product')
router.register('my_products', MyProductsViewSet, basename='my-products')
router.register('admin_products', AdminProductsViewSet, basename='admin-products')
router.register('history', HistorySyncViewSet, basename='history')
router.register('stats', StatsLogViewSet, basename='stats')

# Geo
router.register('countries', geo_views.CountryViewSet, basename='country')
router.register('regions', geo_views.RegionViewSet, basename='region')
router.register('provinces', geo_views.ProvinceViewSet, basename='province')
router.register('cities', geo_views.CityViewSet, basename='city')
