# Path: testproject/common/models.py
# class CassandraThing(DjangoCassandraModel):
#     __keyspace__ = "db"
#     id = cassandra_columns.UUID(primary_key=True, default=uuid.uuid4)
#     data_abstract = cassandra_columns.Text(max_length=10)
# 
#     class Meta:
#         get_pk_field = "id"
# 
# class CassandraThingMultiplePK(DjangoCassandraModel):
#     __keyspace__ = "db"
#     id = cassandra_columns.UUID(primary_key=True, default=uuid.uuid4)
#     another_id = cassandra_columns.UUID(primary_key=True, default=uuid.uuid4)
#     data_abstract = cassandra_columns.Text(max_length=10)
#     created_on = cassandra_columns.DateTime()
# 
#     class Meta:
#         get_pk_field = "id"
# 
# Path: testproject/common/serializers.py
# class ThingMultiplePKSerializer(DjangoCassandraModelSerializer):
#     class Meta:
#         model = CassandraThingMultiplePK
#         fields = "__all__"
# 
# class ThingSerializer(DjangoCassandraModelSerializer):
#     class Meta:
#         model = CassandraThing
#         fields = "__all__"


from rest_framework.generics import ListAPIView, ListCreateAPIView
from rest_framework.response import Response
from rest_framework.viewsets import ModelViewSet, ViewSet
from .models import CassandraThing, CassandraThingMultiplePK
from .serializers import ThingMultiplePKSerializer, ThingSerializer



class ThingMultiplePKViewSet(ViewSet):
    def list(self, request):
        queryset = CassandraThingMultiplePK.objects.all()

# Path: testproject/common/models.py
# class CassandraThing(DjangoCassandraModel):
#     __keyspace__ = "db"
#     id = cassandra_columns.UUID(primary_key=True, default=uuid.uuid4)
#     data_abstract = cassandra_columns.Text(max_length=10)
# 
#     class Meta:
#         get_pk_field = "id"
# 
# class CassandraThingMultiplePK(DjangoCassandraModel):
#     __keyspace__ = "db"
#     id = cassandra_columns.UUID(primary_key=True, default=uuid.uuid4)
#     another_id = cassandra_columns.UUID(primary_key=True, default=uuid.uuid4)
#     data_abstract = cassandra_columns.Text(max_length=10)
#     created_on = cassandra_columns.DateTime()
# 
#     class Meta:
#         get_pk_field = "id"
# 
# Path: testproject/common/serializers.py
# class ThingMultiplePKSerializer(DjangoCassandraModelSerializer):
#     class Meta:
#         model = CassandraThingMultiplePK
#         fields = "__all__"
# 
# class ThingSerializer(DjangoCassandraModelSerializer):
#     class Meta:
#         model = CassandraThing
#         fields = "__all__"


# Path: testproject/common/views.py
from rest_framework.generics import ListAPIView, ListCreateAPIView
from rest_framework.response import Response
from rest_framework.viewsets import ModelViewSet, ViewSet
from .models import CassandraThing, CassandraThingMultiplePK
from .serializers import ThingMultiplePKSerializer, ThingSerializer




class ThingMultiplePKViewSet(ViewSet):
    def list(self, request):
        queryset = CassandraThingMultiplePK.objects.all()

        serializer = ThingMultiplePKSerializer(queryset, many=True)