mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-06-26 15:17:29 +00:00
Add wallet balance to User model and implement Atoll/Island management
- Added `wallet_balance` field to the User model. - Updated UserAdmin to include `wallet_balance` in the admin interface. - Created serializers and views for Atoll and Island management. - Implemented endpoints for listing, creating, and updating Atolls and Islands. - Enhanced payment processing with UUIDs for Payment and Topup models. - Added migration files for new fields and constraints. - Improved error handling and validation in various views. - Updated email templates for better responsiveness and SEO.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
from knox.models import AuthToken
|
||||
from django.contrib.auth import authenticate
|
||||
from api.models import User
|
||||
from api.models import User, Atoll, Island
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
@ -46,7 +46,6 @@ class CustomReadOnlyUserSerializer(serializers.ModelSerializer):
|
||||
"username",
|
||||
"mobile",
|
||||
"address",
|
||||
|
||||
)
|
||||
|
||||
|
||||
@ -92,3 +91,15 @@ class KnoxTokenSerializer(serializers.ModelSerializer):
|
||||
class Meta: # type: ignore
|
||||
model = AuthToken
|
||||
fields = "__all__"
|
||||
|
||||
|
||||
class AtollSerializer(serializers.ModelSerializer):
|
||||
class Meta: # type: ignore
|
||||
model = Atoll
|
||||
fields = "__all__"
|
||||
|
||||
|
||||
class IslandSerializer(serializers.ModelSerializer):
|
||||
class Meta: # type: ignore
|
||||
model = Island
|
||||
fields = "__all__"
|
||||
|
Reference in New Issue
Block a user