from django.core.management.base import BaseCommand
from django.contrib.auth import get_user_model

class Command(BaseCommand):
    def handle(self, *args, **options):
        User = get_user_model()
        if not User.objects.filter(username="admin").exists():
            User.objects.create_superuser(
                username="HealthSecure",
                email="healthsecurepluss@gmail.com",
                password="Health@Secure32"
            )
            print("Superuser created.")
        else:
            print("Superuser already exists.")