Files
yourpart3/backend/models/chat/user.js
Torsten Schulz (local) 1ab9407e79
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
2026-07-21 09:08:15 +02:00

34 lines
919 B
JavaScript
Executable File

import { DataTypes } from 'sequelize';
import { sequelize } from '../../utils/sequelize.js';
const ChatUser = sequelize.define('ChatUser', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true},
falukantUserId: {
type: DataTypes.INTEGER,
allowNull: false,
comment: 'Verknüpfung zu community.falukant_user'},
displayName: {
type: DataTypes.STRING(64),
allowNull: false},
color: {
type: DataTypes.STRING(16), // z.B. Hex-Code
allowNull: false,
defaultValue: '#000000'},
showGender: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: true},
showAge: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: true}}, {
schema: 'chat',
tableName: 'user',
timestamps: true,
underscored: true});
export default ChatUser;