Files
yourpart3/backend/models/falukant/data/candidate.js
Torsten Schulz (local) 1ab9407e79
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
2026-07-21 09:08:15 +02:00

26 lines
572 B
JavaScript
Executable File

// falukant/data/candidate.js
import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';
class Candidate extends Model {}
Candidate.init({
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true},
electionId: {
type: DataTypes.INTEGER,
allowNull: false},
characterId: {
type: DataTypes.INTEGER,
allowNull: false}}, {
sequelize,
modelName: 'Candidate',
tableName: 'candidate',
schema: 'falukant_data',
timestamps: true,
underscored: true});
export default Candidate;