Skip to content

20230912 웹소켓(model>chat)백업용 #49

Description

@fun1ty

const { DataTypes } = require("sequelize");

const Model = (sequelize) => {
return sequelize.define("chat", {
//컬럼 정의
id: {
type: DataTypes.INTEGER,
allowNull: false, //NOT NULL
primaryKey: true,
autoIncrement: true,
},
userid: {
type: DataTypes.INTEGER,
allowNull: false,
},
roomid: {
type: DataTypes.INTEGER,
allowNull: false,
},
CONTENT: {
type: DataTypes.STRING(500),
allowNull: true,
},
FILE: {
type: DataTypes.STRING(500),
allowNull: true,
},
joinuser: {
type: DataTypes.INTEGER,
allowNull: true,
},
});
};

module.exports = Model;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions