-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.py
27 lines (21 loc) · 817 Bytes
/
domain.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class Employee:
def __init__(self, surname, name, contact):
self.surname = surname
self.name = name
self.contact = contact
def __eq__(self, other):
return self.name == other.name \
and self.surname == other.surname \
and self.contact == other.contact
class Contact:
def __init__(self, email):
self.email = email
def __eq__(self, other):
return self.email == other.email
class BirthdayGreetings:
def __init__(self, employee_repository, email_service):
self._message_service = email_service
self._employee_repository = employee_repository
def sendGreetings(self, today):
persons = self._employee_repository.birthdaysFor(today.month, today.day)
self._message_service.send(persons)