Some falukant fixes, added undeground ui - no save right now, changed menu (and verification)
This commit is contained in:
@@ -88,6 +88,8 @@ import PoliticalOfficeRequirement from './falukant/predefine/political_office_pr
|
||||
import PoliticalOfficePrerequisite from './falukant/predefine/political_office_prerequisite.js';
|
||||
import PoliticalOfficeHistory from './falukant/log/political_office_history.js';
|
||||
import ElectionHistory from './falukant/log/election_history.js';
|
||||
import Underground from './falukant/data/underground.js';
|
||||
import UndergroundType from './falukant/type/underground.js';
|
||||
|
||||
export default function setupAssociations() {
|
||||
// UserParam related associations
|
||||
@@ -675,7 +677,7 @@ export default function setupAssociations() {
|
||||
|
||||
PoliticalOfficeType.hasMany(PoliticalOfficeHistory, {
|
||||
foreignKey: 'officeTypeId',
|
||||
as: 'history',
|
||||
as: 'history',
|
||||
});
|
||||
|
||||
FalukantCharacter.hasMany(PoliticalOfficeHistory, {
|
||||
@@ -686,7 +688,7 @@ export default function setupAssociations() {
|
||||
foreignKey: 'characterId',
|
||||
as: 'character',
|
||||
});
|
||||
|
||||
|
||||
ElectionHistory.belongsTo(PoliticalOfficeType, {
|
||||
foreignKey: 'officeTypeId',
|
||||
as: 'officeTypeHistory',
|
||||
@@ -696,5 +698,34 @@ export default function setupAssociations() {
|
||||
foreignKey: 'officeTypeId',
|
||||
as: 'electionHistory',
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
Underground.belongsTo(UndergroundType, {
|
||||
foreignKey: 'undergroundTypeId',
|
||||
as: 'undergroundType'
|
||||
});
|
||||
UndergroundType.hasMany(Underground, {
|
||||
foreignKey: 'undergroundTypeId',
|
||||
as: 'undergrounds'
|
||||
});
|
||||
|
||||
// 2) Täter (performer)
|
||||
Underground.belongsTo(FalukantCharacter, {
|
||||
foreignKey: 'performerId',
|
||||
as: 'performer'
|
||||
});
|
||||
FalukantCharacter.hasMany(Underground, {
|
||||
foreignKey: 'performerId',
|
||||
as: 'performedUndergrounds'
|
||||
});
|
||||
|
||||
// 3) Opfer (victim)
|
||||
Underground.belongsTo(FalukantCharacter, {
|
||||
foreignKey: 'victimId',
|
||||
as: 'victim'
|
||||
});
|
||||
FalukantCharacter.hasMany(Underground, {
|
||||
foreignKey: 'victimId',
|
||||
as: 'victimUndergrounds'
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user