Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Version 1.1 #71

Merged
merged 7 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions models/UserMapping.js → models/GithubUserMapping.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This defines user mapping model.
* This defines github user mapping model.
*/
'use strict';

Expand Down Expand Up @@ -32,15 +32,6 @@ const schema = new Schema({
name: 'GithubUsernameIndex'
}
},
gitlabUsername: {
type: String,
index: {
global: true,
project: true,
rangKey: 'id',
name: 'GitlabUsernameIndex'
}
},
githubUserId: {
type: Number,
index: {
Expand All @@ -49,15 +40,6 @@ const schema = new Schema({
rangKey: 'id',
name: 'GithubUserIdIndex'
}
},
gitlabUserId: {
type: Number,
index: {
global: true,
project: true,
rangKey: 'id',
name: 'GitlabUserIdIndex'
}
}
});

Expand Down
46 changes: 46 additions & 0 deletions models/GitlabUserMapping.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* This defines gitlab user mapping model.
*/
'use strict';

const dynamoose = require('dynamoose');

const Schema = dynamoose.Schema;

const schema = new Schema({
id: {
type: String,
required: true,
hashKey: true
},
topcoderUsername: {
type: String,
required: true,
index: {
global: true,
project: true,
rangKey: 'id',
name: 'TopcoderUsernameIndex'
}
},
gitlabUsername: {
type: String,
index: {
global: true,
project: true,
rangKey: 'id',
name: 'GitlabUsernameIndex'
}
},
gitlabUserId: {
type: Number,
index: {
global: true,
project: true,
rangKey: 'id',
name: 'GitlabUserIdIndex'
}
}
});

module.exports = schema;
5 changes: 3 additions & 2 deletions models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ const models = {
Issue: dynamoose.model('Topcoder_X.Issue', require('./Issue')),
Project: dynamoose.model('Topcoder_X.Project', require('./Project')),
User: dynamoose.model('Topcoder_X.User', require('./User')),
UserMapping: dynamoose.model('Topcoder_X.UserMapping', require('./UserMapping')),
CopilotPayment: dynamoose.model('Topcoder_X.CopilotPayment', require('./CopilotPayment'))
CopilotPayment: dynamoose.model('Topcoder_X.CopilotPayment', require('./CopilotPayment')),
GithubUserMapping: dynamoose.model('Topcoder_X.GithubUserMapping', require('./GithubUserMapping')),
GitlabUserMapping: dynamoose.model('Topcoder_X.GitlabUserMapping', require('./GitlabUserMapping'))
};
/* eslint-enable global-require */

Expand Down
Loading