added profile

This commit is contained in:
Jottyfan
2023-09-10 20:54:48 +02:00
parent 6320697009
commit 4c0c65310c
11 changed files with 736 additions and 2 deletions

View File

@@ -0,0 +1,153 @@
/*
* This file is generated by jOOQ.
*/
package de.jottyfan.bico.db.tables;
import de.jottyfan.bico.db.Keys;
import de.jottyfan.bico.db.Public;
import de.jottyfan.bico.db.tables.records.TProfileRecord;
import java.util.Arrays;
import java.util.List;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Row3;
import org.jooq.Schema;
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" })
public class TProfile extends TableImpl<TProfileRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>public.t_profile</code>
*/
public static final TProfile T_PROFILE = new TProfile();
/**
* The class holding records for this type
*/
@Override
public Class<TProfileRecord> getRecordType() {
return TProfileRecord.class;
}
/**
* The column <code>public.t_profile.id</code>.
*/
public final TableField<TProfileRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
/**
* The column <code>public.t_profile.username</code>.
*/
public final TableField<TProfileRecord, String> USERNAME = createField(DSL.name("username"), SQLDataType.CLOB.nullable(false), this, "");
/**
* The column <code>public.t_profile.theme</code>.
*/
public final TableField<TProfileRecord, String> THEME = createField(DSL.name("theme"), SQLDataType.CLOB.defaultValue(DSL.field("'light'::text", SQLDataType.CLOB)), this, "");
private TProfile(Name alias, Table<TProfileRecord> aliased) {
this(alias, aliased, null);
}
private TProfile(Name alias, Table<TProfileRecord> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
}
/**
* Create an aliased <code>public.t_profile</code> table reference
*/
public TProfile(String alias) {
this(DSL.name(alias), T_PROFILE);
}
/**
* Create an aliased <code>public.t_profile</code> table reference
*/
public TProfile(Name alias) {
this(alias, T_PROFILE);
}
/**
* Create a <code>public.t_profile</code> table reference
*/
public TProfile() {
this(DSL.name("t_profile"), null);
}
public <O extends Record> TProfile(Table<O> child, ForeignKey<O, TProfileRecord> key) {
super(child, key, T_PROFILE);
}
@Override
public Schema getSchema() {
return aliased() ? null : Public.PUBLIC;
}
@Override
public Identity<TProfileRecord, Integer> getIdentity() {
return (Identity<TProfileRecord, Integer>) super.getIdentity();
}
@Override
public UniqueKey<TProfileRecord> getPrimaryKey() {
return Keys.T_PROFILE_PKEY;
}
@Override
public List<UniqueKey<TProfileRecord>> getUniqueKeys() {
return Arrays.asList(Keys.T_PROFILE_USERNAME_KEY);
}
@Override
public TProfile as(String alias) {
return new TProfile(DSL.name(alias), this);
}
@Override
public TProfile as(Name alias) {
return new TProfile(alias, this);
}
/**
* Rename this table
*/
@Override
public TProfile rename(String name) {
return new TProfile(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public TProfile rename(Name name) {
return new TProfile(name, null);
}
// -------------------------------------------------------------------------
// Row3 type methods
// -------------------------------------------------------------------------
@Override
public Row3<Integer, String, String> fieldsRow() {
return (Row3) super.fieldsRow();
}
}

View File

@@ -0,0 +1,122 @@
/*
* This file is generated by jOOQ.
*/
package de.jottyfan.bico.db.tables;
import de.jottyfan.bico.db.Public;
import de.jottyfan.bico.db.tables.records.VVersionRecord;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Row1;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
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" })
public class VVersion extends TableImpl<VVersionRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>public.v_version</code>
*/
public static final VVersion V_VERSION = new VVersion();
/**
* The class holding records for this type
*/
@Override
public Class<VVersionRecord> getRecordType() {
return VVersionRecord.class;
}
/**
* The column <code>public.v_version.version</code>.
*/
public final TableField<VVersionRecord, Integer> VERSION = createField(DSL.name("version"), SQLDataType.INTEGER, this, "");
private VVersion(Name alias, Table<VVersionRecord> aliased) {
this(alias, aliased, null);
}
private VVersion(Name alias, Table<VVersionRecord> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>public.v_version</code> table reference
*/
public VVersion(String alias) {
this(DSL.name(alias), V_VERSION);
}
/**
* Create an aliased <code>public.v_version</code> table reference
*/
public VVersion(Name alias) {
this(alias, V_VERSION);
}
/**
* Create a <code>public.v_version</code> table reference
*/
public VVersion() {
this(DSL.name("v_version"), null);
}
public <O extends Record> VVersion(Table<O> child, ForeignKey<O, VVersionRecord> key) {
super(child, key, V_VERSION);
}
@Override
public Schema getSchema() {
return aliased() ? null : Public.PUBLIC;
}
@Override
public VVersion as(String alias) {
return new VVersion(DSL.name(alias), this);
}
@Override
public VVersion as(Name alias) {
return new VVersion(alias, this);
}
/**
* Rename this table
*/
@Override
public VVersion rename(String name) {
return new VVersion(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public VVersion rename(Name name) {
return new VVersion(name, null);
}
// -------------------------------------------------------------------------
// Row1 type methods
// -------------------------------------------------------------------------
@Override
public Row1<Integer> fieldsRow() {
return (Row1) super.fieldsRow();
}
}

View File

@@ -0,0 +1,70 @@
/*
* This file is generated by jOOQ.
*/
package de.jottyfan.bico.db.tables.pojos;
import java.io.Serializable;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TProfile implements Serializable {
private static final long serialVersionUID = 1L;
private final Integer id;
private final String username;
private final String theme;
public TProfile(TProfile value) {
this.id = value.id;
this.username = value.username;
this.theme = value.theme;
}
public TProfile(
Integer id,
String username,
String theme
) {
this.id = id;
this.username = username;
this.theme = theme;
}
/**
* Getter for <code>public.t_profile.id</code>.
*/
public Integer getId() {
return this.id;
}
/**
* Getter for <code>public.t_profile.username</code>.
*/
public String getUsername() {
return this.username;
}
/**
* Getter for <code>public.t_profile.theme</code>.
*/
public String getTheme() {
return this.theme;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("TProfile (");
sb.append(id);
sb.append(", ").append(username);
sb.append(", ").append(theme);
sb.append(")");
return sb.toString();
}
}

View File

@@ -0,0 +1,46 @@
/*
* This file is generated by jOOQ.
*/
package de.jottyfan.bico.db.tables.pojos;
import java.io.Serializable;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class VVersion implements Serializable {
private static final long serialVersionUID = 1L;
private final Integer version;
public VVersion(VVersion value) {
this.version = value.version;
}
public VVersion(
Integer version
) {
this.version = version;
}
/**
* Getter for <code>public.v_version.version</code>.
*/
public Integer getVersion() {
return this.version;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("VVersion (");
sb.append(version);
sb.append(")");
return sb.toString();
}
}

View File

@@ -0,0 +1,197 @@
/*
* This file is generated by jOOQ.
*/
package de.jottyfan.bico.db.tables.records;
import de.jottyfan.bico.db.tables.TProfile;
import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record3;
import org.jooq.Row3;
import org.jooq.impl.UpdatableRecordImpl;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TProfileRecord extends UpdatableRecordImpl<TProfileRecord> implements Record3<Integer, String, String> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>public.t_profile.id</code>.
*/
public TProfileRecord setId(Integer value) {
set(0, value);
return this;
}
/**
* Getter for <code>public.t_profile.id</code>.
*/
public Integer getId() {
return (Integer) get(0);
}
/**
* Setter for <code>public.t_profile.username</code>.
*/
public TProfileRecord setUsername(String value) {
set(1, value);
return this;
}
/**
* Getter for <code>public.t_profile.username</code>.
*/
public String getUsername() {
return (String) get(1);
}
/**
* Setter for <code>public.t_profile.theme</code>.
*/
public TProfileRecord setTheme(String value) {
set(2, value);
return this;
}
/**
* Getter for <code>public.t_profile.theme</code>.
*/
public String getTheme() {
return (String) get(2);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@Override
public Record1<Integer> key() {
return (Record1) super.key();
}
// -------------------------------------------------------------------------
// Record3 type implementation
// -------------------------------------------------------------------------
@Override
public Row3<Integer, String, String> fieldsRow() {
return (Row3) super.fieldsRow();
}
@Override
public Row3<Integer, String, String> valuesRow() {
return (Row3) super.valuesRow();
}
@Override
public Field<Integer> field1() {
return TProfile.T_PROFILE.ID;
}
@Override
public Field<String> field2() {
return TProfile.T_PROFILE.USERNAME;
}
@Override
public Field<String> field3() {
return TProfile.T_PROFILE.THEME;
}
@Override
public Integer component1() {
return getId();
}
@Override
public String component2() {
return getUsername();
}
@Override
public String component3() {
return getTheme();
}
@Override
public Integer value1() {
return getId();
}
@Override
public String value2() {
return getUsername();
}
@Override
public String value3() {
return getTheme();
}
@Override
public TProfileRecord value1(Integer value) {
setId(value);
return this;
}
@Override
public TProfileRecord value2(String value) {
setUsername(value);
return this;
}
@Override
public TProfileRecord value3(String value) {
setTheme(value);
return this;
}
@Override
public TProfileRecord values(Integer value1, String value2, String value3) {
value1(value1);
value2(value2);
value3(value3);
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached TProfileRecord
*/
public TProfileRecord() {
super(TProfile.T_PROFILE);
}
/**
* Create a detached, initialised TProfileRecord
*/
public TProfileRecord(Integer id, String username, String theme) {
super(TProfile.T_PROFILE);
setId(id);
setUsername(username);
setTheme(theme);
}
/**
* Create a detached, initialised TProfileRecord
*/
public TProfileRecord(de.jottyfan.bico.db.tables.pojos.TProfile value) {
super(TProfile.T_PROFILE);
if (value != null) {
setId(value.getId());
setUsername(value.getUsername());
setTheme(value.getTheme());
}
}
}

View File

@@ -0,0 +1,109 @@
/*
* This file is generated by jOOQ.
*/
package de.jottyfan.bico.db.tables.records;
import de.jottyfan.bico.db.tables.VVersion;
import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Row1;
import org.jooq.impl.TableRecordImpl;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class VVersionRecord extends TableRecordImpl<VVersionRecord> implements Record1<Integer> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>public.v_version.version</code>.
*/
public VVersionRecord setVersion(Integer value) {
set(0, value);
return this;
}
/**
* Getter for <code>public.v_version.version</code>.
*/
public Integer getVersion() {
return (Integer) get(0);
}
// -------------------------------------------------------------------------
// Record1 type implementation
// -------------------------------------------------------------------------
@Override
public Row1<Integer> fieldsRow() {
return (Row1) super.fieldsRow();
}
@Override
public Row1<Integer> valuesRow() {
return (Row1) super.valuesRow();
}
@Override
public Field<Integer> field1() {
return VVersion.V_VERSION.VERSION;
}
@Override
public Integer component1() {
return getVersion();
}
@Override
public Integer value1() {
return getVersion();
}
@Override
public VVersionRecord value1(Integer value) {
setVersion(value);
return this;
}
@Override
public VVersionRecord values(Integer value1) {
value1(value1);
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached VVersionRecord
*/
public VVersionRecord() {
super(VVersion.V_VERSION);
}
/**
* Create a detached, initialised VVersionRecord
*/
public VVersionRecord(Integer version) {
super(VVersion.V_VERSION);
setVersion(version);
}
/**
* Create a detached, initialised VVersionRecord
*/
public VVersionRecord(de.jottyfan.bico.db.tables.pojos.VVersion value) {
super(VVersion.V_VERSION);
if (value != null) {
setVersion(value.getVersion());
}
}
}