feat(v3): Adding baseline for API v3

This commit is contained in:
Josepablo C
2024-04-12 12:22:02 -06:00
parent 1a279aea87
commit 49673d811c
48 changed files with 1804 additions and 170 deletions

View File

@@ -0,0 +1,20 @@
'use strict';
const { Model } = require('objection');
class UserSessions extends Model {
static get tableName() { return 'user_sessions'; }
static get idColumn() { return 'id'; }
static get jsonSchema() {
return {
type : 'object',
required : ['user_id','token','expiration'],
properties : {
user_id : { type : 'integer' , minimum : 0 },
token: { type: 'string' , maxLength : 256 },
expiration: { type: 'string' },
}
};
}
}
module.exports = UserSessions;