Domain Models
Let’s learn about the importance of domain models in clean architecture.
The Room
domain model
Let’s start with a simple definition of the Room
domain model. As we mentioned before, clean architecture models are lighter than their counterparts in common web frameworks.
Implementing test case for initialization
Following the
Press + to interact
import uuidfrom rentomatic.domain.room import Roomdef test_room_model_init():code = uuid.uuid4()room = Room(code,size=200,price=10,longitude=-0.09998975,latitude=51.75436293,)assert room.code == codeassert room.size == 200assert room.price == 10assert room.longitude == -0.09998975assert room.latitude == 51.75436293
Let’s make a note to create ...