feat: Split v1 and v2 apis

This commit is contained in:
Josepablo C
2024-08-05 15:33:23 -06:00
parent 49ee7d7b5a
commit c3f0b08cb7
149 changed files with 284 additions and 33 deletions

View File

@@ -0,0 +1,32 @@
'use strict';
const { Model } = require('objection');
class LoadAttachments extends Model {
static get tableName() { return 'load_attachments'; }
static get idColumn() { return 'id'; }
static get jsonSchema() {
return {
type : 'object',
required : [
'status',
'type',
'createdAt',
'updatedAt',
'doneAt'
],
properties : {
load_id : { type : 'integer' , minimum : 0 },
shipper_id : { type : 'integer' , minimum : 0 },
carrier_id : { type : 'integer' , minimum : 0 },
author_id : { type : 'integer' , minimum : 0 },
status : { type : 'string' , default : 'Draft', enum: ['Draft', 'Done'] },
type : { type : 'string' , enum: ['Draft', 'Done'] },
createdAt : { type : 'date-time' },
updatedAt : { type : 'date-time' },
doneAt : { type : 'date-time' }
}
};
}
}
module.exports = LoadAttachments;