chore: remove obsolete Android app configuration files
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s
- Deleted build.gradle.kts, gradle.properties, and gradlew files as part of the cleanup process. - Removed local.properties and various generated files from the .gradle directory to streamline the project structure. - Cleared out unnecessary build artifacts and intermediate files to improve project maintainability.
This commit is contained in:
47
backend/models/BillingDocument.js
Normal file
47
backend/models/BillingDocument.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import { DataTypes } from 'sequelize';
|
||||
import sequelize from '../database.js';
|
||||
|
||||
const BillingDocument = sequelize.define('BillingDocument', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
allowNull: false
|
||||
},
|
||||
runId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
field: 'run_id'
|
||||
},
|
||||
displayName: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false,
|
||||
field: 'display_name'
|
||||
},
|
||||
status: {
|
||||
type: DataTypes.ENUM('draft', 'generated', 'error'),
|
||||
allowNull: false,
|
||||
defaultValue: 'draft'
|
||||
},
|
||||
pdfStoragePath: {
|
||||
type: DataTypes.STRING(1000),
|
||||
allowNull: true,
|
||||
field: 'pdf_storage_path'
|
||||
},
|
||||
pdfFilename: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true,
|
||||
field: 'pdf_filename'
|
||||
},
|
||||
errorMessage: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
field: 'error_message'
|
||||
}
|
||||
}, {
|
||||
tableName: 'billing_document',
|
||||
underscored: true,
|
||||
timestamps: true
|
||||
});
|
||||
|
||||
export default BillingDocument;
|
||||
37
backend/models/BillingDocumentValue.js
Normal file
37
backend/models/BillingDocumentValue.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import { DataTypes } from 'sequelize';
|
||||
import sequelize from '../database.js';
|
||||
|
||||
const BillingDocumentValue = sequelize.define('BillingDocumentValue', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
allowNull: false
|
||||
},
|
||||
billingDocumentId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
field: 'billing_document_id'
|
||||
},
|
||||
fieldKey: {
|
||||
type: DataTypes.STRING(120),
|
||||
allowNull: false,
|
||||
field: 'field_key'
|
||||
},
|
||||
resolvedValue: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
field: 'resolved_value'
|
||||
},
|
||||
resolvedSource: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true,
|
||||
field: 'resolved_source'
|
||||
}
|
||||
}, {
|
||||
tableName: 'billing_document_value',
|
||||
underscored: true,
|
||||
timestamps: false
|
||||
});
|
||||
|
||||
export default BillingDocumentValue;
|
||||
133
backend/models/BillingRun.js
Normal file
133
backend/models/BillingRun.js
Normal file
@@ -0,0 +1,133 @@
|
||||
import { DataTypes } from 'sequelize';
|
||||
import sequelize from '../database.js';
|
||||
|
||||
const BillingRun = sequelize.define('BillingRun', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
allowNull: false
|
||||
},
|
||||
clubId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
field: 'club_id'
|
||||
},
|
||||
templateId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
field: 'template_id'
|
||||
},
|
||||
name: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false
|
||||
},
|
||||
periodStart: {
|
||||
type: DataTypes.DATEONLY,
|
||||
allowNull: false,
|
||||
field: 'period_start'
|
||||
},
|
||||
periodEnd: {
|
||||
type: DataTypes.DATEONLY,
|
||||
allowNull: false,
|
||||
field: 'period_end'
|
||||
},
|
||||
selfRecipientUserId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
field: 'self_recipient_user_id'
|
||||
},
|
||||
selfRecipientName: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false,
|
||||
field: 'self_recipient_name'
|
||||
},
|
||||
hourlyRate: {
|
||||
type: DataTypes.DECIMAL(10, 2),
|
||||
allowNull: false,
|
||||
field: 'hourly_rate'
|
||||
},
|
||||
computedHoursTotal: {
|
||||
type: DataTypes.DECIMAL(10, 2),
|
||||
allowNull: false,
|
||||
defaultValue: 0,
|
||||
field: 'computed_hours_total'
|
||||
},
|
||||
iban: {
|
||||
type: DataTypes.STRING(64),
|
||||
allowNull: true
|
||||
},
|
||||
ibanWithoutCountry: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
field: 'iban_without_country'
|
||||
},
|
||||
sessionLabel: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true,
|
||||
field: 'session_label'
|
||||
},
|
||||
sameAccountCheckbox: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
field: 'same_account_checkbox'
|
||||
},
|
||||
omitSelfRecipientName: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
field: 'omit_self_recipient_name'
|
||||
},
|
||||
omitIban: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
field: 'omit_iban'
|
||||
},
|
||||
omitLocationText: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
field: 'omit_location_text'
|
||||
},
|
||||
omitDocumentDate: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
field: 'omit_document_date'
|
||||
},
|
||||
omitSessionLabel: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
field: 'omit_session_label'
|
||||
},
|
||||
locationText: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true,
|
||||
field: 'location_text'
|
||||
},
|
||||
documentDate: {
|
||||
type: DataTypes.DATEONLY,
|
||||
allowNull: true,
|
||||
field: 'document_date'
|
||||
},
|
||||
status: {
|
||||
type: DataTypes.ENUM('draft', 'generated', 'finalized', 'cancelled'),
|
||||
allowNull: false,
|
||||
defaultValue: 'draft'
|
||||
},
|
||||
createdByUserId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
field: 'created_by_user_id'
|
||||
}
|
||||
}, {
|
||||
tableName: 'billing_run',
|
||||
underscored: true,
|
||||
timestamps: true
|
||||
});
|
||||
|
||||
export default BillingRun;
|
||||
62
backend/models/BillingTemplate.js
Normal file
62
backend/models/BillingTemplate.js
Normal file
@@ -0,0 +1,62 @@
|
||||
import { DataTypes } from 'sequelize';
|
||||
import sequelize from '../database.js';
|
||||
|
||||
const BillingTemplate = sequelize.define('BillingTemplate', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
allowNull: false
|
||||
},
|
||||
clubId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
field: 'club_id'
|
||||
},
|
||||
name: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false
|
||||
},
|
||||
description: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true
|
||||
},
|
||||
pdfStoragePath: {
|
||||
type: DataTypes.STRING(1000),
|
||||
allowNull: false,
|
||||
field: 'pdf_storage_path'
|
||||
},
|
||||
pdfFilename: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false,
|
||||
field: 'pdf_filename'
|
||||
},
|
||||
pdfMimeType: {
|
||||
type: DataTypes.STRING(100),
|
||||
allowNull: false,
|
||||
defaultValue: 'application/pdf',
|
||||
field: 'pdf_mime_type'
|
||||
},
|
||||
isActive: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: true,
|
||||
field: 'is_active'
|
||||
},
|
||||
version: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
defaultValue: 1
|
||||
},
|
||||
createdByUserId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
field: 'created_by_user_id'
|
||||
}
|
||||
}, {
|
||||
tableName: 'billing_template',
|
||||
underscored: true,
|
||||
timestamps: true
|
||||
});
|
||||
|
||||
export default BillingTemplate;
|
||||
125
backend/models/BillingTemplateField.js
Normal file
125
backend/models/BillingTemplateField.js
Normal file
@@ -0,0 +1,125 @@
|
||||
import { DataTypes } from 'sequelize';
|
||||
import sequelize from '../database.js';
|
||||
|
||||
const BillingTemplateField = sequelize.define('BillingTemplateField', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
allowNull: false
|
||||
},
|
||||
templateId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
field: 'template_id'
|
||||
},
|
||||
fieldKey: {
|
||||
type: DataTypes.STRING(120),
|
||||
allowNull: false,
|
||||
field: 'field_key'
|
||||
},
|
||||
label: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false
|
||||
},
|
||||
fieldType: {
|
||||
type: DataTypes.ENUM('text', 'number', 'currency', 'date', 'checkbox', 'formula', 'table_row'),
|
||||
allowNull: false,
|
||||
field: 'field_type'
|
||||
},
|
||||
sourceType: {
|
||||
type: DataTypes.ENUM('manual', 'member', 'trainer', 'club', 'system', 'constant', 'formula'),
|
||||
allowNull: false,
|
||||
defaultValue: 'manual',
|
||||
field: 'source_type'
|
||||
},
|
||||
sourcePath: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true,
|
||||
field: 'source_path'
|
||||
},
|
||||
constantValue: {
|
||||
type: DataTypes.STRING(500),
|
||||
allowNull: true,
|
||||
field: 'constant_value'
|
||||
},
|
||||
formatter: {
|
||||
type: DataTypes.ENUM('none', 'iban_no_country', 'date_dd_mm_yyyy', 'currency_eur_2'),
|
||||
allowNull: false,
|
||||
defaultValue: 'none'
|
||||
},
|
||||
isRequired: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
field: 'is_required'
|
||||
},
|
||||
mappingMode: {
|
||||
type: DataTypes.ENUM('acroform', 'overlay'),
|
||||
allowNull: false,
|
||||
defaultValue: 'overlay',
|
||||
field: 'mapping_mode'
|
||||
},
|
||||
acroformFieldName: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true,
|
||||
field: 'acroform_field_name'
|
||||
},
|
||||
pageNumber: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
field: 'page_number'
|
||||
},
|
||||
x: {
|
||||
type: DataTypes.DECIMAL(10, 2),
|
||||
allowNull: true
|
||||
},
|
||||
y: {
|
||||
type: DataTypes.DECIMAL(10, 2),
|
||||
allowNull: true
|
||||
},
|
||||
width: {
|
||||
type: DataTypes.DECIMAL(10, 2),
|
||||
allowNull: true
|
||||
},
|
||||
height: {
|
||||
type: DataTypes.DECIMAL(10, 2),
|
||||
allowNull: true
|
||||
},
|
||||
fontSize: {
|
||||
type: DataTypes.DECIMAL(5, 2),
|
||||
allowNull: true,
|
||||
field: 'font_size'
|
||||
},
|
||||
align: {
|
||||
type: DataTypes.ENUM('left', 'center', 'right'),
|
||||
allowNull: true
|
||||
},
|
||||
formulaExpression: {
|
||||
type: DataTypes.STRING(1000),
|
||||
allowNull: true,
|
||||
field: 'formula_expression'
|
||||
},
|
||||
tableGroup: {
|
||||
type: DataTypes.STRING(100),
|
||||
allowNull: true,
|
||||
field: 'table_group'
|
||||
},
|
||||
rowIndex: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
field: 'row_index'
|
||||
},
|
||||
sortOrder: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
defaultValue: 0,
|
||||
field: 'sort_order'
|
||||
}
|
||||
}, {
|
||||
tableName: 'billing_template_field',
|
||||
underscored: true,
|
||||
timestamps: true
|
||||
});
|
||||
|
||||
export default BillingTemplateField;
|
||||
43
backend/models/BillingUserSetting.js
Normal file
43
backend/models/BillingUserSetting.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import { DataTypes } from 'sequelize';
|
||||
import sequelize from '../database.js';
|
||||
|
||||
const BillingUserSetting = sequelize.define('BillingUserSetting', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
allowNull: false
|
||||
},
|
||||
clubId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
field: 'club_id'
|
||||
},
|
||||
userId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
field: 'user_id'
|
||||
},
|
||||
lastHourlyRate: {
|
||||
type: DataTypes.DECIMAL(10, 2),
|
||||
allowNull: false,
|
||||
defaultValue: 0,
|
||||
field: 'last_hourly_rate'
|
||||
},
|
||||
lastSelfRecipientName: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true,
|
||||
field: 'last_self_recipient_name'
|
||||
},
|
||||
lastLocationText: {
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true,
|
||||
field: 'last_location_text'
|
||||
}
|
||||
}, {
|
||||
tableName: 'billing_user_setting',
|
||||
underscored: true,
|
||||
timestamps: true
|
||||
});
|
||||
|
||||
export default BillingUserSetting;
|
||||
@@ -58,6 +58,12 @@ import TrainingGroup from './TrainingGroup.js';
|
||||
import MemberTrainingGroup from './MemberTrainingGroup.js';
|
||||
import ClubDisabledPresetGroup from './ClubDisabledPresetGroup.js';
|
||||
import TrainingTime from './TrainingTime.js';
|
||||
import BillingTemplate from './BillingTemplate.js';
|
||||
import BillingTemplateField from './BillingTemplateField.js';
|
||||
import BillingRun from './BillingRun.js';
|
||||
import BillingDocument from './BillingDocument.js';
|
||||
import BillingDocumentValue from './BillingDocumentValue.js';
|
||||
import BillingUserSetting from './BillingUserSetting.js';
|
||||
// Official tournaments relations
|
||||
OfficialTournament.hasMany(OfficialCompetition, { foreignKey: 'tournamentId', as: 'competitions' });
|
||||
OfficialCompetition.belongsTo(OfficialTournament, { foreignKey: 'tournamentId', as: 'tournament' });
|
||||
@@ -399,6 +405,24 @@ ClubDisabledPresetGroup.belongsTo(Club, { foreignKey: 'clubId', as: 'club' });
|
||||
TrainingGroup.hasMany(TrainingTime, { foreignKey: 'trainingGroupId', as: 'trainingTimes' });
|
||||
TrainingTime.belongsTo(TrainingGroup, { foreignKey: 'trainingGroupId', as: 'trainingGroup' });
|
||||
|
||||
// Billing
|
||||
Club.hasMany(BillingTemplate, { foreignKey: 'clubId', as: 'billingTemplates' });
|
||||
BillingTemplate.belongsTo(Club, { foreignKey: 'clubId', as: 'club' });
|
||||
BillingTemplate.hasMany(BillingTemplateField, { foreignKey: 'templateId', as: 'fields' });
|
||||
BillingTemplateField.belongsTo(BillingTemplate, { foreignKey: 'templateId', as: 'template' });
|
||||
Club.hasMany(BillingRun, { foreignKey: 'clubId', as: 'billingRuns' });
|
||||
BillingRun.belongsTo(Club, { foreignKey: 'clubId', as: 'club' });
|
||||
BillingTemplate.hasMany(BillingRun, { foreignKey: 'templateId', as: 'runs' });
|
||||
BillingRun.belongsTo(BillingTemplate, { foreignKey: 'templateId', as: 'template' });
|
||||
BillingRun.hasMany(BillingDocument, { foreignKey: 'runId', as: 'documents' });
|
||||
BillingDocument.belongsTo(BillingRun, { foreignKey: 'runId', as: 'run' });
|
||||
BillingDocument.hasMany(BillingDocumentValue, { foreignKey: 'billingDocumentId', as: 'values' });
|
||||
BillingDocumentValue.belongsTo(BillingDocument, { foreignKey: 'billingDocumentId', as: 'document' });
|
||||
Club.hasMany(BillingUserSetting, { foreignKey: 'clubId', as: 'billingUserSettings' });
|
||||
BillingUserSetting.belongsTo(Club, { foreignKey: 'clubId', as: 'club' });
|
||||
User.hasMany(BillingUserSetting, { foreignKey: 'userId', as: 'billingUserSettings' });
|
||||
BillingUserSetting.belongsTo(User, { foreignKey: 'userId', as: 'user' });
|
||||
|
||||
export {
|
||||
User,
|
||||
Log,
|
||||
@@ -457,4 +481,10 @@ export {
|
||||
MemberTrainingGroup,
|
||||
ClubDisabledPresetGroup,
|
||||
TrainingTime,
|
||||
BillingTemplate,
|
||||
BillingTemplateField,
|
||||
BillingRun,
|
||||
BillingDocument,
|
||||
BillingDocumentValue,
|
||||
BillingUserSetting,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user