spee.ch/models/channel.js
2017-09-25 21:03:43 -07:00

25 lines
451 B
JavaScript

module.exports = (sequelize, { STRING }) => {
const Channel = sequelize.define(
'Channel',
{
channelName: {
type : STRING,
allowNull: false,
},
channelClaimId: {
type : STRING,
allowNull: false,
},
},
{
freezeTableName: true,
}
);
Channel.associate = db => {
Channel.belongsTo(db.User);
Channel.hasOne(db.Certificate);
};
return Channel;
};