Skip to content
Snippets Groups Projects
Commit be050e46 authored by tpgus2603's avatar tpgus2603
Browse files

rename: 파일명 변경안된 오류 해결(#21)

parent af05da72
Branches
No related tags found
1 merge request!42[#25] 배포코드 master브랜치로 이동
// models/friend.js
const { DataTypes } = require('sequelize');
const sequelize = require('../config/sequelize');
const User = require('./user');
const Friend = sequelize.define('Friend', {
status: {
type: DataTypes.ENUM('PENDING', 'ACCEPTED'),
allowNull: false,
defaultValue: 'PENDING',
}
}, {
tableName: 'Friends',
timestamps: true,
underscored: true,
indexes: [
{
unique: true,
fields: ['requester_id', 'receiver_id']
},
{
fields: ['status']
}
]
});
module.exports = Friend;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment