from django.db import migrations, transaction


class Migration(migrations.Migration):
    dependencies = [
        ('daycare', '0003_rename_image_url_image_url'),
    ]

    def generate_data(apps, schema_editor):
        from daycare.models import DayCare

        description = "Thank you for visiting, we are so excited to meet you and your pup!" \
                      " Since 2009, we have been serving the Chicago community by" \
                      " providing luxury Daycare and Boarding services for dogs." \
                      "We are open 24/7/365; We have staff on site 24 hours a day." \
                      "We offer dog daycare & play group, state of the art boarding" \
                      " accommodations, transportation, special events and various other amenities including grooming."
        password = '<PASSWORD>'

        static_daycare_users = [
            ('<EMAIL>', 'staticUser01', password, '<PASSWORD>', description, 100, 20, 'NORTH', 'Haifa',
             'Union Street 4'),
            ('<EMAIL>', 'staticUser02', password, '<PASSWORD>', description, 300, 40, 'CENTER', 'Tel Aviv',
             'Fulton Street 10'),
            ('<EMAIL>', 'staticUser03', password, '<PASSWORD>', description, 500, 100, 'SOUTH',
                'Berrsheba', 'Summer Street 3'),
            ('<EMAIL>', 'staticUser04', password, '<PASSWORD>', description, 50, 10, 'SOUTH',
             'Ashdod', 'Andover Court 1'),
            ('<EMAIL>', 'staticUser05', password, '<PASSWORD>', description, 120, 35, 'CENTER',
                'Holon', 'Lexington Drive 11'),
            ('<EMAIL>', 'staticUser06', password, '<PASSWORD>', description, 130, 40, 'CENTER', 'Bat Yam',
             'Maple Lane 30'),
            ('<EMAIL>', 'staticUser07', password, '<PASSWORD>', description, 20, 15,
             'CENTER', 'Jaffa', 'Hawthorne Avenue 22'),
            ('<EMAIL>', 'staticUser08', password, '<PASSWORD>', description, 250, 70, 'NORTH', 'Nahariya',
             'Pheasant Run'),
            ('<EMAIL>', 'staticUser09', password, '<PASSWORD>', description, 600, 90, 'NORTH', 'Dimona',
             'Broad Street West 4'),
            ('<EMAIL>', 'staticUser10', password, '<PASSWORD>', description, 430, 40, 'CENTER', 'Tel Aviv',
             'Route 6'),
            ('<EMAIL>', 'staticUser11', password, '<PASSWORD>', description, 75, 45,
                'CENTER', 'Kfar Saba', 'Cedar Lane 1'),
            ('<EMAIL>', 'staticUser12', password, '<PASSWORD>', description, 350, 50, 'NORTH',
             'Nazareth', 'Fulton Street 30'),
            ('<EMAIL>', 'staticUser13', password, '<PASSWORD>', description, 45, 10, 'CENTER',
             'Hertzelya', 'Olive Street 3'),
            ('<EMAIL>', 'staticUser14', password, '<PASSWORD>', description, 10, 5,
             'SOUTH', 'Eilat', 'Oak Avenue 11'),
            ('<EMAIL>', 'staticUser15', password, 'Hayes_Mansion', description, 800, 70, 'NORTH',
                'Arce', 'Madison Street 14'),
            ('<EMAIL>', 'staticUser16', password, '<PASSWORD>', description, 550, 50, 'CENTER',
             'Holon', 'Fulton Street 20'),
            ('<EMAIL>', 'staticUser17', password, '<PASSWORD>', description, 300, 30,
             'NORTH', 'Qiryat Ata', 'Church Street 5'),
            ('<EMAIL>', 'staticUser18', password, '<PASSWORD>', description, 200, 20, 'SOUTH',
             'Ashkelon', 'Cedar Lane 40'),
            ('<EMAIL>', 'staticUser19', password, '<PASSWORD>', description, 600, 65, 'SOUTH', 'Ashdod',
             'Main Street West 22'),
            ('<EMAIL>', 'staticUser20', password, '<PASSWORD>', description, 100, 10,
             'CENTER', 'Tel Aviv', 'Elizabeth Street'),
        ]

        with transaction.atomic():
            for (email, username, password, name, description, price_per_day, capacity, area, city,
                 address) in static_daycare_users:
                DayCare.create(email=email,
                               username=username,
                               password=password,
                               name=name,
                               description=description,
                               price_per_day=price_per_day,
                               capacity=capacity,
                               area=area,
                               city=city,
                               address=address,
                               )

    operations = [
        migrations.RunPython(generate_data),
    ]

from django.db import migrations, transaction


class Migration(migrations.Migration):
    dependencies = [
        ('daycare', '0003_rename_image_url_image_url'),
    ]

    def generate_data(apps, schema_editor):
        from daycare.models import DayCare

        description = "Thank you for visiting, we are so excited to meet you and your pup!" \
                      " Since 2009, we have been serving the Chicago community by" \
                      " providing luxury Daycare and Boarding services for dogs." \
                      "We are open 24/7/365; We have staff on site 24 hours a day." \
                      "We offer dog daycare & play group, state of the art boarding" \
                      " accommodations, transportation, special events and various other amenities including grooming."
        password = '<PASSWORD>'

        static_daycare_users = [
            ('<EMAIL>', 'staticUser01', password, '<PASSWORD>', description, 100, 20, 'NORTH', 'Haifa',
             'Union Street 4'),
            ('<EMAIL>', 'staticUser02', password, '<PASSWORD>', description, 300, 40, 'CENTER', 'Tel Aviv',
             'Fulton Street 10'),
            ('<EMAIL>', 'staticUser03', password, '<PASSWORD>', description, 500, 100, 'SOUTH',
                'Berrsheba', 'Summer Street 3'),
            ('<EMAIL>', 'staticUser04', password, '<PASSWORD>', description, 50, 10, 'SOUTH',
             'Ashdod', 'Andover Court 1'),
            ('<EMAIL>', 'staticUser05', password, '<PASSWORD>', description, 120, 35, 'CENTER',
                'Holon', 'Lexington Drive 11'),
            ('<EMAIL>', 'staticUser06', password, '<PASSWORD>', description, 130, 40, 'CENTER', 'Bat Yam',
             'Maple Lane 30'),
            ('<EMAIL>', 'staticUser07', password, '<PASSWORD>', description, 20, 15,
             'CENTER', 'Jaffa', 'Hawthorne Avenue 22'),
            ('<EMAIL>', 'staticUser08', password, '<PASSWORD>', description, 250, 70, 'NORTH', 'Nahariya',
             'Pheasant Run'),
            ('<EMAIL>', 'staticUser09', password, '<PASSWORD>', description, 600, 90, 'NORTH', 'Dimona',
             'Broad Street West 4'),
            ('<EMAIL>', 'staticUser10', password, '<PASSWORD>', description, 430, 40, 'CENTER', 'Tel Aviv',
             'Route 6'),
            ('<EMAIL>', 'staticUser11', password, '<PASSWORD>', description, 75, 45,
                'CENTER', 'Kfar Saba', 'Cedar Lane 1'),
            ('<EMAIL>', 'staticUser12', password, '<PASSWORD>', description, 350, 50, 'NORTH',
             'Nazareth', 'Fulton Street 30'),
            ('<EMAIL>', 'staticUser13', password, '<PASSWORD>', description, 45, 10, 'CENTER',
             'Hertzelya', 'Olive Street 3'),
            ('<EMAIL>', 'staticUser14', password, '<PASSWORD>', description, 10, 5,
             'SOUTH', 'Eilat', 'Oak Avenue 11'),
            ('<EMAIL>', 'staticUser15', password, 'Hayes_Mansion', description, 800, 70, 'NORTH',
                'Arce', 'Madison Street 14'),
            ('<EMAIL>', 'staticUser16', password, '<PASSWORD>', description, 550, 50, 'CENTER',
             'Holon', 'Fulton Street 20'),
            ('<EMAIL>', 'staticUser17', password, '<PASSWORD>', description, 300, 30,
             'NORTH', 'Qiryat Ata', 'Church Street 5'),
            ('<EMAIL>', 'staticUser18', password, '<PASSWORD>', description, 200, 20, 'SOUTH',
             'Ashkelon', 'Cedar Lane 40'),
            ('<EMAIL>', 'staticUser19', password, '<PASSWORD>', description, 600, 65, 'SOUTH', 'Ashdod',
             'Main Street West 22'),
            ('<EMAIL>', 'staticUser20', password, '<PASSWORD>', description, 100, 10,
             'CENTER', 'Tel Aviv', 'Elizabeth Street'),
        ]

        with transaction.atomic():
            for (email, username, password, name, description, price_per_day, capacity, area, city,
                 address) in static_daycare_users:
                DayCare.create(email=email,
                               username=username,
                               password=password,
                               name=name,
                               description=description,
                               price_per_day=price_per_day,
                               capacity=capacity,
                               area=area,
                               city=city,
                               address=address,
                               )

    operations = [
        migrations.RunPython(generate_data),
    ]
