-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # bin/www # model/Classes/Bot.js # model/Classes/MySQLDataBase.js
- Loading branch information
Showing
100 changed files
with
4,399 additions
and
2,925 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
DATABASE_NAME | ||
DATABASE_USERNAME | ||
DATABASE_PASSWORD | ||
DATABASE_TIMEZONE | ||
DATABASE_HOST | ||
DATABASE_PORT | ||
DATABASE_DIALECT | ||
DATABASE_ACQUIRE_TIME | ||
DATABASE_MAX_CONNECTION | ||
DATABASE_MIN_CONNECTION | ||
DATABASE_IDLE_TIME | ||
DATABASE_EVICT_TIME | ||
NODE_ENVIRONMENT | ||
PROCESS_OWN_PING_INTERVAL | ||
CACHE_TIME | ||
AWS_ACCESS_KEY | ||
AWS_SECRET_ACCESS_KEY | ||
AWS_S3_REGION | ||
AWS_S3_BUCKET | ||
AWS_S3_CACHE | ||
FACEBOOK_TOKEN | ||
FACEBOOK_API_VERSION | ||
FACEBOOK_VERIFY_TOKEN | ||
GOOGLE_APPLICATION_CREDENTIALS | ||
GOOGLE_DIALOGFLOW_JSON | ||
GOOGLE_DIALOGFLOW_LANGUAGE | ||
ACADEMIBOT_MEDIA_FOLDER | ||
ACADEMIBOT_BIENVENIDA | ||
ACADEMIBOT_USERS_FOLDER | ||
SERVER_COOKIE_NAME | ||
SERVER_OWN_URL | ||
SERVER_COOKIE_SECRET | ||
SERVER_COOKIE_MAXAGE | ||
PORT |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: node app.js | ||
web: node ./bin/www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const { DataTypes, Model } = require("sequelize"); | ||
const sequelize = require("../database"); | ||
|
||
class Canal_mensajeria extends Model { } | ||
|
||
Canal_mensajeria.init({ | ||
id: { | ||
type: DataTypes.STRING(20), | ||
primaryKey: true, | ||
comment: "Nombre del canal de mensajería." | ||
}, | ||
descripcion: { | ||
type: DataTypes.TEXT, | ||
allowNull: false | ||
} | ||
}, { | ||
tableName: 'canal_mensajeria', | ||
sequelize, | ||
timestamps: false, | ||
underscored: true, | ||
comment: "Entidad canal de mensajería, identificado por un nombre único, seguido de una descripción." | ||
}); | ||
module.exports = Canal_mensajeria; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const { DataTypes, Model } = require("sequelize"); | ||
const sequelize = require("../database"); | ||
|
||
class Ciclo extends Model { | ||
enviable() { | ||
return { | ||
title: this.get('nombre'), | ||
payload: `SetCiclo:${this.get('id')}` | ||
} | ||
} | ||
} | ||
|
||
Ciclo.init({ | ||
id: { | ||
type: DataTypes.TINYINT.UNSIGNED, | ||
primaryKey: true | ||
}, | ||
nombre: { | ||
type: DataTypes.STRING(30), | ||
allowNull: false | ||
} | ||
}, { | ||
tableName: 'ciclo', | ||
timestamps: false, | ||
sequelize, | ||
underscored: true, | ||
comment: 'Esta entidad almacena atributos sobre el Ciclo academico.' | ||
}); | ||
|
||
module.exports = Ciclo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const { Model, DataTypes } = require("sequelize"); | ||
const sequelize = require("../database"); | ||
|
||
class Cuenta extends Model { } | ||
|
||
Cuenta.init({ | ||
id: { | ||
type: DataTypes.INTEGER({ length: 10, zerofill: true, unsigned: true}), | ||
primaryKey: true, | ||
autoIncrement: true | ||
}, | ||
tipo_cuenta_id: { | ||
type: DataTypes.SMALLINT.UNSIGNED, | ||
allowNull: false | ||
} | ||
}, { | ||
sequelize, | ||
tableName: 'cuenta', | ||
initialAutoIncrement: 1000000000, | ||
timestamps: true, | ||
updatedAt: false, | ||
paranoid: true, | ||
underscored: true, | ||
indexes: [ | ||
{ | ||
unique: false, | ||
fields: [{ name: 'tipo_cuenta_id' }] | ||
} | ||
], | ||
comment: "Instancia de cuenta, entidad volátil que permite representar el comportamiento de los personajes." | ||
}); | ||
|
||
module.exports = Cuenta; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
const { DataTypes, Model } = require("sequelize"); | ||
const sequelize = require("../database"); | ||
|
||
class Curso extends Model { | ||
enviable() { | ||
return { | ||
title: this.get('nombre').toUpperCase(), | ||
subtitle: `Sis. de evaluación: ${this.get('sistema_calificacion_id')}\nCréditos: ${this.get('creditos')}`, | ||
buttons: [ | ||
{ | ||
title : `MATERIAL ${this.get('id')}`, | ||
payload : `SetCurso:${this.get('id')}` | ||
} | ||
] | ||
}; | ||
} | ||
} | ||
|
||
Curso.init({ | ||
id: { | ||
type: DataTypes.STRING(10), | ||
primaryKey: true | ||
}, | ||
nombre: { | ||
type: DataTypes.STRING(100), | ||
allowNull: false | ||
}, | ||
descripcion: { | ||
type: DataTypes.TEXT, | ||
allowNull: true, | ||
defaultValue: null | ||
}, | ||
creditos: { | ||
type: DataTypes.TINYINT.UNSIGNED, | ||
allowNull: true, | ||
defaultValue: null | ||
}, | ||
sistema_calificacion_id: { | ||
type: DataTypes.CHAR(1), | ||
allowNull: false | ||
} | ||
}, { | ||
tableName: 'curso', | ||
timestamps: true, | ||
createdAt: false, | ||
sequelize, | ||
underscored: true, | ||
indexes: [ | ||
{ | ||
unique: false, | ||
fields: [{ name: 'sistema_calificacion_id' }] | ||
} | ||
], | ||
comment: 'Esta entidad almacena atributos sobre el Curso.' | ||
}); | ||
|
||
module.exports = Curso; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const { DataTypes, Model } = require("sequelize"); | ||
const sequelize = require("../database"); | ||
|
||
class Elemento_malla_curricular extends Model { } | ||
|
||
Elemento_malla_curricular.init({ | ||
especialidad_id: { | ||
type: DataTypes.STRING(10), | ||
primaryKey: true | ||
}, | ||
curso_id: { | ||
type: DataTypes.STRING(10), | ||
primaryKey: true | ||
}, | ||
ciclo_id: { | ||
type: DataTypes.TINYINT.UNSIGNED, | ||
primaryKey: true | ||
} | ||
}, { | ||
tableName: 'elemento_malla_curricular', | ||
timestamps: true, | ||
createdAt: false, | ||
underscored: true, | ||
sequelize, | ||
indexes: [ | ||
{ | ||
unique: false, | ||
fields: [{ name: 'especialidad_id' }, { name: 'ciclo_id' }] | ||
} | ||
], | ||
comment: "Elemento de la malla curricular, denotado por tres claves foraneas que la vez se comportan como primaria." | ||
}); | ||
|
||
module.exports = Elemento_malla_curricular; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
const { DataTypes, Model } = require("sequelize"); | ||
const sequelize = require("../database"); | ||
|
||
class Especialidad extends Model { | ||
enviable() { | ||
return { | ||
title: this.get('nombre').toUpperCase(), | ||
subtitle: this.get('descripcion'), | ||
buttons: [ | ||
{ | ||
title : `ELEGIR ${this.get('id')}`, | ||
payload : `SetEspecialidad:${this.get('id')}` | ||
} | ||
] | ||
}; | ||
} | ||
} | ||
|
||
Especialidad.init({ | ||
id: { | ||
type: DataTypes.STRING(10), | ||
primaryKey: true | ||
}, | ||
nombre: { | ||
type: DataTypes.STRING, | ||
allowNull: false | ||
}, | ||
descripcion: { | ||
type: DataTypes.TEXT, | ||
allowNull: true | ||
}, | ||
facultad_id: { | ||
type: DataTypes.STRING(10), | ||
allowNull: false | ||
} | ||
},{ | ||
indexes: [ | ||
{ | ||
unique: true, | ||
fields: [{ name: 'nombre' }] | ||
} | ||
], | ||
comment: 'Esta entidad almacena atributos de la Especialidad.', | ||
tableName: 'especialidad', | ||
timestamps: false, | ||
underscored: true, | ||
sequelize | ||
}); | ||
module.exports = Especialidad; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const { Model, DataTypes } = require("sequelize"); | ||
const sequelize = require("../database"); | ||
|
||
class Evento extends Model { } | ||
|
||
Evento.init({ | ||
id: { | ||
type: DataTypes.INTEGER({ length: 10, zerofill: true, unsigned: true}), | ||
primaryKey: true, | ||
autoIncrement: true | ||
}, | ||
tipo_evento_id: { | ||
type: DataTypes.SMALLINT.UNSIGNED, | ||
allowNull: false | ||
}, | ||
duracion_en_ms: { | ||
type: DataTypes.INTEGER.UNSIGNED, | ||
allowNull: false, | ||
defaultValue: 0 | ||
}, | ||
error: { | ||
type: DataTypes.JSON, | ||
allowNull: true, | ||
defaultValue: null | ||
} | ||
}, { | ||
initialAutoIncrement: 1000000000, | ||
tableName: 'evento', | ||
timestamps: true, | ||
updatedAt: false, | ||
paranoid: true, | ||
underscored: true, | ||
sequelize, | ||
comment: "Instancia evento, representa a un evento real, hereda atributos de un tipo de evento." | ||
}); | ||
|
||
module.exports = Evento; |
Oops, something went wrong.