feat(diary): improve predefined activities UI and enhance socket event integration
- Updated UI components for managing predefined activities to enhance user experience and accessibility. - Improved socket event integration for real-time updates related to predefined activities, ensuring seamless interaction with the diary service. - Refactored related mappers to support new UI changes and maintain data consistency across the application.
This commit is contained in:
93
backend/models/HttpPageFetchLog.js
Normal file
93
backend/models/HttpPageFetchLog.js
Normal file
@@ -0,0 +1,93 @@
|
||||
import { DataTypes } from 'sequelize';
|
||||
import sequelize from '../database.js';
|
||||
import User from './User.js';
|
||||
|
||||
const HttpPageFetchLog = sequelize.define('HttpPageFetchLog', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
allowNull: false,
|
||||
},
|
||||
userId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
references: {
|
||||
model: User,
|
||||
key: 'id',
|
||||
},
|
||||
onDelete: 'SET NULL',
|
||||
onUpdate: 'CASCADE',
|
||||
},
|
||||
fetchType: {
|
||||
type: DataTypes.STRING(64),
|
||||
allowNull: false,
|
||||
comment: 'z.B. leaguePage, clubInfoDisplay, regionMeetingFilter',
|
||||
},
|
||||
baseDomain: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false,
|
||||
comment: 'z.B. httv.click-tt.de',
|
||||
},
|
||||
fullUrl: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: false,
|
||||
},
|
||||
association: {
|
||||
type: DataTypes.STRING(64),
|
||||
allowNull: true,
|
||||
comment: 'Verband (z.B. HeTTV, RTTV)',
|
||||
},
|
||||
championship: {
|
||||
type: DataTypes.STRING(128),
|
||||
allowNull: true,
|
||||
comment: 'Championship-Parameter (z.B. HTTV 25/26)',
|
||||
},
|
||||
clubIdParam: {
|
||||
type: DataTypes.STRING(64),
|
||||
allowNull: true,
|
||||
comment: 'Club-ID falls clubInfoDisplay',
|
||||
},
|
||||
httpStatus: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
},
|
||||
success: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
},
|
||||
responseSnippet: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
comment: 'Gekürzter Response-Anfang zur Strukturanalyse',
|
||||
},
|
||||
contentType: {
|
||||
type: DataTypes.STRING(128),
|
||||
allowNull: true,
|
||||
},
|
||||
errorMessage: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
},
|
||||
executionTimeMs: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
comment: 'Laufzeit in Millisekunden',
|
||||
},
|
||||
}, {
|
||||
underscored: true,
|
||||
tableName: 'http_page_fetch_log',
|
||||
timestamps: true,
|
||||
updatedAt: false,
|
||||
indexes: [
|
||||
{ fields: ['created_at'] },
|
||||
{ fields: ['base_domain', 'fetch_type'] },
|
||||
{ fields: ['association', 'championship'] },
|
||||
],
|
||||
});
|
||||
|
||||
HttpPageFetchLog.belongsTo(User, { foreignKey: 'userId', as: 'user' });
|
||||
User.hasMany(HttpPageFetchLog, { foreignKey: 'userId', as: 'httpPageFetchLogs' });
|
||||
|
||||
export default HttpPageFetchLog;
|
||||
Reference in New Issue
Block a user