Bereinigen und Entfernen von nicht mehr benötigten TinyMCE-Dateien und -Plugins; Aktualisierung der Internationalisierung für Deutsch und Englisch in den Falukant- und Navigationsmodulen; Verbesserung der Statusleiste und Router-Implementierung.
This commit is contained in:
@@ -97,10 +97,28 @@ import Underground from './falukant/data/underground.js';
|
||||
import UndergroundType from './falukant/type/underground.js';
|
||||
import Blog from './community/blog.js';
|
||||
import BlogPost from './community/blog_post.js';
|
||||
import MinigameCampaign from './service/minigame_campaign.js';
|
||||
import MinigameCampaignLevel from './service/minigame_campaign_level.js';
|
||||
import MinigameUserProgress from './service/minigame_user_progress.js';
|
||||
|
||||
// Match3 Models
|
||||
import Match3Campaign from './match3/campaign.js';
|
||||
import Match3Level from './match3/level.js';
|
||||
import Match3Objective from './match3/objective.js';
|
||||
import Match3UserProgress from './match3/userProgress.js';
|
||||
import Match3UserLevelProgress from './match3/userLevelProgress.js';
|
||||
|
||||
export default function setupAssociations() {
|
||||
// RoomType 1:n Room
|
||||
RoomType.hasMany(Room, { foreignKey: 'roomTypeId', as: 'rooms' });
|
||||
// Minigames associations
|
||||
MinigameCampaign.hasMany(MinigameCampaignLevel, { foreignKey: 'campaign_id', as: 'levels' });
|
||||
MinigameCampaignLevel.belongsTo(MinigameCampaign, { foreignKey: 'campaign_id', as: 'campaign' });
|
||||
|
||||
User.hasMany(MinigameUserProgress, { foreignKey: 'user_id', as: 'minigameProgress' });
|
||||
MinigameUserProgress.belongsTo(User, { foreignKey: 'user_id', as: 'user' });
|
||||
MinigameCampaign.hasMany(MinigameUserProgress, { foreignKey: 'campaign_id', as: 'userProgress' });
|
||||
MinigameUserProgress.belongsTo(MinigameCampaign, { foreignKey: 'campaign_id', as: 'campaign' });
|
||||
Room.belongsTo(RoomType, { foreignKey: 'roomTypeId', as: 'roomType' });
|
||||
// ChatUser <-> ChatRight n:m
|
||||
ChatUser.belongsToMany(ChatRight, {
|
||||
@@ -768,4 +786,59 @@ export default function setupAssociations() {
|
||||
Blog.hasMany(BlogPost, { foreignKey: 'blog_id', as: 'posts' });
|
||||
BlogPost.belongsTo(User, { foreignKey: 'user_id', as: 'author' });
|
||||
User.hasMany(BlogPost, { foreignKey: 'user_id', as: 'blogPosts' });
|
||||
|
||||
// Match3 associations
|
||||
Match3Campaign.hasMany(Match3Level, {
|
||||
foreignKey: 'campaignId',
|
||||
as: 'levels'
|
||||
});
|
||||
Match3Level.belongsTo(Match3Campaign, {
|
||||
foreignKey: 'campaignId',
|
||||
as: 'campaign'
|
||||
});
|
||||
|
||||
Match3Level.hasMany(Match3Objective, {
|
||||
foreignKey: 'levelId',
|
||||
as: 'objectives'
|
||||
});
|
||||
Match3Objective.belongsTo(Match3Level, {
|
||||
foreignKey: 'levelId',
|
||||
as: 'level'
|
||||
});
|
||||
|
||||
Match3Campaign.hasMany(Match3UserProgress, {
|
||||
foreignKey: 'campaignId',
|
||||
as: 'userProgress'
|
||||
});
|
||||
Match3UserProgress.belongsTo(Match3Campaign, {
|
||||
foreignKey: 'campaignId',
|
||||
as: 'campaign'
|
||||
});
|
||||
|
||||
User.hasMany(Match3UserProgress, {
|
||||
foreignKey: 'userId',
|
||||
as: 'match3Progress'
|
||||
});
|
||||
Match3UserProgress.belongsTo(User, {
|
||||
foreignKey: 'userId',
|
||||
as: 'user'
|
||||
});
|
||||
|
||||
Match3UserProgress.hasMany(Match3UserLevelProgress, {
|
||||
foreignKey: 'userProgressId',
|
||||
as: 'levelProgress'
|
||||
});
|
||||
Match3UserLevelProgress.belongsTo(Match3UserProgress, {
|
||||
foreignKey: 'userProgressId',
|
||||
as: 'userProgress'
|
||||
});
|
||||
|
||||
Match3Level.hasMany(Match3UserLevelProgress, {
|
||||
foreignKey: 'levelId',
|
||||
as: 'userProgress'
|
||||
});
|
||||
Match3UserLevelProgress.belongsTo(Match3Level, {
|
||||
foreignKey: 'levelId',
|
||||
as: 'level'
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user