module.exports = {
  setAccountModel: function (redisClient, accountHashID, payload, callback) {

  },
  updateAccountModel: function (redisClient, accountHashID, payload, callback) {
    
  }
}
@@ -1,192 +1,3465 @@
-module.exports = %7B%0A  setAccountModel: function (redisClient, accountHashID, payload, callback) %7B%0A%0A  %7D,%0A  updateAccountModel: function (redisClient, accountHashID, payload, callback) %7B%0A    
+var configuration = require('../../config/configuration')%0Avar utility = require('../../public/method/utility')%0A%0A%0Amodule.exports = %7B%0A  setAccountModel: function (redisClient, accountHashID, payload, callback) %7B%0A    var tableName%0A    var score%0A    var accountType %0A    var multi = redisClient.multi()%0A%0A    /* Add to AccountModel:AnnouncerAccountModel:AccountHashID */%0A    tableName = configuration.TableMAAccountModelAnnouncerAccountModel + accountHashID%0A    multi.hmset(tableName,%0A      configuration.ConstantAMAAMBudget, payload.budget,%0A      configuration.ConstantAMAAMAccountType, payload.accountType%0A    )%0A%0A    /* Add to AccountModel:AnnouncerAccountModel: */%0A    score = utility.getUnixTimeStamp()%0A    tableName = configuration.TableMAAccountModelAnnouncerAccountModel%0A    multi.zadd(tableName, 'NX', score, accountHashID)%0A%0A    /* Add to AccountModel:AnnouncerAccountType: */    %0A    accountType = payload.accountType%0A    tableName = configuration.TableModel.general.AnnouncerModel%0A    utility.stringReplace(tableName, '@', accountType)%0A    multi.zadd(tableName, 'NX', score, accountHashID)%0A%0A    multi.exec(function (err, replies) %7B%0A      if (err) %7B%0A        callback(err, null)%0A        return%0A      %7D%0A      callback(null, 'Added to AccountModel')%0A    %7D)%0A  %7D,%0A  updateAccountModel: function (redisClient, accountHashID, payload, callback) %7B%0A    var multi = redisClient.multi()%0A    %0A    var tableName = configuration.TableMAAccountModelAnnouncerAccountModel + accountHashID%0A    //Not Exist%0A    if (payload%5Bconfiguration.ConstantAMAAMBudget%5D != null) %7B%0A      /* Read budget from AccountModel:AnnouncerAccountModel:AccountHashID */%0A      redisClient.hget(tableName, configuration.ConstantAMAAMBudget, function (err, replies) %7B%0A        if (err) %7B%0A          callback(err, null)%0A          return%0A        %7D%0A        if (replies != null && replies != undefined) %7B%0A          var newbudget = parseInt(replies, 10) + parseInt(payload.budget)%0A          /* Write newbudget to AccountModel:AnnouncerAccountModel:AccountHashID */%0A          multi.hset(tableName, configuration.ConstantAMAAMBudget, newbudget.toString())%0A        %7D%0A      %7D)%0A    %7D%0A    if (payload%5Bconfiguration.ConstantAMAAMAccountType%5D != null) %7B%0A      /* Read accountType from AccountModel:AnnouncerAccountModel:AccountHashID */%0A      redisClient.hget(tableName, configuration.ConstantAMAAMAccountType, function (err, replies) %7B%0A        if (err) %7B%0A          callback(err, null)%0A          return%0A        %7D %0A        if (replies != null && replies != undefined) %7B%0A          if (replies !== payload.accountType) %7B  %0A            var accountTypeTableName = configuration.TableModel.general.AnnouncerModel%0A            utility.stringReplace(accountTypeTableName, '@', replies)%0A            /* Remove accountHashID from AccountModel:AnnouncerAccountType: table */%0A            multi.zrem(accountTypeTableName, accountHashID)%0A            accountTypeTableName = configuration.TableModel.general.AnnouncerModel%0A            utility.stringReplace(accountTypeTableName, '@', payload.accountType)%0A            var score = utility.getUnixTimeStamp()%0A            /* Add accountHashID to AccountModel:AnnouncerAccountType:(new) table */ %0A            multi.zadd(accountTypeTableName, 'NX', score, accountHashID)%0A          %7D%0A        %7D%0A      %7D)%0A    %7D%0A    multi.exec(function (err, replies) %7B%0A      if (err) %7B%0A        callback(err, null)%0A        return%0A      %7D%0A      callback(null, 'Updated in AccountModel and somewhere else')%0A    %7D)%0A
 %0A  %7D

Implement Set and Update Account Model business Logic