Open becevka opened 5 months ago
@tiagopazhs Please start with creating a Subscription collection.
@tiagopazhs Please start with creating a Subscription collection.
All rigth!
So, how it works?
If I create the collection in my strapi admin. Then push to my branch.
If you pull this, you will see the collection in your strapi admin? Is it imediatly or do you need to run a migration?
@tiagopazhs After you add a collection in Admin locally, strapi will generate new files for you. You can commit those files and create PullRequest. We can review them together in github.
Why we have a created time instead of subscribed time?
I didn't understand very weel about this two ones:
I just created the PR here with the other fields: https://github.com/dev-launchers/strapiv4/pull/181
So I have another question: If I add a field to Subscription. What will happen with the other records in the database that doesn't have this new field.
Why we have a created time instead of subscribed time?
Could be subscribed time, I just thought it would be more consistent to have similar name in all collections
Also difference between createdDateTime and subscribedDateTime is that user can resubscribe, but that will just set active to true and unsubscribeDateTime to null, but createdDateTime will stay the same. I.e. createdDateTime is a time when record was created, just once, while user might resubscribe, we really not care much (at least for now) when they resubscribe.
entityType will be enum type with the name of the type of the data user subscribe to. For now it will have only one option - IdeaCard. entityId is a numeric Id (not relationship reference) to the entity, user subscribed to. In case of IdeaCard, IdeaCard id.
entityType will be enum type with the name of the type of the data user subscribe to. For now it will have only one option - IdeaCard. entityId is a numeric Id (not relationship reference) to the entity, user subscribed to. In case of IdeaCard, IdeaCard id.
In this case, should I create a field with normal integer type, right? And before create or update, check if the id exists.
Looks good?
Why we have a created time instead of subscribed time?
Could be subscribed time, I just thought it would be more consistent to have similar name in all collections
Is there a convetion here in the project for that? Something like:
createdAt
or createdDateTime
or createdTime
or TimeCreated
wich one can adapt as well to the project?
Last question wich one looks better, camelCase
or PascalCase
Hey @becevka is it still open because we have to test the endpoints and pass all tests before to finalize the entire epic ?
Summary In order to support User Notifications, we need to subscribe users by default to the Idea of their interest.
Describe the solution you'd like Subscription Collection should consist of the following fields:
When user creates idea, subscription for the new idea is automatically created. When user posts comment to the idea, subscription for that idea is automatically created. For now, we can disable API endpoints to Subscription.
Acceptance Criteria