Skip to content

Instantly share code, notes, and snippets.

@falnatsheh
Last active August 30, 2024 12:50
Show Gist options
  • Save falnatsheh/a25ffb59859edd95b1ac10bf49f5c899 to your computer and use it in GitHub Desktop.
Save falnatsheh/a25ffb59859edd95b1ac10bf49f5c899 to your computer and use it in GitHub Desktop.

Venue:

import Foundation
import CoreLocation

struct Venue {
    let name: String
    let location: CLLocationCoordinate2D
    let address: String
    let description: String
    let categories: [String]
    let activities: [String]
    let imageURL: URL
}

// Example usage:
let venue = Venue(
    name: "Creative Works",
    location: CLLocationCoordinate2D(latitude: 40.700292, longitude: -73.944055),
    address: "Creative Works, Brooklyn",
    description: "Founded in 2009, we are a cozy business that loves to bring new art into the world - via graphic tees!",
    categories: ["New", "Hot", "Nearby", "Rated"],
    activities: ["Ceramics", "Weaving", "Sewing", "Textiles", "Knitting", "Painting"],
    imageURL: URL(string: "https://example.com/venue_image.png")!
)

Event:

import Foundation

struct Event {
    let title: String
    let date: Date
    let time: String
    let location: String
    let price: Double
    let rating: Double
    let reviewsCount: Int
    let organizerName: String
    let organizerDescription: String
    let accessibilityFeatures: [String]
    let images: [URL]
    let bookingFee: Double
    let classDescription: String
}

// Example usage:
let event = Event(
    title: "Textile Printing",
    date: Date(),  
    time: "6:00 PM",
    location: "Creative Works, Brooklyn",
    price: 31.0,
    rating: 4.9,
    reviewsCount: 131,
    organizerName: "Creative Works",
    organizerDescription: "Founded in 2009, we are a cozy business that loves to bring new art into the world - via graphic tees!",
    accessibilityFeatures: ["Accessible", "LGBTQIA friendly"],
    images: [
        URL(string: "https://example.com/image1.png")!,  
        URL(string: "https://example.com/image2.png")!
    ],
    bookingFee: 1.29,
    classDescription: "This class will open up your creativity as you take on a new medium with clothing design! You will create your own graphic print using design techniques and not only do you get to make patterns, but you get a new shirt."
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment