Create an enum for Message status - #7380
Conversation
|
|
||
| namespace Appwrite\Enum; | ||
|
|
||
| enum MessageStatus: string |
There was a problem hiding this comment.
Will we have more enums for Message or other entities? Maybe the structure should be Appwrite\Enum[Entity][Type] or Appwrite\Enum\Message\Type?
There was a problem hiding this comment.
I dont think we need a namespace for enums, because it will be typed in its usage.
There was a problem hiding this comment.
I think it makes more sense to have it under the namespace where it actually follows the story.
We already have Appwrite\Messaging for that imo
There was a problem hiding this comment.
Will we have more enums for Message or other entities? Maybe the structure should be Appwrite\Enum[Entity][Type] or Appwrite\Enum\Message\Type?
@eldadfux, yes, we can have more. For example, providerType can be email, sms, or push.
I think it makes more sense to have it under the namespace where it actually follows the story.
We already have
Appwrite\Messagingfor that imo
@TorstenDittmann, that path is for Realtime, though 😅. It's probably most related to Appwrite\Utopia\Response\Model\Message.
There was a problem hiding this comment.
I am kinda against having a separate namespace for enums, it's always nice if stuff like that is relative to its consuming classes (if there are).
However, we don't have enough enums implemented to know how it will look like.
What does this PR do?
Create an enum for Message status since there's a set of possible values for the status.
Test Plan
None
Related PRs and Issues
None
Checklist