Director hiring added
This commit is contained in:
45
backend/models/falukant/log/moneyflow.js
Normal file
45
backend/models/falukant/log/moneyflow.js
Normal 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;
|
||||
Reference in New Issue
Block a user