Advertisement
Guest User

Untitled

a guest
Oct 4th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* jshint indent: 2 */
  2. "use strict";
  3. //
  4. //SCHEMA
  5.  
  6. module.exports = (sequelize, DataTypes) => {
  7.   var User =  sequelize.define('User', {
  8.     id_usuario: {
  9.       type: DataTypes.INTEGER(11),
  10.       allowNull: false,
  11.       primaryKey: true,
  12.       autoIncrement: true
  13.     },
  14.     tipo: {
  15.       type: DataTypes.INTEGER(1),
  16.       allowNull: true
  17.     },
  18.     nombre: {
  19.       type: DataTypes.STRING(200),
  20.       allowNull: true
  21.     },
  22.     username: {
  23.       type: DataTypes.STRING(200),
  24.       allowNull: true
  25.     },
  26.     email: {
  27.       type: DataTypes.STRING(200),
  28.       allowNull: true
  29.     },
  30.     password: {
  31.       type: DataTypes.STRING(200),
  32.       allowNull: true
  33.     },
  34.     cookie: {
  35.       type: DataTypes.STRING(2000),
  36.       allowNull: true,
  37.       unique: true
  38.     }
  39.   }, {
  40.     tableName: 'user'
  41.   });
  42.     return User;
  43. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement