Let’s say a manager wants to see the activities of their team members (similar to an audit log). From the client, activities are displayed in a single list.
Here are some types of activities:
- Common fields
- DateCreated
- TaskActivity
- TaskId
- TaskType
- AwardActivity
- AwardType
- ToId
- FromId
- Comment
- CourseActivity
- CourseId
- CourseActivityType (i.e. enroll, complete)
Expect that more types of activities may be added in the future.
Instincts are telling me that storing all this information in a single table is poor design. How would you approach modeling this use case?
Also, how should this data be sent via an API request? Should it all be in one list? Or should there be multiple API requests for different activity types?
I’m using EF Core (code first).