我试图将域事件存储在postgres数据库中.我在很多方面都不确定,我不想在以后重新设计这个结构,所以我正在寻找具有事件采购经验的人的指导.我目前有下表:
domain events
version - or event id, integer sequence, helps to maintain order by replays
type - event type, probably classname with namespace
aggregate - aggregate id, probably random string for each aggregate
timestamp - when the event occured
promoter - the promoter of the event, probably user id
details - json encoded data about the properties
Run Code Online (Sandbox Code Playgroud)
我不确定的是什么:
postgresql domain-driven-design cqrs event-sourcing bounded-contexts