Archived
saving copy-pasta code from course
This commit is contained in:
@@ -0,0 +1 @@
|
||||
from .animal import Animal
|
||||
@@ -0,0 +1,14 @@
|
||||
class Animal():
|
||||
|
||||
# Class initializer. It has 5 custom parameters, with the
|
||||
# special `self` parameter that every method on a class
|
||||
# needs as the first parameter.
|
||||
def __init__(self, id, name, breed, status, location_id, customer_id):
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.breed = breed
|
||||
self.status = status
|
||||
self.location_id = location_id
|
||||
self.customer_id = customer_id
|
||||
|
||||
new_animal = Animal(1, "Snickers", "Dog", "Recreation", 1, 4)
|
||||
@@ -0,0 +1,5 @@
|
||||
class Location():
|
||||
|
||||
def __init__(self, id, address):
|
||||
self.id = id
|
||||
self.address = address
|
||||
Reference in New Issue
Block a user