friendships.js 539 Bytes
/**
 * Created by Tommy Huang on 18/04/10.
 */

const sequelize = require('./db').db
const Sequelize = require('sequelize')

const Friendship = sequelize.define('friendship', {
  id: {
    type: Sequelize.INTEGER,
    autoIncrement: true,
    primaryKey: true
  },
  userId: {
    type: Sequelize.STRING,
    field: 'user_id',
    allowNull: false
  },
  friendId: {
    type: Sequelize.STRING,
    field: 'friend_id',
    allowNull: false
  }
}, {
  timestamp: false,
  createdAt: false,
  updatedAt: false,
})
module.exports = Friendship