Falukant production, family and administration enhancements

This commit is contained in:
Torsten Schulz
2025-04-14 15:17:35 +02:00
parent 90b4f51dcb
commit b15d93a798
77 changed files with 2429 additions and 1093 deletions

View File

@@ -24,6 +24,11 @@ DayProduction.init({
type: DataTypes.DATE,
allowNull: false,
defaultValue: sequelize.literal('CURRENT_TIMESTAMP'),
},
productionDate: {
type: DataTypes.DATEONLY,
allowNull: false,
defaultValue: sequelize.literal('CURRENT_DATE'),
}
}, {
sequelize,
@@ -35,10 +40,9 @@ DayProduction.init({
indexes: [
{
unique: true,
fields: ['producer_id', 'product_id', 'region_id']
fields: ['producer_id', 'product_id', 'region_id', 'production_date']
}
]
});
export default DayProduction;

View File

@@ -0,0 +1,32 @@
import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';
class PromotionalGiftLog extends Model { };
PromotionalGiftLog.init({
senderCharacterId: {
type: DataTypes.INTEGER,
allowNull: false,
},
recipientCharacterId: {
type: DataTypes.INTEGER,
allowNull: false,
},
giftId: {
type: DataTypes.INTEGER,
allowNull: false,
},
changeValue: {
type: DataTypes.INTEGER,
allowNull: false,
},
}, {
sequelize,
modelName: 'PromotionalGiftLog',
tableName: 'promotional_gift',
schema: 'falukant_log',
timestamps: true,
underscored: true,
});
export default PromotionalGiftLog;