Start implementation of branches, new form element tabledropdown, model improvements

This commit is contained in:
Torsten Schulz
2024-12-06 23:35:28 +01:00
parent 8c15fb7f2b
commit 1bb2bd49d5
57 changed files with 2176 additions and 170 deletions

View File

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