Created
March 30, 2022 19:45
-
-
Save zehpatricio/f7e88f57b37a32d3cf18849dede6f71b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from app.domain import model as domain_model | |
from app.adapter.rest import model as rest_model | |
def to_domain_model(location: rest_model.Location) -> domain_model.Location: | |
domain_location = domain_model.Location(**vars(location)) | |
return domain_location | |
def to_rest_model(location: domain_model.Location) -> rest_model.Location: | |
rest_location = rest_model.Location(**vars(location)) | |
return rest_location |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment