All checks were successful
Deploy to production / deploy (push) Successful in 1m54s
- Introduced a new boolean field `autoAdjustIncome` in the Director model to manage income adjustments automatically. - Updated the FalukantService to include `autoAdjustIncome` in director data responses and settings management. - Enhanced the DirectorInfo component to allow users to toggle the `autoAdjustIncome` setting. - Updated internationalization files to include translations for the new feature across multiple languages.
54 lines
1.3 KiB
JavaScript
54 lines
1.3 KiB
JavaScript
import { Model, DataTypes } from 'sequelize';
|
|
import { sequelize } from '../../../utils/sequelize.js';
|
|
|
|
class Director extends Model { }
|
|
|
|
Director.init({
|
|
directorCharacterId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false},
|
|
employerUserId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false},
|
|
income: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false},
|
|
satisfaction: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: 100},
|
|
mayProduce: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: true},
|
|
maySell: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: true},
|
|
mayStartTransport: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: true},
|
|
mayRepairVehicles: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: true},
|
|
autoAdjustIncome: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: false},
|
|
lastSalaryPayout: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: new Date(0)
|
|
}
|
|
}, {
|
|
sequelize,
|
|
modelName: 'Director',
|
|
tableName: 'director',
|
|
schema: 'falukant_data',
|
|
timestamps: false,
|
|
underscored: true});
|
|
|
|
export default Director;
|