ekmungai / eloquent-ifrs

Eloquent Double Entry Accounting with a focus on IFRS Compliant Reporting
MIT License
334 stars 68 forks source link

Remove entity_id from currency table? #89

Closed eorenstein1 closed 2 years ago

eorenstein1 commented 3 years ago

Why does the currency table have an entity_id? Can we remove that to be able to use the same currency for multiple entities?

ekmungai commented 2 years ago

The idea behind that is that each entity should be completely independent of the others. Under that assumption, having currencies not created by users of another does not seem like a good idea.

Cheers

mauricemojito commented 1 year ago

Little question, what would be the use case here? Because currencies don't change much? Maybe use a link table if we want multi currencies? It's just a question :)

ekmungai commented 1 year ago

Hi @mauricemojito,

The original idea was to design the database in such a way that it could handle single database multitenant applications as well as a multidatabase case. With each entity having its own currency records transisioning between the two modes is made easy ;)

mauricemojito commented 1 year ago

@ekmungai Thank you!