From ab35b8760f05920ce72091407d917242168e754b Mon Sep 17 00:00:00 2001 From: bytesparallel Date: Wed, 19 Jan 2022 15:18:44 -0600 Subject: [PATCH] saving copy-pasta code from course --- models/__init__.py | 1 + models/animal.py | 14 ++++++++++++++ models/customer.py | 0 models/employee.py | 0 models/location.py | 5 +++++ 5 files changed, 20 insertions(+) create mode 100644 models/__init__.py create mode 100644 models/animal.py create mode 100644 models/customer.py create mode 100644 models/employee.py create mode 100644 models/location.py diff --git a/models/__init__.py b/models/__init__.py new file mode 100644 index 0000000..65f1396 --- /dev/null +++ b/models/__init__.py @@ -0,0 +1 @@ +from .animal import Animal \ No newline at end of file diff --git a/models/animal.py b/models/animal.py new file mode 100644 index 0000000..a7ad998 --- /dev/null +++ b/models/animal.py @@ -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) \ No newline at end of file diff --git a/models/customer.py b/models/customer.py new file mode 100644 index 0000000..e69de29 diff --git a/models/employee.py b/models/employee.py new file mode 100644 index 0000000..e69de29 diff --git a/models/location.py b/models/location.py new file mode 100644 index 0000000..b0a82c9 --- /dev/null +++ b/models/location.py @@ -0,0 +1,5 @@ +class Location(): + + def __init__(self, id, address): + self.id = id + self.address = address \ No newline at end of file