-
Notifications
You must be signed in to change notification settings - Fork 85
Closed
Labels
Milestone
Description
Problem
These two really go together, so we likely need to add them together.
We should not deal with changesets as part of this issue, as we really aren't sure yet what they might look like.
The idea is that a project can start a message with a user. This creates a Message record, with the following fields
initiated_by: "admin"author- the project member who created it,project- the project the author is creating the message in the name of
A Conversation record is then also created
- belongs to the newly created message
- belongs to the user the message is sent to
From the other side, a user can also message a project. This, again, creates a Message record, with the following fields:
initiated_by: "user"author- the outside user who messaged the projectproject- the project that gotmessaged
Again, a Conversation is also created
- belongs to the user who sent the message
- belongs to the project the message was sent to
In both cases, any side can then post further messages to the same conversation. This creates ConversationPart records
Conversation fields
status-"open"/"closed"- string, defaults to"open"read_at- timestamp, defaults tonullbelongs_to :message- cannot benullbelongs_to :user- cannot benullhas_many :conversation_parts
ConversationPart fields
bodyread_at(by admin in project if author is user, otherwise by user)belongs_to :authorbelongs_to :conversation
Subtasks
- Add migration with the
"conversations"and"conversation_parts"tables - Add
lib/code_corps/model/conversation.ex - Add
lib/code_corps/model/conversation_part.ex
References
- we need to get Add messages #1278 merged, so we have a
Messagemodel to linkConversationwith