Files
ETAApi/server/src/Shared/Models/Objection/user_sessions.model.js
2024-04-12 12:22:02 -06:00

21 lines
510 B
JavaScript

'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;