v2026-10-12: campdescription added

This commit is contained in:
Jottyfan committed 2026-10-12 20:54:20 +02:00
1 parent da8e346ab8
commit c1c1275bdd
38 files changed
+637 -276

No files matched your search

@@ -5,6 +5,7 @@ package de.jottyfan.camporganizer.db.jooq;
import de.jottyfan.camporganizer.db.jooq.tables.TCamp;
import de.jottyfan.camporganizer.db.jooq.tables.TCampdescription;
import de.jottyfan.camporganizer.db.jooq.tables.TCampdocument;
import de.jottyfan.camporganizer.db.jooq.tables.TCampprofile;
import de.jottyfan.camporganizer.db.jooq.tables.TDocument;
@@ -24,6 +25,7 @@ import de.jottyfan.camporganizer.db.jooq.tables.TSlot;
import de.jottyfan.camporganizer.db.jooq.tables.TTask;
import de.jottyfan.camporganizer.db.jooq.tables.TTaskPerson;
import de.jottyfan.camporganizer.db.jooq.tables.records.TCampRecord;
import de.jottyfan.camporganizer.db.jooq.tables.records.TCampdescriptionRecord;
import de.jottyfan.camporganizer.db.jooq.tables.records.TCampdocumentRecord;
import de.jottyfan.camporganizer.db.jooq.tables.records.TCampprofileRecord;
import de.jottyfan.camporganizer.db.jooq.tables.records.TDocumentRecord;
@@ -63,8 +65,10 @@ public class Keys {
// -------------------------------------------------------------------------
public static final UniqueKey<TCampRecord> T_CAMP_PKEY = Internal.createUniqueKey(TCamp.T_CAMP, DSL.name("t_camp_pkey"), new TableField[] { TCamp.T_CAMP.PK }, true);
public static final UniqueKey<TCampdocumentRecord> T_CAMPDOCUMENT_FK_CAMP_FK_DOCUMENT_KEY = Internal.createUniqueKey(TCampdocument.T_CAMPDOCUMENT, DSL.name("t_campdocument_fk_camp_fk_document_key"), new TableField[] { TCampdocument.T_CAMPDOCUMENT.FK_CAMP, TCampdocument.T_CAMPDOCUMENT.FK_DOCUMENT }, true);
public static final UniqueKey<TCampdescriptionRecord> T_CAMPDESCRIPTION_PKEY = Internal.createUniqueKey(TCampdescription.T_CAMPDESCRIPTION, DSL.name("t_campdescription_pkey"), new TableField[] { TCampdescription.T_CAMPDESCRIPTION.PK_CAMPDESCRIPTION }, true);
public static final UniqueKey<TCampdescriptionRecord> T_CAMPDESCRIPTION_VALUE_KEY = Internal.createUniqueKey(TCampdescription.T_CAMPDESCRIPTION, DSL.name("t_campdescription_value_key"), new TableField[] { TCampdescription.T_CAMPDESCRIPTION.VALUE }, true);
public static final UniqueKey<TCampdocumentRecord> T_CAMPDOCUMENT_PKEY = Internal.createUniqueKey(TCampdocument.T_CAMPDOCUMENT, DSL.name("t_campdocument_pkey"), new TableField[] { TCampdocument.T_CAMPDOCUMENT.PK }, true);
public static final UniqueKey<TCampdocumentRecord> UK_CAMPDOCUMENT = Internal.createUniqueKey(TCampdocument.T_CAMPDOCUMENT, DSL.name("uk_campdocument"), new TableField[] { TCampdocument.T_CAMPDOCUMENT.FK_CAMP, TCampdocument.T_CAMPDOCUMENT.FK_DOCUMENT }, true);
public static final UniqueKey<TCampprofileRecord> T_CAMPPROFILE_FK_PROFILE_FK_CAMP_MODULE_KEY = Internal.createUniqueKey(TCampprofile.T_CAMPPROFILE, DSL.name("t_campprofile_fk_profile_fk_camp_module_key"), new TableField[] { TCampprofile.T_CAMPPROFILE.FK_PROFILE, TCampprofile.T_CAMPPROFILE.FK_CAMP, TCampprofile.T_CAMPPROFILE.MODULE }, true);
public static final UniqueKey<TCampprofileRecord> T_CAMPPROFILE_PKEY = Internal.createUniqueKey(TCampprofile.T_CAMPPROFILE, DSL.name("t_campprofile_pkey"), new TableField[] { TCampprofile.T_CAMPPROFILE.PK }, true);
public static final UniqueKey<TDocumentRecord> T_DOCUMENT_NAME_KEY = Internal.createUniqueKey(TDocument.T_DOCUMENT, DSL.name("t_document_name_key"), new TableField[] { TDocument.T_DOCUMENT.NAME }, true);
@@ -74,8 +78,8 @@ public class Keys {
public static final UniqueKey<TLessonRecord> T_LESSON_DAY_FK_SLOT_KEY = Internal.createUniqueKey(TLesson.T_LESSON, DSL.name("t_lesson_day_fk_slot_key"), new TableField[] { TLesson.T_LESSON.DAY, TLesson.T_LESSON.FK_SLOT }, true);
public static final UniqueKey<TLessonRecord> T_LESSON_PKEY = Internal.createUniqueKey(TLesson.T_LESSON, DSL.name("t_lesson_pkey"), new TableField[] { TLesson.T_LESSON.PK_LESSON }, true);
public static final UniqueKey<TLocationRecord> T_LOCATION_PKEY = Internal.createUniqueKey(TLocation.T_LOCATION, DSL.name("t_location_pkey"), new TableField[] { TLocation.T_LOCATION.PK }, true);
public static final UniqueKey<TPersonRecord> T_PERSON_FORENAME_SURNAME_BIRTHDATE_FK_CAMP_KEY = Internal.createUniqueKey(TPerson.T_PERSON, DSL.name("t_person_forename_surname_birthdate_fk_camp_key"), new TableField[] { TPerson.T_PERSON.FORENAME, TPerson.T_PERSON.SURNAME, TPerson.T_PERSON.BIRTHDATE, TPerson.T_PERSON.FK_CAMP }, true);
public static final UniqueKey<TPersonRecord> T_PERSON_PKEY = Internal.createUniqueKey(TPerson.T_PERSON, DSL.name("t_person_pkey"), new TableField[] { TPerson.T_PERSON.PK }, true);
public static final UniqueKey<TPersonRecord> UK_PERSON = Internal.createUniqueKey(TPerson.T_PERSON, DSL.name("uk_person"), new TableField[] { TPerson.T_PERSON.FORENAME, TPerson.T_PERSON.SURNAME, TPerson.T_PERSON.BIRTHDATE, TPerson.T_PERSON.FK_CAMP }, true);
public static final UniqueKey<TPersondocumentRecord> T_PERSONDOCUMENT_FK_PERSON_NAME_KEY = Internal.createUniqueKey(TPersondocument.T_PERSONDOCUMENT, DSL.name("t_persondocument_fk_person_name_key"), new TableField[] { TPersondocument.T_PERSONDOCUMENT.FK_PERSON, TPersondocument.T_PERSONDOCUMENT.NAME }, true);
public static final UniqueKey<TPersondocumentRecord> T_PERSONDOCUMENT_PKEY = Internal.createUniqueKey(TPersondocument.T_PERSONDOCUMENT, DSL.name("t_persondocument_pkey"), new TableField[] { TPersondocument.T_PERSONDOCUMENT.PK }, true);
public static final UniqueKey<TPlanRecord> T_PLAN_FK_CAMP_KEY = Internal.createUniqueKey(TPlan.T_PLAN, DSL.name("t_plan_fk_camp_key"), new TableField[] { TPlan.T_PLAN.FK_CAMP }, true);
@@ -96,6 +100,7 @@ public class Keys {
// FOREIGN KEY definitions
// -------------------------------------------------------------------------
public static final ForeignKey<TCampRecord, TCampdescriptionRecord> T_CAMP__T_CAMP_FK_CAMPDESCRIPTION_FKEY = Internal.createForeignKey(TCamp.T_CAMP, DSL.name("t_camp_fk_campdescription_fkey"), new TableField[] { TCamp.T_CAMP.FK_CAMPDESCRIPTION }, Keys.T_CAMPDESCRIPTION_PKEY, new TableField[] { TCampdescription.T_CAMPDESCRIPTION.PK_CAMPDESCRIPTION }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TCampRecord, TDocumentRecord> T_CAMP__T_CAMP_FK_DOCUMENT_FKEY = Internal.createForeignKey(TCamp.T_CAMP, DSL.name("t_camp_fk_document_fkey"), new TableField[] { TCamp.T_CAMP.FK_DOCUMENT }, Keys.T_DOCUMENT_PKEY, new TableField[] { TDocument.T_DOCUMENT.PK }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TCampRecord, TLocationRecord> T_CAMP__T_CAMP_FK_LOCATION_FKEY = Internal.createForeignKey(TCamp.T_CAMP, DSL.name("t_camp_fk_location_fkey"), new TableField[] { TCamp.T_CAMP.FK_LOCATION }, Keys.T_LOCATION_PKEY, new TableField[] { TLocation.T_LOCATION.PK }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TCampRecord, TProfileRecord> T_CAMP__T_CAMP_FK_PROFILE_FKEY = Internal.createForeignKey(TCamp.T_CAMP, DSL.name("t_camp_fk_profile_fkey"), new TableField[] { TCamp.T_CAMP.FK_PROFILE }, Keys.T_PROFILE_PKEY, new TableField[] { TProfile.T_PROFILE.PK }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
@@ -113,8 +118,6 @@ public class Keys {
public static final ForeignKey<TPlanRecord, TCampRecord> T_PLAN__T_PLAN_FK_CAMP_FKEY = Internal.createForeignKey(TPlan.T_PLAN, DSL.name("t_plan_fk_camp_fkey"), new TableField[] { TPlan.T_PLAN.FK_CAMP }, Keys.T_CAMP_PKEY, new TableField[] { TCamp.T_CAMP.PK }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TProfileroleRecord, TProfileRecord> T_PROFILEROLE__T_PROFILEROLE_FK_PROFILE_FKEY = Internal.createForeignKey(TProfilerole.T_PROFILEROLE, DSL.name("t_profilerole_fk_profile_fkey"), new TableField[] { TProfilerole.T_PROFILEROLE.FK_PROFILE }, Keys.T_PROFILE_PKEY, new TableField[] { TProfile.T_PROFILE.PK }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TSalesRecord, TCampRecord> T_SALES__T_SALES_FK_CAMP_FKEY = Internal.createForeignKey(TSales.T_SALES, DSL.name("t_sales_fk_camp_fkey"), new TableField[] { TSales.T_SALES.FK_CAMP }, Keys.T_CAMP_PKEY, new TableField[] { TCamp.T_CAMP.PK }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TSalescontentRecord, TSalesRecord> T_SALESCONTENT__T_SALESCONTENT_FK_SALES_FKEY = Internal.createForeignKey(TSalescontent.T_SALESCONTENT, DSL.name("t_salescontent_fk_sales_fkey"), new TableField[] { TSalescontent.T_SALESCONTENT.FK_SALES }, Keys.T_SALES_PKEY, new TableField[] { TSales.T_SALES.PK }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TSalescontentRecord, TSalescontenttypeRecord> T_SALESCONTENT__T_SALESCONTENT_FK_SALESCONTENTTYPE_FKEY = Internal.createForeignKey(TSalescontent.T_SALESCONTENT, DSL.name("t_salescontent_fk_salescontenttype_fkey"), new TableField[] { TSalescontent.T_SALESCONTENT.FK_SALESCONTENTTYPE }, Keys.T_SALESCONTENTTYPE_PKEY, new TableField[] { TSalescontenttype.T_SALESCONTENTTYPE.NAME }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TSlotRecord, TPlanRecord> T_SLOT__T_SLOT_FK_PLAN_FKEY = Internal.createForeignKey(TSlot.T_SLOT, DSL.name("t_slot_fk_plan_fkey"), new TableField[] { TSlot.T_SLOT.FK_PLAN }, Keys.T_PLAN_PKEY, new TableField[] { TPlan.T_PLAN.PK_PLAN }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TTaskRecord, TLessonRecord> T_TASK__T_TASK_FK_LESSON_FKEY = Internal.createForeignKey(TTask.T_TASK, DSL.name("t_task_fk_lesson_fkey"), new TableField[] { TTask.T_TASK.FK_LESSON }, Keys.T_LESSON_PKEY, new TableField[] { TLesson.T_LESSON.PK_LESSON }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
public static final ForeignKey<TTaskPersonRecord, TPersonRecord> T_TASK_PERSON__T_TASK_PERSON_FK_PERSON_FKEY = Internal.createForeignKey(TTaskPerson.T_TASK_PERSON, DSL.name("t_task_person_fk_person_fkey"), new TableField[] { TTaskPerson.T_TASK_PERSON.FK_PERSON }, Keys.T_PERSON_PKEY, new TableField[] { TPerson.T_PERSON.PK }, true, ForeignKeyRule.NO_ACTION, ForeignKeyRule.NO_ACTION);
@@ -5,6 +5,7 @@ package de.jottyfan.camporganizer.db.jooq;
import de.jottyfan.camporganizer.db.jooq.tables.TCamp;
import de.jottyfan.camporganizer.db.jooq.tables.TCampdescription;
import de.jottyfan.camporganizer.db.jooq.tables.TCampdocument;
import de.jottyfan.camporganizer.db.jooq.tables.TCampprofile;
import de.jottyfan.camporganizer.db.jooq.tables.TDocument;
@@ -66,6 +67,11 @@ public class Public extends SchemaImpl {
*/
public final TCamp T_CAMP = TCamp.T_CAMP;
/**
* The table <code>public.t_campdescription</code>.
*/
public final TCampdescription T_CAMPDESCRIPTION = TCampdescription.T_CAMPDESCRIPTION;
/**
* The table <code>public.t_campdocument</code>.
*/
@@ -248,6 +254,7 @@ public class Public extends SchemaImpl {
public final List<Table<?>> getTables() {
return Arrays.asList(
TCamp.T_CAMP,
TCampdescription.T_CAMPDESCRIPTION,
TCampdocument.T_CAMPDOCUMENT,
TCampprofile.T_CAMPPROFILE,
TDocument.T_DOCUMENT,
@@ -5,6 +5,7 @@ package de.jottyfan.camporganizer.db.jooq;
import de.jottyfan.camporganizer.db.jooq.tables.TCamp;
import de.jottyfan.camporganizer.db.jooq.tables.TCampdescription;
import de.jottyfan.camporganizer.db.jooq.tables.TCampdocument;
import de.jottyfan.camporganizer.db.jooq.tables.TCampprofile;
import de.jottyfan.camporganizer.db.jooq.tables.TDocument;
@@ -51,6 +52,11 @@ public class Tables {
*/
public static final TCamp T_CAMP = TCamp.T_CAMP;
/**
* The table <code>public.t_campdescription</code>.
*/
public static final TCampdescription T_CAMPDESCRIPTION = TCampdescription.T_CAMPDESCRIPTION;
/**
* The table <code>public.t_campdocument</code>.
*/
@@ -6,6 +6,7 @@ package de.jottyfan.camporganizer.db.jooq.tables;
import de.jottyfan.camporganizer.db.jooq.Keys;
import de.jottyfan.camporganizer.db.jooq.Public;
import de.jottyfan.camporganizer.db.jooq.tables.TCampdescription.TCampdescriptionPath;
import de.jottyfan.camporganizer.db.jooq.tables.TCampdocument.TCampdocumentPath;
import de.jottyfan.camporganizer.db.jooq.tables.TCampprofile.TCampprofilePath;
import de.jottyfan.camporganizer.db.jooq.tables.TDocument.TDocumentPath;
@@ -135,16 +136,16 @@ public class TCamp extends TableImpl<TCampRecord> {
*/
public final TableField<TCampRecord, Integer> BEDS_FEMALE = createField(DSL.name("beds_female"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.INTEGER)), this, "");
/**
* The column <code>public.t_camp.blocked_beds_female</code>.
*/
public final TableField<TCampRecord, Integer> BLOCKED_BEDS_FEMALE = createField(DSL.name("blocked_beds_female"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.INTEGER)), this, "");
/**
* The column <code>public.t_camp.blocked_beds_male</code>.
*/
public final TableField<TCampRecord, Integer> BLOCKED_BEDS_MALE = createField(DSL.name("blocked_beds_male"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.INTEGER)), this, "");
/**
* The column <code>public.t_camp.blocked_beds_female</code>.
*/
public final TableField<TCampRecord, Integer> BLOCKED_BEDS_FEMALE = createField(DSL.name("blocked_beds_female"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.INTEGER)), this, "");
/**
* The column <code>public.t_camp.start_booking</code>.
*/
@@ -155,6 +156,11 @@ public class TCamp extends TableImpl<TCampRecord> {
*/
public final TableField<TCampRecord, Integer> MIN_TEACHERAGE = createField(DSL.name("min_teacherage"), SQLDataType.INTEGER, this, "");
/**
* The column <code>public.t_camp.fk_campdescription</code>.
*/
public final TableField<TCampRecord, Integer> FK_CAMPDESCRIPTION = createField(DSL.name("fk_campdescription"), SQLDataType.INTEGER, this, "");
private TCamp(Name alias, Table<TCampRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}
@@ -234,7 +240,20 @@ public class TCamp extends TableImpl<TCampRecord> {
@Override
public List<ForeignKey<TCampRecord, ?>> getReferences() {
return Arrays.asList(Keys.T_CAMP__T_CAMP_FK_DOCUMENT_FKEY, Keys.T_CAMP__T_CAMP_FK_LOCATION_FKEY, Keys.T_CAMP__T_CAMP_FK_PROFILE_FKEY);
return Arrays.asList(Keys.T_CAMP__T_CAMP_FK_CAMPDESCRIPTION_FKEY, Keys.T_CAMP__T_CAMP_FK_DOCUMENT_FKEY, Keys.T_CAMP__T_CAMP_FK_LOCATION_FKEY, Keys.T_CAMP__T_CAMP_FK_PROFILE_FKEY);
}
private transient TCampdescriptionPath _tCampdescription;
/**
* Get the implicit join path to the <code>public.t_campdescription</code>
* table.
*/
public TCampdescriptionPath tCampdescription() {
if (_tCampdescription == null)
_tCampdescription = new TCampdescriptionPath(this, Keys.T_CAMP__T_CAMP_FK_CAMPDESCRIPTION_FKEY, null);
return _tCampdescription;
}
private transient TDocumentPath _tDocument;
@@ -0,0 +1,293 @@
/*
* This file is generated by jOOQ.
*/
package de.jottyfan.camporganizer.db.jooq.tables;
import de.jottyfan.camporganizer.db.jooq.Keys;
import de.jottyfan.camporganizer.db.jooq.Public;
import de.jottyfan.camporganizer.db.jooq.tables.TCamp.TCampPath;
import de.jottyfan.camporganizer.db.jooq.tables.records.TCampdescriptionRecord;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
import org.jooq.SQL;
import org.jooq.Schema;
import org.jooq.Select;
import org.jooq.Stringly;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
public class TCampdescription extends TableImpl<TCampdescriptionRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>public.t_campdescription</code>
*/
public static final TCampdescription T_CAMPDESCRIPTION = new TCampdescription();
/**
* The class holding records for this type
*/
@Override
public Class<TCampdescriptionRecord> getRecordType() {
return TCampdescriptionRecord.class;
}
/**
* The column <code>public.t_campdescription.created</code>.
*/
public final TableField<TCampdescriptionRecord, LocalDateTime> CREATED = createField(DSL.name("created"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("CURRENT_TIMESTAMP"), SQLDataType.LOCALDATETIME)), this, "");
/**
* The column <code>public.t_campdescription.pk_campdescription</code>.
*/
public final TableField<TCampdescriptionRecord, Integer> PK_CAMPDESCRIPTION = createField(DSL.name("pk_campdescription"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
/**
* The column <code>public.t_campdescription.value</code>.
*/
public final TableField<TCampdescriptionRecord, String> VALUE = createField(DSL.name("value"), SQLDataType.CLOB.nullable(false), this, "");
private TCampdescription(Name alias, Table<TCampdescriptionRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}
private TCampdescription(Name alias, Table<TCampdescriptionRecord> aliased, Field<?>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
}
/**
* Create an aliased <code>public.t_campdescription</code> table reference
*/
public TCampdescription(String alias) {
this(DSL.name(alias), T_CAMPDESCRIPTION);
}
/**
* Create an aliased <code>public.t_campdescription</code> table reference
*/
public TCampdescription(Name alias) {
this(alias, T_CAMPDESCRIPTION);
}
/**
* Create a <code>public.t_campdescription</code> table reference
*/
public TCampdescription() {
this(DSL.name("t_campdescription"), null);
}
public <O extends Record> TCampdescription(Table<O> path, ForeignKey<O, TCampdescriptionRecord> childPath, InverseForeignKey<O, TCampdescriptionRecord> parentPath) {
super(path, childPath, parentPath, T_CAMPDESCRIPTION);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class TCampdescriptionPath extends TCampdescription implements Path<TCampdescriptionRecord> {
private static final long serialVersionUID = 1L;
public <O extends Record> TCampdescriptionPath(Table<O> path, ForeignKey<O, TCampdescriptionRecord> childPath, InverseForeignKey<O, TCampdescriptionRecord> parentPath) {
super(path, childPath, parentPath);
}
private TCampdescriptionPath(Name alias, Table<TCampdescriptionRecord> aliased) {
super(alias, aliased);
}
@Override
public TCampdescriptionPath as(String alias) {
return new TCampdescriptionPath(DSL.name(alias), this);
}
@Override
public TCampdescriptionPath as(Name alias) {
return new TCampdescriptionPath(alias, this);
}
@Override
public TCampdescriptionPath as(Table<?> alias) {
return new TCampdescriptionPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : Public.PUBLIC;
}
@Override
public Identity<TCampdescriptionRecord, Integer> getIdentity() {
return (Identity<TCampdescriptionRecord, Integer>) super.getIdentity();
}
@Override
public UniqueKey<TCampdescriptionRecord> getPrimaryKey() {
return Keys.T_CAMPDESCRIPTION_PKEY;
}
@Override
public List<UniqueKey<TCampdescriptionRecord>> getUniqueKeys() {
return Arrays.asList(Keys.T_CAMPDESCRIPTION_VALUE_KEY);
}
private transient TCampPath _tCamp;
/**
* Get the implicit to-many join path to the <code>public.t_camp</code>
* table
*/
public TCampPath tCamp() {
if (_tCamp == null)
_tCamp = new TCampPath(this, null, Keys.T_CAMP__T_CAMP_FK_CAMPDESCRIPTION_FKEY.getInverseKey());
return _tCamp;
}
@Override
public TCampdescription as(String alias) {
return new TCampdescription(DSL.name(alias), this);
}
@Override
public TCampdescription as(Name alias) {
return new TCampdescription(alias, this);
}
@Override
public TCampdescription as(Table<?> alias) {
return new TCampdescription(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public TCampdescription rename(String name) {
return new TCampdescription(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public TCampdescription rename(Name name) {
return new TCampdescription(name, null);
}
/**
* Rename this table
*/
@Override
public TCampdescription rename(Table<?> name) {
return new TCampdescription(name.getQualifiedName(), null);
}
/**
* Create an inline derived table from this table
*/
@Override
public TCampdescription where(Condition condition) {
return new TCampdescription(getQualifiedName(), aliased() ? this : null, null, condition);
}
/**
* Create an inline derived table from this table
*/
@Override
public TCampdescription where(Collection<? extends Condition> conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public TCampdescription where(Condition... conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public TCampdescription where(Field<Boolean> condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public TCampdescription where(SQL condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public TCampdescription where(@Stringly.SQL String condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public TCampdescription where(@Stringly.SQL String condition, Object... binds) {
return where(DSL.condition(condition, binds));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public TCampdescription where(@Stringly.SQL String condition, QueryPart... parts) {
return where(DSL.condition(condition, parts));
}
/**
* Create an inline derived table from this table
*/
@Override
public TCampdescription whereExists(Select<?> select) {
return where(DSL.exists(select));
}
/**
* Create an inline derived table from this table
*/
@Override
public TCampdescription whereNotExists(Select<?> select) {
return where(DSL.notExists(select));
}
}
@@ -152,7 +152,7 @@ public class TCampdocument extends TableImpl<TCampdocumentRecord> {
@Override
public List<UniqueKey<TCampdocumentRecord>> getUniqueKeys() {
return Arrays.asList(Keys.T_CAMPDOCUMENT_FK_CAMP_FK_DOCUMENT_KEY);
return Arrays.asList(Keys.UK_CAMPDOCUMENT);
}
@Override
@@ -126,6 +126,11 @@ public class TPerson extends TableImpl<TPersonRecord> {
*/
public final TableField<TPersonRecord, Integer> FK_PROFILE = createField(DSL.name("fk_profile"), SQLDataType.INTEGER, this, "");
/**
* The column <code>public.t_person.accept</code>.
*/
public final TableField<TPersonRecord, Boolean> ACCEPT = createField(DSL.name("accept"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>public.t_person.created</code>.
*/
@@ -164,7 +169,7 @@ public class TPerson extends TableImpl<TPersonRecord> {
/**
* The column <code>public.t_person.progress</code>.
*/
public final TableField<TPersonRecord, EnumProgress> PROGRESS = createField(DSL.name("progress"), SQLDataType.VARCHAR.defaultValue(DSL.field(DSL.raw("'requested'::enum_progress"), SQLDataType.VARCHAR)).asEnumDataType(EnumProgress.class), this, "");
public final TableField<TPersonRecord, EnumProgress> PROGRESS = createField(DSL.name("progress"), SQLDataType.VARCHAR.defaultValue(DSL.field(DSL.raw("'requested'::public.enum_progress"), SQLDataType.VARCHAR)).asEnumDataType(EnumProgress.class), this, "");
private TPerson(Name alias, Table<TPersonRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
@@ -245,7 +250,7 @@ public class TPerson extends TableImpl<TPersonRecord> {
@Override
public List<UniqueKey<TPersonRecord>> getUniqueKeys() {
return Arrays.asList(Keys.T_PERSON_FORENAME_SURNAME_BIRTHDATE_FK_CAMP_KEY);
return Arrays.asList(Keys.UK_PERSON);
}
@Override
@@ -51,11 +51,6 @@ public class TRss extends TableImpl<TRssRecord> {
return TRssRecord.class;
}
/**
* The column <code>public.t_rss.pk</code>.
*/
public final TableField<TRssRecord, Integer> PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
/**
* The column <code>public.t_rss.msg</code>.
*/
@@ -71,6 +66,11 @@ public class TRss extends TableImpl<TRssRecord> {
*/
public final TableField<TRssRecord, String> RECIPIENT = createField(DSL.name("recipient"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.t_rss.pk</code>.
*/
public final TableField<TRssRecord, Integer> PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
private TRss(Name alias, Table<TRssRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}
@@ -7,8 +7,6 @@ package de.jottyfan.camporganizer.db.jooq.tables;
import de.jottyfan.camporganizer.db.jooq.Keys;
import de.jottyfan.camporganizer.db.jooq.Public;
import de.jottyfan.camporganizer.db.jooq.tables.TCamp.TCampPath;
import de.jottyfan.camporganizer.db.jooq.tables.TSalescontent.TSalescontentPath;
import de.jottyfan.camporganizer.db.jooq.tables.TSalescontenttype.TSalescontenttypePath;
import de.jottyfan.camporganizer.db.jooq.tables.records.TSalesRecord;
import java.math.BigDecimal;
@@ -210,27 +208,6 @@ public class TSales extends TableImpl<TSalesRecord> {
return _tCamp;
}
private transient TSalescontentPath _tSalescontent;
/**
* Get the implicit to-many join path to the
* <code>public.t_salescontent</code> table
*/
public TSalescontentPath tSalescontent() {
if (_tSalescontent == null)
_tSalescontent = new TSalescontentPath(this, null, Keys.T_SALESCONTENT__T_SALESCONTENT_FK_SALES_FKEY.getInverseKey());
return _tSalescontent;
}
/**
* Get the implicit many-to-many join path to the
* <code>public.t_salescontenttype</code> table
*/
public TSalescontenttypePath tSalescontenttype() {
return tSalescontent().tSalescontenttype();
}
@Override
public TSales as(String alias) {
return new TSales(DSL.name(alias), this);
@@ -6,8 +6,6 @@ package de.jottyfan.camporganizer.db.jooq.tables;
import de.jottyfan.camporganizer.db.jooq.Keys;
import de.jottyfan.camporganizer.db.jooq.Public;
import de.jottyfan.camporganizer.db.jooq.tables.TSales.TSalesPath;
import de.jottyfan.camporganizer.db.jooq.tables.TSalescontenttype.TSalescontenttypePath;
import de.jottyfan.camporganizer.db.jooq.tables.records.TSalescontentRecord;
import java.util.Arrays;
@@ -16,13 +14,9 @@ import java.util.List;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
import org.jooq.SQL;
import org.jooq.Schema;
import org.jooq.Select;
@@ -96,39 +90,6 @@ public class TSalescontent extends TableImpl<TSalescontentRecord> {
this(DSL.name("t_salescontent"), null);
}
public <O extends Record> TSalescontent(Table<O> path, ForeignKey<O, TSalescontentRecord> childPath, InverseForeignKey<O, TSalescontentRecord> parentPath) {
super(path, childPath, parentPath, T_SALESCONTENT);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class TSalescontentPath extends TSalescontent implements Path<TSalescontentRecord> {
private static final long serialVersionUID = 1L;
public <O extends Record> TSalescontentPath(Table<O> path, ForeignKey<O, TSalescontentRecord> childPath, InverseForeignKey<O, TSalescontentRecord> parentPath) {
super(path, childPath, parentPath);
}
private TSalescontentPath(Name alias, Table<TSalescontentRecord> aliased) {
super(alias, aliased);
}
@Override
public TSalescontentPath as(String alias) {
return new TSalescontentPath(DSL.name(alias), this);
}
@Override
public TSalescontentPath as(Name alias) {
return new TSalescontentPath(alias, this);
}
@Override
public TSalescontentPath as(Table<?> alias) {
return new TSalescontentPath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : Public.PUBLIC;
@@ -139,36 +100,6 @@ public class TSalescontent extends TableImpl<TSalescontentRecord> {
return Arrays.asList(Keys.T_SALESCONTENT_FK_SALES_FK_SALESCONTENTTYPE_KEY);
}
@Override
public List<ForeignKey<TSalescontentRecord, ?>> getReferences() {
return Arrays.asList(Keys.T_SALESCONTENT__T_SALESCONTENT_FK_SALES_FKEY, Keys.T_SALESCONTENT__T_SALESCONTENT_FK_SALESCONTENTTYPE_FKEY);
}
private transient TSalesPath _tSales;
/**
* Get the implicit join path to the <code>public.t_sales</code> table.
*/
public TSalesPath tSales() {
if (_tSales == null)
_tSales = new TSalesPath(this, Keys.T_SALESCONTENT__T_SALESCONTENT_FK_SALES_FKEY, null);
return _tSales;
}
private transient TSalescontenttypePath _tSalescontenttype;
/**
* Get the implicit join path to the <code>public.t_salescontenttype</code>
* table.
*/
public TSalescontenttypePath tSalescontenttype() {
if (_tSalescontenttype == null)
_tSalescontenttype = new TSalescontenttypePath(this, Keys.T_SALESCONTENT__T_SALESCONTENT_FK_SALESCONTENTTYPE_FKEY, null);
return _tSalescontenttype;
}
@Override
public TSalescontent as(String alias) {
return new TSalescontent(DSL.name(alias), this);
@@ -6,21 +6,15 @@ package de.jottyfan.camporganizer.db.jooq.tables;
import de.jottyfan.camporganizer.db.jooq.Keys;
import de.jottyfan.camporganizer.db.jooq.Public;
import de.jottyfan.camporganizer.db.jooq.tables.TSales.TSalesPath;
import de.jottyfan.camporganizer.db.jooq.tables.TSalescontent.TSalescontentPath;
import de.jottyfan.camporganizer.db.jooq.tables.records.TSalescontenttypeRecord;
import java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
import org.jooq.SQL;
import org.jooq.Schema;
import org.jooq.Select;
@@ -89,39 +83,6 @@ public class TSalescontenttype extends TableImpl<TSalescontenttypeRecord> {
this(DSL.name("t_salescontenttype"), null);
}
public <O extends Record> TSalescontenttype(Table<O> path, ForeignKey<O, TSalescontenttypeRecord> childPath, InverseForeignKey<O, TSalescontenttypeRecord> parentPath) {
super(path, childPath, parentPath, T_SALESCONTENTTYPE);
}
/**
* A subtype implementing {@link Path} for simplified path-based joins.
*/
public static class TSalescontenttypePath extends TSalescontenttype implements Path<TSalescontenttypeRecord> {
private static final long serialVersionUID = 1L;
public <O extends Record> TSalescontenttypePath(Table<O> path, ForeignKey<O, TSalescontenttypeRecord> childPath, InverseForeignKey<O, TSalescontenttypeRecord> parentPath) {
super(path, childPath, parentPath);
}
private TSalescontenttypePath(Name alias, Table<TSalescontenttypeRecord> aliased) {
super(alias, aliased);
}
@Override
public TSalescontenttypePath as(String alias) {
return new TSalescontenttypePath(DSL.name(alias), this);
}
@Override
public TSalescontenttypePath as(Name alias) {
return new TSalescontenttypePath(alias, this);
}
@Override
public TSalescontenttypePath as(Table<?> alias) {
return new TSalescontenttypePath(alias.getQualifiedName(), this);
}
}
@Override
public Schema getSchema() {
return aliased() ? null : Public.PUBLIC;
@@ -132,27 +93,6 @@ public class TSalescontenttype extends TableImpl<TSalescontenttypeRecord> {
return Keys.T_SALESCONTENTTYPE_PKEY;
}
private transient TSalescontentPath _tSalescontent;
/**
* Get the implicit to-many join path to the
* <code>public.t_salescontent</code> table
*/
public TSalescontentPath tSalescontent() {
if (_tSalescontent == null)
_tSalescontent = new TSalescontentPath(this, null, Keys.T_SALESCONTENT__T_SALESCONTENT_FK_SALESCONTENTTYPE_FKEY.getInverseKey());
return _tSalescontent;
}
/**
* Get the implicit many-to-many join path to the
* <code>public.t_sales</code> table
*/
public TSalesPath tSales() {
return tSalescontent().tSales();
}
@Override
public TSalescontenttype as(String alias) {
return new TSalescontenttype(DSL.name(alias), this);
@@ -85,7 +85,7 @@ public class VAdult extends TableImpl<VAdultRecord> {
surname,
camprole,
(age((birthdate)::timestamp with time zone) > '18 years'::interval) AS adult
FROM t_person;
FROM public.t_person;
"""), where);
}
@@ -84,7 +84,7 @@ public class VBudget extends TableImpl<VBudgetRecord> {
name,
location,
year
FROM v_sales
FROM public.v_sales
GROUP BY fk_camp, name, location, year;
"""), where);
}
@@ -158,6 +158,11 @@ public class VCamp extends TableImpl<VCampRecord> {
*/
public final TableField<VCampRecord, Boolean> BOOKING_HAS_STARTED = createField(DSL.name("booking_has_started"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>public.v_camp.campdescription</code>.
*/
public final TableField<VCampRecord, String> CAMPDESCRIPTION = createField(DSL.name("campdescription"), SQLDataType.CLOB, this, "");
private VCamp(Name alias, Table<VCampRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}
@@ -167,14 +172,14 @@ public class VCamp extends TableImpl<VCampRecord> {
CREATE VIEW "v_camp" AS WITH female(used, fk_camp) AS (
SELECT count(1) AS count,
t_person.fk_camp
FROM t_person
WHERE ((t_person.progress = 'approved'::enum_progress) AND (t_person.sex = 'female'::enum_sex) AND (t_person.camprole = 'student'::enum_camprole))
FROM public.t_person
WHERE ((t_person.progress = 'approved'::public.enum_progress) AND (t_person.sex = 'female'::public.enum_sex) AND (t_person.camprole = 'student'::public.enum_camprole))
GROUP BY t_person.fk_camp
), male(used, fk_camp) AS (
SELECT count(1) AS count,
t_person.fk_camp
FROM t_person
WHERE ((t_person.progress = 'approved'::enum_progress) AND (t_person.sex = 'male'::enum_sex) AND (t_person.camprole = 'student'::enum_camprole))
FROM public.t_person
WHERE ((t_person.progress = 'approved'::public.enum_progress) AND (t_person.sex = 'male'::public.enum_sex) AND (t_person.camprole = 'student'::public.enum_camprole))
GROUP BY t_person.fk_camp
)
SELECT c.pk,
@@ -198,9 +203,11 @@ public class VCamp extends TableImpl<VCampRecord> {
COALESCE(male.used, (0)::bigint) AS used_beds_male,
COALESCE(female.used, (0)::bigint) AS used_beds_female,
c.start_booking,
(c.start_booking < now()) AS booking_has_started
FROM (((t_camp c
LEFT JOIN t_location l ON ((c.fk_location = l.pk)))
(c.start_booking < now()) AS booking_has_started,
cd.value AS campdescription
FROM ((((public.t_camp c
LEFT JOIN public.t_campdescription cd ON ((cd.pk_campdescription = c.fk_campdescription)))
LEFT JOIN public.t_location l ON ((c.fk_location = l.pk)))
LEFT JOIN male ON ((male.fk_camp = c.pk)))
LEFT JOIN female ON ((female.fk_camp = c.pk)));
"""), where);
@@ -77,18 +77,18 @@ public class VCampBudget extends TableImpl<VCampBudgetRecord> {
CREATE VIEW "v_camp_budget" AS WITH x(money, camp) AS (
SELECT COALESCE(t_person.paid, 0.0) AS cash,
t_person.fk_camp
FROM t_person
FROM public.t_person
UNION ALL
SELECT (t_sales.cash * ('-1'::integer)::numeric),
t_sales.fk_camp
FROM t_sales
FROM public.t_sales
)
SELECT sum(x.money) AS budget,
c.pk AS fk_camp,
c.name AS camp_name,
date_part('year'::text, c.arrive) AS year
FROM (x
LEFT JOIN t_camp c ON ((c.pk = x.camp)))
LEFT JOIN public.t_camp c ON ((c.pk = x.camp)))
GROUP BY c.pk, c.name, c.arrive
ORDER BY c.arrive;
"""), where);
@@ -66,7 +66,7 @@ public class VCampBudgetYear extends TableImpl<VCampBudgetYearRecord> {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
CREATE VIEW "v_camp_budget_year" AS SELECT sum(budget) AS sum,
year
FROM v_camp_budget
FROM public.v_camp_budget
GROUP BY year
ORDER BY year;
"""), where);
@@ -104,9 +104,9 @@ public class VCampdocument extends TableImpl<VCampdocumentRecord> {
d.name AS documentname,
d.doctype,
d.filetype
FROM ((t_campdocument cd
LEFT JOIN t_camp c ON ((c.pk = cd.fk_camp)))
LEFT JOIN t_document d ON ((d.pk = cd.fk_document)));
FROM ((public.t_campdocument cd
LEFT JOIN public.t_camp c ON ((c.pk = cd.fk_camp)))
LEFT JOIN public.t_document d ON ((d.pk = cd.fk_document)));
"""), where);
}
@@ -59,7 +59,7 @@ public class VCamprole extends TableImpl<VCamproleRecord> {
private VCamprole(Name alias, Table<VCamproleRecord> aliased, Field<?>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
CREATE VIEW "v_camprole" AS SELECT unnest(enum_range(NULL::enum_camprole)) AS name;
CREATE VIEW "v_camprole" AS SELECT unnest(enum_range(NULL::public.enum_camprole)) AS name;
"""), where);
}
@@ -91,8 +91,8 @@ public class VDocument extends TableImpl<VDocumentRecord> {
d.document,
d.filetype,
string_agg((r.camprole)::text, ','::text) AS roles
FROM (t_document d
LEFT JOIN t_documentrole r ON ((r.fk_document = d.pk)))
FROM (public.t_document d
LEFT JOIN public.t_documentrole r ON ((r.fk_document = d.pk)))
GROUP BY d.pk, d.doctype, d.name, d.document, d.filetype;
"""), where);
}
@@ -109,8 +109,8 @@ public class VDsgvoDeleteCandidate extends TableImpl<VDsgvoDeleteCandidateRecord
c.name,
c.year,
c.is_over
FROM (t_person p
LEFT JOIN v_camp c ON ((c.pk = p.fk_camp)))
FROM (public.t_person p
LEFT JOIN public.v_camp c ON ((c.pk = p.fk_camp)))
WHERE (age((p.birthdate)::timestamp with time zone) > '21 years'::interval);
"""), where);
}
@@ -121,9 +121,9 @@ public class VFeeder extends TableImpl<VFeederRecord> {
t_person.sex,
c.name,
date_part('year'::text, c.arrive) AS year
FROM (t_person
LEFT JOIN t_camp c ON ((c.pk = t_person.fk_camp)))
WHERE (t_person.camprole = 'feeder'::enum_camprole);
FROM (public.t_person
LEFT JOIN public.t_camp c ON ((c.pk = t_person.fk_camp)))
WHERE (t_person.camprole = 'feeder'::public.enum_camprole);
"""), where);
}
@@ -96,8 +96,8 @@ public class VProfile extends TableImpl<VProfileRecord> {
t_profile.password,
t_profile.uuid,
array_agg(t_profilerole.role) AS roles
FROM (t_profile
LEFT JOIN t_profilerole ON ((t_profilerole.fk_profile = t_profile.pk)))
FROM (public.t_profile
LEFT JOIN public.t_profilerole ON ((t_profilerole.fk_profile = t_profile.pk)))
WHERE (t_profile.duedate > now())
GROUP BY t_profile.pk, t_profile.forename, t_profile.surname, t_profile.username, t_profile.password;
"""), where);
@@ -110,19 +110,19 @@ public class VRegistration extends TableImpl<VRegistrationRecord> {
private VRegistration(Name alias, Table<VRegistrationRecord> aliased, Field<?>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
CREATE VIEW "v_registration" AS SELECT p.pk,
p.forename,
p.surname,
p.street,
p.zip,
p.city,
p.phone,
p.birthdate,
p.camprole,
p.email,
(c.name || date_part('isoyear'::text, c.arrive)) AS campname
FROM (t_person p
LEFT JOIN t_camp c ON ((c.pk = p.fk_camp)));
CREATE VIEW "v_registration" AS SELECT t_person.pk,
t_person.forename,
t_person.surname,
t_person.street,
t_person.zip,
t_person.city,
t_person.phone,
t_person.birthdate,
t_person.camprole,
t_person.email,
(t_camp.name || date_part('isoyear'::text, t_camp.arrive)) AS campname
FROM (public.t_person
LEFT JOIN public.t_camp ON ((t_camp.pk = t_person.fk_camp)));
"""), where);
}
@@ -59,7 +59,7 @@ public class VRole extends TableImpl<VRoleRecord> {
private VRole(Name alias, Table<VRoleRecord> aliased, Field<?>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
CREATE VIEW "v_role" AS SELECT unnest(enum_range(NULL::enum_role)) AS unnest;
CREATE VIEW "v_role" AS SELECT unnest(enum_range(NULL::public.enum_role)) AS unnest;
"""), where);
}
@@ -151,10 +151,10 @@ public class VSales extends TableImpl<VSalesRecord> {
s.recipeshot,
s.recipenote,
array_agg(t.fk_salescontenttype) AS content
FROM (((t_sales s
LEFT JOIN t_camp c ON ((c.pk = s.fk_camp)))
LEFT JOIN t_location l ON ((l.pk = c.fk_location)))
LEFT JOIN t_salescontent t ON ((t.fk_sales = s.pk)))
FROM (((public.t_sales s
LEFT JOIN public.t_camp c ON ((c.pk = s.fk_camp)))
LEFT JOIN public.t_location l ON ((l.pk = c.fk_location)))
LEFT JOIN public.t_salescontent t ON ((t.fk_sales = s.pk)))
GROUP BY s.pk, s.trader, c.pk, c.name, l.pk, l.name, s.incredients, (date_part('isoyear'::text, c.arrive)), s.provider, s.cash, s.buydate, s.recipenumber, s.recipeshot;
"""), where);
}
@@ -58,7 +58,7 @@ public class VVersion extends TableImpl<VVersionRecord> {
private VVersion(Name alias, Table<VVersionRecord> aliased, Field<?>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
CREATE VIEW "v_version" AS SELECT '2026-04-15'::text AS version;
CREATE VIEW "v_version" AS SELECT '2026-10-12'::text AS version;
"""), where);
}
@@ -216,31 +216,31 @@ public class TCampRecord extends UpdatableRecordImpl<TCampRecord> {
return (Integer) get(13);
}
/**
* Setter for <code>public.t_camp.blocked_beds_female</code>.
*/
public void setBlockedBedsFemale(Integer value) {
set(14, value);
}
/**
* Getter for <code>public.t_camp.blocked_beds_female</code>.
*/
public Integer getBlockedBedsFemale() {
return (Integer) get(14);
}
/**
* Setter for <code>public.t_camp.blocked_beds_male</code>.
*/
public void setBlockedBedsMale(Integer value) {
set(15, value);
set(14, value);
}
/**
* Getter for <code>public.t_camp.blocked_beds_male</code>.
*/
public Integer getBlockedBedsMale() {
return (Integer) get(14);
}
/**
* Setter for <code>public.t_camp.blocked_beds_female</code>.
*/
public void setBlockedBedsFemale(Integer value) {
set(15, value);
}
/**
* Getter for <code>public.t_camp.blocked_beds_female</code>.
*/
public Integer getBlockedBedsFemale() {
return (Integer) get(15);
}
@@ -272,6 +272,20 @@ public class TCampRecord extends UpdatableRecordImpl<TCampRecord> {
return (Integer) get(17);
}
/**
* Setter for <code>public.t_camp.fk_campdescription</code>.
*/
public void setFkCampdescription(Integer value) {
set(18, value);
}
/**
* Getter for <code>public.t_camp.fk_campdescription</code>.
*/
public Integer getFkCampdescription() {
return (Integer) get(18);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@@ -295,7 +309,7 @@ public class TCampRecord extends UpdatableRecordImpl<TCampRecord> {
/**
* Create a detached, initialised TCampRecord
*/
public TCampRecord(Integer pk, String name, LocalDateTime arrive, LocalDateTime depart, Integer fkLocation, Integer minAge, Integer maxAge, String price, String countries, Integer fkDocument, Boolean lockSales, Integer fkProfile, Integer bedsMale, Integer bedsFemale, Integer blockedBedsFemale, Integer blockedBedsMale, LocalDateTime startBooking, Integer minTeacherage) {
public TCampRecord(Integer pk, String name, LocalDateTime arrive, LocalDateTime depart, Integer fkLocation, Integer minAge, Integer maxAge, String price, String countries, Integer fkDocument, Boolean lockSales, Integer fkProfile, Integer bedsMale, Integer bedsFemale, Integer blockedBedsMale, Integer blockedBedsFemale, LocalDateTime startBooking, Integer minTeacherage, Integer fkCampdescription) {
super(TCamp.T_CAMP);
setPk(pk);
@@ -312,10 +326,11 @@ public class TCampRecord extends UpdatableRecordImpl<TCampRecord> {
setFkProfile(fkProfile);
setBedsMale(bedsMale);
setBedsFemale(bedsFemale);
setBlockedBedsFemale(blockedBedsFemale);
setBlockedBedsMale(blockedBedsMale);
setBlockedBedsFemale(blockedBedsFemale);
setStartBooking(startBooking);
setMinTeacherage(minTeacherage);
setFkCampdescription(fkCampdescription);
resetTouchedOnNotNull();
}
}
@@ -0,0 +1,96 @@
/*
* This file is generated by jOOQ.
*/
package de.jottyfan.camporganizer.db.jooq.tables.records;
import de.jottyfan.camporganizer.db.jooq.tables.TCampdescription;
import java.time.LocalDateTime;
import org.jooq.Record1;
import org.jooq.impl.UpdatableRecordImpl;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
public class TCampdescriptionRecord extends UpdatableRecordImpl<TCampdescriptionRecord> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>public.t_campdescription.created</code>.
*/
public void setCreated(LocalDateTime value) {
set(0, value);
}
/**
* Getter for <code>public.t_campdescription.created</code>.
*/
public LocalDateTime getCreated() {
return (LocalDateTime) get(0);
}
/**
* Setter for <code>public.t_campdescription.pk_campdescription</code>.
*/
public void setPkCampdescription(Integer value) {
set(1, value);
}
/**
* Getter for <code>public.t_campdescription.pk_campdescription</code>.
*/
public Integer getPkCampdescription() {
return (Integer) get(1);
}
/**
* Setter for <code>public.t_campdescription.value</code>.
*/
public void setValue(String value) {
set(2, value);
}
/**
* Getter for <code>public.t_campdescription.value</code>.
*/
public String getValue() {
return (String) get(2);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@Override
public Record1<Integer> key() {
return (Record1) super.key();
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached TCampdescriptionRecord
*/
public TCampdescriptionRecord() {
super(TCampdescription.T_CAMPDESCRIPTION);
}
/**
* Create a detached, initialised TCampdescriptionRecord
*/
public TCampdescriptionRecord(LocalDateTime created, Integer pkCampdescription, String value) {
super(TCampdescription.T_CAMPDESCRIPTION);
setCreated(created);
setPkCampdescription(pkCampdescription);
setValue(value);
resetTouchedOnNotNull();
}
}
@@ -193,116 +193,130 @@ public class TPersonRecord extends UpdatableRecordImpl<TPersonRecord> {
return (Integer) get(11);
}
/**
* Setter for <code>public.t_person.accept</code>.
*/
public void setAccept(Boolean value) {
set(12, value);
}
/**
* Getter for <code>public.t_person.accept</code>.
*/
public Boolean getAccept() {
return (Boolean) get(12);
}
/**
* Setter for <code>public.t_person.created</code>.
*/
public void setCreated(LocalDateTime value) {
set(12, value);
set(13, value);
}
/**
* Getter for <code>public.t_person.created</code>.
*/
public LocalDateTime getCreated() {
return (LocalDateTime) get(12);
return (LocalDateTime) get(13);
}
/**
* Setter for <code>public.t_person.sex</code>.
*/
public void setSex(EnumSex value) {
set(13, value);
set(14, value);
}
/**
* Getter for <code>public.t_person.sex</code>.
*/
public EnumSex getSex() {
return (EnumSex) get(13);
return (EnumSex) get(14);
}
/**
* Setter for <code>public.t_person.fk_registrator</code>.
*/
public void setFkRegistrator(Integer value) {
set(14, value);
set(15, value);
}
/**
* Getter for <code>public.t_person.fk_registrator</code>.
*/
public Integer getFkRegistrator() {
return (Integer) get(14);
return (Integer) get(15);
}
/**
* Setter for <code>public.t_person.paid</code>.
*/
public void setPaid(BigDecimal value) {
set(15, value);
set(16, value);
}
/**
* Getter for <code>public.t_person.paid</code>.
*/
public BigDecimal getPaid() {
return (BigDecimal) get(15);
return (BigDecimal) get(16);
}
/**
* Setter for <code>public.t_person.comment</code>.
*/
public void setComment(String value) {
set(16, value);
set(17, value);
}
/**
* Getter for <code>public.t_person.comment</code>.
*/
public String getComment() {
return (String) get(16);
return (String) get(17);
}
/**
* Setter for <code>public.t_person.consent_catalog_photo</code>.
*/
public void setConsentCatalogPhoto(Boolean value) {
set(17, value);
set(18, value);
}
/**
* Getter for <code>public.t_person.consent_catalog_photo</code>.
*/
public Boolean getConsentCatalogPhoto() {
return (Boolean) get(17);
return (Boolean) get(18);
}
/**
* Setter for <code>public.t_person.required_price</code>.
*/
public void setRequiredPrice(BigDecimal value) {
set(18, value);
set(19, value);
}
/**
* Getter for <code>public.t_person.required_price</code>.
*/
public BigDecimal getRequiredPrice() {
return (BigDecimal) get(18);
return (BigDecimal) get(19);
}
/**
* Setter for <code>public.t_person.progress</code>.
*/
public void setProgress(EnumProgress value) {
set(19, value);
set(20, value);
}
/**
* Getter for <code>public.t_person.progress</code>.
*/
public EnumProgress getProgress() {
return (EnumProgress) get(19);
return (EnumProgress) get(20);
}
// -------------------------------------------------------------------------
@@ -328,7 +342,7 @@ public class TPersonRecord extends UpdatableRecordImpl<TPersonRecord> {
/**
* Create a detached, initialised TPersonRecord
*/
public TPersonRecord(Integer pk, String forename, String surname, String street, String zip, String city, String phone, LocalDate birthdate, EnumCamprole camprole, String email, Integer fkCamp, Integer fkProfile, LocalDateTime created, EnumSex sex, Integer fkRegistrator, BigDecimal paid, String comment, Boolean consentCatalogPhoto, BigDecimal requiredPrice, EnumProgress progress) {
public TPersonRecord(Integer pk, String forename, String surname, String street, String zip, String city, String phone, LocalDate birthdate, EnumCamprole camprole, String email, Integer fkCamp, Integer fkProfile, Boolean accept, LocalDateTime created, EnumSex sex, Integer fkRegistrator, BigDecimal paid, String comment, Boolean consentCatalogPhoto, BigDecimal requiredPrice, EnumProgress progress) {
super(TPerson.T_PERSON);
setPk(pk);
@@ -343,6 +357,7 @@ public class TPersonRecord extends UpdatableRecordImpl<TPersonRecord> {
setEmail(email);
setFkCamp(fkCamp);
setFkProfile(fkProfile);
setAccept(accept);
setCreated(created);
setSex(sex);
setFkRegistrator(fkRegistrator);
@@ -20,60 +20,60 @@ public class TRssRecord extends UpdatableRecordImpl<TRssRecord> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>public.t_rss.pk</code>.
*/
public void setPk(Integer value) {
set(0, value);
}
/**
* Getter for <code>public.t_rss.pk</code>.
*/
public Integer getPk() {
return (Integer) get(0);
}
/**
* Setter for <code>public.t_rss.msg</code>.
*/
public void setMsg(String value) {
set(1, value);
set(0, value);
}
/**
* Getter for <code>public.t_rss.msg</code>.
*/
public String getMsg() {
return (String) get(1);
return (String) get(0);
}
/**
* Setter for <code>public.t_rss.regdate</code>.
*/
public void setRegdate(LocalDateTime value) {
set(2, value);
set(1, value);
}
/**
* Getter for <code>public.t_rss.regdate</code>.
*/
public LocalDateTime getRegdate() {
return (LocalDateTime) get(2);
return (LocalDateTime) get(1);
}
/**
* Setter for <code>public.t_rss.recipient</code>.
*/
public void setRecipient(String value) {
set(3, value);
set(2, value);
}
/**
* Getter for <code>public.t_rss.recipient</code>.
*/
public String getRecipient() {
return (String) get(3);
return (String) get(2);
}
/**
* Setter for <code>public.t_rss.pk</code>.
*/
public void setPk(Integer value) {
set(3, value);
}
/**
* Getter for <code>public.t_rss.pk</code>.
*/
public Integer getPk() {
return (Integer) get(3);
}
// -------------------------------------------------------------------------
@@ -99,13 +99,13 @@ public class TRssRecord extends UpdatableRecordImpl<TRssRecord> {
/**
* Create a detached, initialised TRssRecord
*/
public TRssRecord(Integer pk, String msg, LocalDateTime regdate, String recipient) {
public TRssRecord(String msg, LocalDateTime regdate, String recipient, Integer pk) {
super(TRss.T_RSS);
setPk(pk);
setMsg(msg);
setRegdate(regdate);
setRecipient(recipient);
setPk(pk);
resetTouchedOnNotNull();
}
}
@@ -327,6 +327,20 @@ public class VCampRecord extends TableRecordImpl<VCampRecord> {
return (Boolean) get(21);
}
/**
* Setter for <code>public.v_camp.campdescription</code>.
*/
public void setCampdescription(String value) {
set(22, value);
}
/**
* Getter for <code>public.v_camp.campdescription</code>.
*/
public String getCampdescription() {
return (String) get(22);
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
@@ -341,7 +355,7 @@ public class VCampRecord extends TableRecordImpl<VCampRecord> {
/**
* Create a detached, initialised VCampRecord
*/
public VCampRecord(Integer pk, Boolean isOver, String name, LocalDateTime arrive, LocalDateTime depart, Double year, String locationName, Integer minAge, Integer maxAge, Integer minTeacherage, String url, String price, String countries, Integer fkDocument, Integer bedsFemale, Integer bedsMale, Integer blockedBedsFemale, Integer blockedBedsMale, Long usedBedsMale, Long usedBedsFemale, LocalDateTime startBooking, Boolean bookingHasStarted) {
public VCampRecord(Integer pk, Boolean isOver, String name, LocalDateTime arrive, LocalDateTime depart, Double year, String locationName, Integer minAge, Integer maxAge, Integer minTeacherage, String url, String price, String countries, Integer fkDocument, Integer bedsFemale, Integer bedsMale, Integer blockedBedsFemale, Integer blockedBedsMale, Long usedBedsMale, Long usedBedsFemale, LocalDateTime startBooking, Boolean bookingHasStarted, String campdescription) {
super(VCamp.V_CAMP);
setPk(pk);
@@ -366,6 +380,7 @@ public class VCampRecord extends TableRecordImpl<VCampRecord> {
setUsedBedsFemale(usedBedsFemale);
setStartBooking(startBooking);
setBookingHasStarted(bookingHasStarted);
setCampdescription(campdescription);
resetTouchedOnNotNull();
}
}
+2 -1
View File
@@ -16,5 +16,6 @@ create table public.t_camp (
beds_female integer not null default 0,
blocked_beds_male integer not null default 0,
blocked_beds_female integer not null default 0,
start_booking timestamp without time zone not null
start_booking timestamp without time zone not null,
fk_campdescription int references public.t_campdescription(pk_campdescription)
);
@@ -0,0 +1,5 @@
create table public.t_campdescription (
created timestamp default CURRENT_TIMESTAMP,
pk_campdescription integer not null primary key generated always as identity,
value text not null unique
);
+24
View File
@@ -0,0 +1,24 @@
begin;
drop view public.v_dsgvo_delete_candidate;
drop view public.v_camp;
\i tables/campdescription.sql
alter table public.t_camp add column fk_campdescription int references public.t_campdescription(pk_campdescription);
insert into public.t_campdescription(value) values
('Biblische Geschichten\nNachtwanderung\nGruppenspiele\nAusflüge\nÜberraschungen'),
('Bibelstudium\nAustauschgruppen\nSeminare\nWorkshops\nAbendvorträge\n... und auch mal ein Spiel');
with x(pk_campdescription) as (
select pk_campdescription
from public.t_campdescription
where value like 'Biblische%'
) update public.t_camp
set fk_campdescription = x.pk_campdescription
from x;
\i views/camp.sql
\i views/dsgvo_delete_candidate.sql
\i views/version.sql
commit;
+3 -1
View File
@@ -34,8 +34,10 @@ with female(used, fk_camp) as (
coalesce(male.used, 0) as used_beds_male,
coalesce(female.used, 0) as used_beds_female,
c.start_booking,
(c.start_booking < now()) as booking_has_started
(c.start_booking < now()) as booking_has_started,
cd.value as campdescription
from public.t_camp c
left join public.t_campdescription cd on cd.pk_campdescription = c.fk_campdescription
left join public.t_location l on c.fk_location = l.pk
left join male on male.fk_camp = c.pk
left join female on female.fk_camp = c.pk;
+1 -1
View File
@@ -1,2 +1,2 @@
create or replace view public.v_version as
select '2026-04-15'::text as version;
select '2026-10-12'::text as version;