Best Practices for Referencing User ID in Posts Module #169
rezabayati1
started this conversation in
General
Replies: 2 comments 2 replies
-
import { Slug } from './value-objects/slug.value-object';
export interface PostProps {
title: string;
slug: Slug;
userId: string;
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just store userId in a post. Check older discussion in this repo, there are some examples. For example, this one: #132 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi
suppose we have a Posts module responsible for managing post entities.
Each post needs to associate with the user who created it
What's the most appropriate way to establish this relationship while adhering to Domain-Driven Design principles?
How to add associate user id to every post?
Beta Was this translation helpful? Give feedback.
All reactions