I have models for the network layer which usually ...
# squarelibraries
j
I have models for the network layer which usually undergo slight transformation before insertion into the DB as arguments
👍 1
c
As an aside. I was always curious where people put these mappers/transformers. Example. If you have network layer models and db layer models. Do you create an extension? If so, do you put the extension in the network or db model?
j
Usually in the repository layer since it sees both but neither sees each other
c
I will try to keep that in mind "neither sees each other". It felt wrong to me to have an extension function in my db models, so yeah maybe I will just have a Mappers.kt that has a bunch of these extension functions.