spee.ch/server/models/channel.js

26 lines
451 B
JavaScript
Raw Normal View History

2017-09-26 05:30:45 +02:00
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;
};