Director hiring added

This commit is contained in:
Torsten Schulz
2025-01-09 15:31:55 +01:00
parent 6f7d97672e
commit 2f60741116
30 changed files with 2368 additions and 751 deletions

View File

@@ -0,0 +1,45 @@
import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';
class MoneyFlow extends Model { }
MoneyFlow.init({
falukantUserId: {
type: DataTypes.INTEGER,
allowNull: false,
},
activity: {
type: DataTypes.STRING,
allowNull: false,
},
moneyBefore: {
type: DataTypes.DOUBLE,
allowNull: false,
},
moneyAfter: {
type: DataTypes.DOUBLE,
allowNull: true,
},
time: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.NOW
},
changeValue: {
type: DataTypes.DOUBLE,
allowNull: false,
},
changedBy: {
type: DataTypes.INTEGER,
allowNull: true,
},
}, {
sequelize,
modelName: 'MoneyFlow',
tableName: 'moneyflow',
schema: 'falukant_log',
timestamps: false,
underscored: true,
});
export default MoneyFlow;