Created
September 12, 2022 12:53
-
-
Save garryyao/7f1013e35b1c5246b69e0495129384cc to your computer and use it in GitHub Desktop.
outbox db schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const subscriptionEvent = new mongoose.Schema({ | |
martechId: { | |
type: String, | |
required: true, | |
}, | |
subscriptionId: { | |
type: String, | |
required: true, | |
}, | |
clientId: { | |
type: String, | |
required: true, | |
}, | |
expiresAt: { | |
type: String, | |
required: true, | |
}, | |
eventType: { | |
type: String, | |
required: true, | |
}, | |
offerId: { | |
type: String, | |
required: true, | |
}, | |
productIds: { | |
type: Array, | |
required: true, | |
}, | |
provider: { | |
type: String, | |
required: true, | |
}, | |
timestamp: { | |
type: String, | |
required: true, | |
}, | |
location: { | |
type: String, | |
required: true, | |
}, | |
price: { | |
type: Number, | |
required: true, | |
}, | |
currencyCode: { | |
type: String, | |
required: true, | |
}, | |
cancelReason: { | |
type: String, | |
}, | |
paymentState: { | |
type: String, | |
}, | |
pushedOn: { | |
type: Date, | |
default: null, | |
}, | |
}); | |
subscriptionEvent.index({ subscriptionId: 1 }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment