-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Targeted Messaging Datasource #1975
Conversation
Pull Request Test Coverage Report for Build 11106068331Details
💛 - Coveralls |
3527360
to
3b724fa
Compare
3b724fa
to
b997682
Compare
src/datasources/targeted-messaging/targeted-messaging.datasource.spec.ts
Outdated
Show resolved
Hide resolved
src/datasources/targeted-messaging/targeted-messaging.datasource.spec.ts
Outdated
Show resolved
Hide resolved
created_at: outreach.created_at, | ||
updated_at: outreach.updated_at, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should make these camel case for consistency? (I won't mark the others.)
created_at: outreach.created_at, | |
updated_at: outreach.updated_at, | |
createdAt: outreach.created_at, | |
updatedAt: outreach.updated_at, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue we would have with that is created_at
is inherited from RowSchema
, which defines those. Maybe at the domain level we could use Partial<>
typescript types, and ignore the database-specific date-control fields, but that would require a general refactor. I'd let this as is for now, and re-evaluate the need for those fields after the ORM integration, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine as is.
…ce.spec.ts Co-authored-by: Aaron Cook <aaron@safe.global>
…ce.spec.ts Co-authored-by: Aaron Cook <aaron@safe.global>
- Adds a database migration to initialize the tables for each entity. - Adds a `TargetedMessagingDatasource` containing methods to interact with `Outreaches`, `Targeted Safes`, and `Submissions`.
- Adds a database migration to initialize the tables for each entity. - Adds a `TargetedMessagingDatasource` containing methods to interact with `Outreaches`, `Targeted Safes`, and `Submissions`.
- Adds a database migration to initialize the tables for each entity. - Adds a `TargetedMessagingDatasource` containing methods to interact with `Outreaches`, `Targeted Safes`, and `Submissions`.
Summary
This adds a new datasource for the Targeted Messaging feature, consisting of the following persistence entities.
Outreach
: a messaging campaign withname
,start date
, andend date
.Targeted Safe
: an entity representing a Safe address targeted for a givenOutreach
.Submission
: a response to a givenOutreach
, given by a signer address of theTargeted Safe
.Changes
TargetedMessagingDatasource
containing methods to interact withOutreaches
,Targeted Safes
, andSubmissions
.