Some extensions and fixes

This commit is contained in:
Torsten Schulz
2025-01-28 09:55:36 +01:00
parent 2f60741116
commit 90b4f51dcb
27 changed files with 910 additions and 53 deletions

View File

@@ -1,49 +1,57 @@
import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';
class FalukantCharacter extends Model {};
class FalukantCharacter extends Model {}
FalukantCharacter.init({
userId: {
type: DataTypes.INTEGER,
allowNull: true,
FalukantCharacter.init(
{
user_id: {
type: DataTypes.INTEGER,
allowNull: true,
},
regionId: {
type: DataTypes.INTEGER,
allowNull: false,
region_id: {
type: DataTypes.INTEGER,
allowNull: false,
},
firstName: {
type: DataTypes.INTEGER,
allowNull: false,
first_name: {
type: DataTypes.INTEGER,
allowNull: false,
},
lastName: {
type: DataTypes.INTEGER,
allowNull: false,
last_name: {
type: DataTypes.INTEGER,
allowNull: false,
},
birthdate: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.NOW
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.NOW,
},
gender: {
type: DataTypes.STRING
type: DataTypes.STRING,
},
health: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 100
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 100,
},
titleOfNobility: {
type: DataTypes.INTEGER,
allowNull: false,
type: DataTypes.INTEGER,
allowNull: false,
},
moodId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 1,
}
}, {
},
{
sequelize,
modelName: 'FalukantCharacter',
tableName: 'character',
schema: 'falukant_data',
timestamps: true,
underscored: true,
});
}
);
export default FalukantCharacter;