I'm new to DDD + CQRS, and I'm working in a project that has this implemented, but I wonder why the guy duplicates the models.I understand, that one is for writing (commands) and one is for reading, but both implement the same fields, except that ReadModel only has getters.Is there any advice against having the fields (id, name, socialnumber, etc) of a relational database AND getters in a model then inherit them in WriteModel and ReadModel?For example:Abstract UserModelUserReadModel inherits UserModelUserWriteModel inherits UserModel
Can readmodel and writemodel inherit from Model for fields in DDD + CQRS?
domain driven design;domain model;cqrs