from app.models import db, Image

def seed_images():
    images = [
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/6848+/001.jpeg",
            "listing_id":1
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/6848+/002.jpeg",
            "listing_id":1
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/6848+/003.jpeg",
            "listing_id":1
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/6848+/004.jpeg",
            "listing_id":1
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/6848+/005.jpeg",
            "listing_id":1
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/6848+/006.jpeg",
            "listing_id":1
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/7322/001.jpeg",
            "listing_id":2
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/7322/002.jpeg",
            "listing_id":2
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/7322/003.jpeg",
            "listing_id":2
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/7322/004.jpeg",
            "listing_id":2
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/7322/005.jpeg",
            "listing_id":2
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/7322/006.jpeg",
            "listing_id":2
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/2595/001.jpeg",
            "listing_id":3
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/2595/002.jpeg",
            "listing_id":3
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/2595/003.jpeg",
            "listing_id":3
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/2595/004.jpeg",
            "listing_id":3
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/2595/005.jpeg",
            "listing_id":3
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/12937/001.jpeg",
            "listing_id":4
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/12937/002.jpeg",
            "listing_id":4
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/12937/003.jpeg",
            "listing_id":4
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/12937/004.jpeg",
            "listing_id":4
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/12937/005.jpeg",
            "listing_id":4
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/18152/001.jpeg",
            "listing_id":5
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/18152/002.jpeg",
            "listing_id":5
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/18152/003.jpeg",
            "listing_id":5
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/18152/004.jpeg",
            "listing_id":5
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/18152/005.jpeg",
            "listing_id":5
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/18152/006.jpeg",
            "listing_id":5
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/20853/001.jpeg",
            "listing_id":6
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/20853/002.jpeg",
            "listing_id":6
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/20853/003.jpeg",
            "listing_id":6
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/20853/004.jpeg",
            "listing_id":6
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/20853/005.jpeg",
            "listing_id":6
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/20853/006.jpeg",
            "listing_id":6
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/01/01.jpeg",
            "listing_id":7
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/01/02.jpeg",
            "listing_id":7
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/01/03.jpeg",
            "listing_id":7
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/01/04.jpeg",
            "listing_id":7
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/01/05.jpeg",
            "listing_id":7
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/02/01.jpeg",
            "listing_id":8
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/02/02.jpeg",
            "listing_id":8
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/02/03.jpeg",
            "listing_id":8
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/02/04.jpeg",
            "listing_id":8
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/02/05.jpeg",
            "listing_id":8
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/03/01.jpeg",
            "listing_id":9
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/03/02.jpeg",
            "listing_id":9
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/03/03.jpeg",
            "listing_id":9
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/03/04.jpeg",
            "listing_id":9
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/entirehome_extraseeding/03/05.jpeg",
            "listing_id":9
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/01/01.jpeg",
            "listing_id":10
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/01/02.jpeg",
            "listing_id":10
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/01/03.jpeg",
            "listing_id":10
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/01/04.jpeg",
            "listing_id":10
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/01/05.jpeg",
            "listing_id":10
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/02/01.jpeg",
            "listing_id":11
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/02/02.jpeg",
            "listing_id":11
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/02/03.jpeg",
            "listing_id":11
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/02/04.jpeg",
            "listing_id":11
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/02/05.jpeg",
            "listing_id":11
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/03/01.jpeg",
            "listing_id":12
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/03/02.jpeg",
            "listing_id":12
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/03/03.jpeg",
            "listing_id":12
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/03/04.jpeg",
            "listing_id":12
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/03/05.jpeg",
            "listing_id":12
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/04/01.jpeg",
            "listing_id":13
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/04/02.jpeg",
            "listing_id":13
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/04/03.jpeg",
            "listing_id":13
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/04/04.jpeg",
            "listing_id":13
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/pet_allowed/04/05.jpeg",
            "listing_id":13
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/01/001.jpeg",
            "listing_id":14
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/01/002.jpeg",
            "listing_id":14
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/01/003.jpeg",
            "listing_id":14
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/01/004.jpeg",
            "listing_id":14
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/01/005.jpeg",
            "listing_id":14
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/02/01.jpeg",
            "listing_id":15
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/02/02.jpeg",
            "listing_id":15
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/02/03.jpeg",
            "listing_id":15
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/02/04.jpeg",
            "listing_id":15
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/02/05.jpeg",
            "listing_id":15
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/03/01.jpeg",
            "listing_id":16
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/03/02.jpeg",
            "listing_id":16
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/03/03.jpeg",
            "listing_id":16
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/03/04.jpeg",
            "listing_id":16
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/03/05.jpeg",
            "listing_id":16
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/04/01.jpeg",
            "listing_id":17
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/04/02.jpeg",
            "listing_id":17
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/04/03.jpeg",
            "listing_id":17
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/04/04.jpeg",
            "listing_id":17
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/cityview/04/05.jpeg",
            "listing_id":17
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/01/01.jpeg",
            "listing_id":18
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/01/02.jpeg",
            "listing_id":18
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/01/03.jpeg",
            "listing_id":18
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/01/04.jpeg",
            "listing_id":18
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/01/05.jpeg",
            "listing_id":18
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/02/01.jpeg",
            "listing_id":19
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/02/02.jpeg",
            "listing_id":19
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/02/03.jpeg",
            "listing_id":19
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/02/04.jpeg",
            "listing_id":19
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/02/05.jpeg",
            "listing_id":19
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/03/01.jpeg",
            "listing_id":20
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/03/02.jpeg",
            "listing_id":20
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/03/03.jpeg",
            "listing_id":20
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/03/04.jpeg",
            "listing_id":20
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/03/05.jpeg",
            "listing_id":20
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/04/01.jpeg",
            "listing_id":21
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/04/02.jpeg",
            "listing_id":21
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/04/03.jpeg",
            "listing_id":21
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/04/04.jpeg",
            "listing_id":21
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/04/05.jpeg",
            "listing_id":21
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/05/01.jpeg",
            "listing_id":22
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/05/02.jpeg",
            "listing_id":22
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/05/03.jpeg",
            "listing_id":22
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/05/04.jpeg",
            "listing_id":22
        },
        {
            "url":"https://empirebnb.s3.us-east-2.amazonaws.com/Getaway/05/05.jpeg",
            "listing_id":22
        },
    ]

    for image in images:
        new_image = Image(
            url = image['url'],
            listing_id = image['listing_id'],
        )

        db.session.add(new_image)
        db.session.commit()


def undo_images():
    db.session.execute('TRUNCATE images RESTART IDENTITY CASCADE;')
    db.session.commit()
