feat(chat): add chat room management functionality
- Created new chat schema in the database. - Implemented chat room model with necessary fields (title, ownerId, roomTypeId, etc.). - Added room type model and rights model for chat functionality. - Developed API endpoints for managing chat rooms, including create, edit, and delete operations. - Integrated chat room management into the admin interface with a dedicated view and dialog for room creation/editing. - Added internationalization support for chat room management UI. - Implemented autocomplete for victim selection in underground activities. - Enhanced the underground view with new activity types and political target selection.
This commit is contained in:
26
backend/models/chat/user_rights.js
Normal file
26
backend/models/chat/user_rights.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { DataTypes } from 'sequelize';
|
||||
import { sequelize } from '../../utils/sequelize.js';
|
||||
import ChatUser from './user.js';
|
||||
import ChatRight from './rights.js';
|
||||
|
||||
const ChatUserRight = sequelize.define('ChatUserRight', {
|
||||
chatUserId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
primaryKey: true,
|
||||
references: null, // Assoziation wird separat gesetzt
|
||||
},
|
||||
chatRightId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
primaryKey: true,
|
||||
references: null, // Assoziation wird separat gesetzt
|
||||
},
|
||||
}, {
|
||||
schema: 'chat',
|
||||
tableName: 'user_rights',
|
||||
timestamps: false,
|
||||
underscored: true,
|
||||
});
|
||||
|
||||
export default ChatUserRight;
|
||||
Reference in New Issue
Block a user