completed chapter 7

This commit is contained in:
2022-01-20 10:11:40 -06:00
parent ab35b8760f
commit 660ae454ec
7 changed files with 29 additions and 13 deletions
+4 -1
View File
@@ -1 +1,4 @@
from .animal import Animal
from .animal import Animal
from .customer import Customer
from .employee import Employee
from .location import Location
+1 -1
View File
@@ -11,4 +11,4 @@ class Animal():
self.location_id = location_id
self.customer_id = customer_id
new_animal = Animal(1, "Snickers", "Dog", "Recreation", 1, 4)
# new_animal = Animal(1, "Snickers", "Dog", "Recreation", 1, 4)
+6
View File
@@ -0,0 +1,6 @@
class Customer():
'''Factory class for customer objects'''
def __init__(self, id, name, email) -> None:
self.id = id
self.name = name
self.email = email
+6
View File
@@ -0,0 +1,6 @@
class Employee():
def __init__(self, id, name, email):
self.id = id
self.name = name
self.email = email
+7 -2
View File
@@ -1,5 +1,10 @@
class Location():
def __init__(self, id, address):
def __init__(self, id, name, address):
self.id = id
self.address = address
self.name = name
self.address = address
#"id": 1,
#"name": "Nashville North",
#"address": "389 Deumbrion Street, Nashville, TN, 37909"
+1 -7
View File
@@ -3,42 +3,36 @@ CUSTOMERS = [
"id": 1,
"name": "Ryan Tanay",
"email": "ryan@tanay.com",
"employee": False
},
{
"id": 2,
"name": "Emma Beaton",
"email": "emma@beaton.com",
"employee": False
},
{
"id": 3,
"name": "Dani Adkins",
"email": "dani.adkins.com",
"employee": False
},
{
"id": 4,
"name": "Adam Oswalt",
"email": "adam@oswalt.com",
"employee": False
},
{
"id": 5,
"name": "Fletcher Bangs",
"email": "flangs@bangs.com",
"employee": False
},
{
"id": 6,
"name": "Angela Lee",
"email": "lee@lee.com",
"employee": False
},
{
"name": "mike mike",
"email": "m@m.com",
"employee": False,
"id": 7
},
+4 -2
View File
@@ -1,11 +1,13 @@
LOCATIONS = [
{
"id": 1,
"name": "Nashville North"
"name": "Nashville North",
"address": "389 Deumbrion Street, Nashville, TN, 37909"
},
{
"id": 2,
"name": "Nashville South"
"name": "Nashville South",
"address":"1783 Thompson Lane, Nashville, TN, 37867"
}
,
]