project-url.model.js 597 B

123456789101112131415
  1. /**
  2. * @file Provides the model for project urls.
  3. * @author Inigo Valentin
  4. * @since 4.0.0
  5. */
  6. module.exports = (sequelize, Sequelize) => {
  7. ProjectUrl = sequelize.define("project-url", {
  8. id: {allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER},
  9. projectId: {allowNull: false, type: Sequelize.INTEGER, references: {model: "projects", key: "id"}},
  10. projectUrlTypeId: {allowNull: false, type: Sequelize.INTEGER, references: {model: "project-url-types", key: "id"}},
  11. url: {type: Sequelize.STRING(512)},
  12. }, {timestamps: false});
  13. return ProjectUrl;
  14. }