Director hiring added
This commit is contained in:
@@ -18,7 +18,7 @@ Branch.init({
|
||||
},
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'BranchType',
|
||||
modelName: 'Branch',
|
||||
tableName: 'branch',
|
||||
schema: 'falukant_data',
|
||||
timestamps: false,
|
||||
|
||||
48
backend/models/falukant/data/director.js
Normal file
48
backend/models/falukant/data/director.js
Normal file
@@ -0,0 +1,48 @@
|
||||
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,
|
||||
}
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'Director',
|
||||
tableName: 'director',
|
||||
schema: 'falukant_data',
|
||||
timestamps: false,
|
||||
underscored: true,
|
||||
});
|
||||
|
||||
export default Director;
|
||||
28
backend/models/falukant/data/director_proposal.js
Normal file
28
backend/models/falukant/data/director_proposal.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Model, DataTypes } from 'sequelize';
|
||||
import { sequelize } from '../../../utils/sequelize.js';
|
||||
|
||||
class DirectorProposal extends Model { }
|
||||
|
||||
DirectorProposal.init({
|
||||
directorCharacterId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
employerUserId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
proposedIncome: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'DirectorProposal',
|
||||
tableName: 'director_proposal',
|
||||
schema: 'falukant_data',
|
||||
timestamps: true,
|
||||
underscored: true,
|
||||
});
|
||||
|
||||
export default DirectorProposal;
|
||||
@@ -19,7 +19,7 @@ FalukantStock.init({
|
||||
},
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'StockType',
|
||||
modelName: 'StockData',
|
||||
tableName: 'stock',
|
||||
schema: 'falukant_data',
|
||||
timestamps: false,
|
||||
|
||||
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