Spiel erweitert
This commit is contained in:
45
backend/models/falukant/data/child_relation.js
Normal file
45
backend/models/falukant/data/child_relation.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import { Model, DataTypes } from 'sequelize';
|
||||
import { sequelize } from '../../../utils/sequelize.js';
|
||||
|
||||
class ChildRelation extends Model {}
|
||||
|
||||
ChildRelation.init(
|
||||
{
|
||||
fatherCharacterId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
motherCharacterId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
childCharacterId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
fatherName: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
},
|
||||
motherName: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
},
|
||||
nameSet: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
modelName: 'ChildRelation',
|
||||
tableName: 'child_relation', // exakter Tabellenname
|
||||
schema: 'falukant_data', // exaktes Schema
|
||||
freezeTableName: true, // keine Pluralisierung
|
||||
timestamps: true,
|
||||
underscored: true,
|
||||
}
|
||||
);
|
||||
|
||||
export default ChildRelation;
|
||||
Reference in New Issue
Block a user