haikal/inventory/management/commands/initial_services_offered.py
2025-06-22 13:25:54 +03:00

33 lines
932 B
Python

# management/commands/create_plans.py
from django.core.management.base import BaseCommand
from appointment.models import Service
import datetime
class Command(BaseCommand):
help = "create initial services offered"
def handle(self, *args, **options):
Service.objects.all().delete()
Service.objects.create(
name="call",
price=0,
duration=datetime.timedelta(minutes=10),
currency="SAR",
description="15 min call",
)
Service.objects.create(
name="meeting",
price=0,
duration=datetime.timedelta(minutes=30),
currency="SAR",
description="30 min meeting",
)
Service.objects.create(
name="email",
price=0,
duration=datetime.timedelta(minutes=30),
currency="SAR",
description="30 min visit",
)