Created
November 16, 2015 16:12
-
-
Save rashthedude/4b9e894170283f163a59 to your computer and use it in GitHub Desktop.
This file contains 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
var Service = sequelize.define('Service', { | |
msisdn: {type: Sequelize.INTEGER}, | |
service: {type: Sequelize.STRING}, | |
correlationid: {type: Sequelize.STRING}, | |
supervision: {type: Sequelize.STRING}, | |
brand: {type: Sequelize.STRING} | |
}); | |
var ChargeDetails = sequelize.define('ChargeDetails', {}); | |
var Subscription = sequelize.define('Subscription', { | |
subscriptionID: {type: Sequelize.INTEGER}, | |
subscriptionPhaseID: {type: Sequelize.INTEGER}, | |
chargeAmount: {type: Sequelize.INTEGER} | |
}); | |
var ChargeBand = sequelize.define('ChargeBand', { | |
vendorName: {type: Sequelize.STRING} | |
}); | |
var ChargeBandIdentifier = sequelize.define('ChargeBandIdentifier', { | |
chargeBandName: {type: Sequelize.STRING}, | |
chargeBandAmount: {type: Sequelize.INTEGER} | |
}); | |
var SubscriptionType = sequelize.define('SubscriptionType', { | |
subscriptionTypeName: {type: Sequelize.STRING}, | |
productCategory: {type: Sequelize.STRING} | |
}); | |
ChargeDetails.belongsTo(ChargeBand); | |
ChargeDetails.belongsTo(Subscription); | |
Service.belongsTo(ChargeDetails); | |
ChargeBand.belongsTo(SubscriptionType); | |
ChargeBand.belongsTo(ChargeBandIdentifier); | |
SubscriptionType.sync({force: true}); | |
ChargeBand.sync({force: true}); | |
ChargeDetails.sync({force: true}); | |
Subscription.sync({force: true}); | |
ChargeBandIdentifier.sync({force: true}); | |
Service.sync({force: true}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment