Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9476d8853e | |||
| 8cc58aed5b | |||
| ec274a60d9 | |||
| 5b7c41c829 | |||
| f73ec33aeb | |||
| cdde57e033 | |||
| 9d07ed9bfb | |||
| 59e705d012 | |||
| 3b50a94928 | |||
| fd5bb14e77 | |||
| a786607608 | |||
| 031d71406c | |||
| 48149b67cf | |||
| 9f0a0c1d1e | |||
| 7555cfd51d | |||
| ea038ec70c | |||
| ecfa0eb6d8 |
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
# Posted by barth, modified by community. See post 'Timeline' for change history
|
||||||
|
# Retrieved 2026-08-19, License - CC BY-SA 4.0
|
||||||
|
NEXUS_URL=https://nexus.thpeetz.de
|
||||||
|
MAVEN_REPO=maven-snapshots
|
||||||
|
GROUP_ID=de.thpeetz
|
||||||
|
ARTIFACT_ID=kontor-spring
|
||||||
|
VERSION=0.3.0-SNAPSHOT
|
||||||
|
FILE_EXTENSION=jar
|
||||||
|
|
||||||
|
download_url=$(curl -X GET "${NEXUS_URL}/service/rest/v1/search/assets?repository=${MAVEN_REPO}&maven.groupId=${GROUP_ID}&maven.artifactId=${ARTIFACT_ID}&maven.baseVersion=${VERSION}&maven.extension=${FILE_EXTENSION}" -H "accept: application/json" | jq -rc '.items | .[].downloadUrl' | sort | tail -n 1)
|
||||||
|
wget $download_url
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/gradlew text eol=lf
|
|
||||||
*.bat text eol=crlf
|
|
||||||
*.jar binary
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
HELP.md
|
|
||||||
.gradle
|
|
||||||
build/
|
|
||||||
!gradle/wrapper/gradle-wrapper.jar
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### STS ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
bin/
|
|
||||||
!**/src/main/**/bin/
|
|
||||||
!**/src/test/**/bin/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
out/
|
|
||||||
!**/src/main/**/out/
|
|
||||||
!**/src/test/**/out/
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'java'
|
|
||||||
id 'org.springframework.boot' version '4.0.7'
|
|
||||||
id 'io.spring.dependency-management' version '1.1.7'
|
|
||||||
alias(libs.plugins.lombok)
|
|
||||||
}
|
|
||||||
|
|
||||||
group = 'de.thpeetz.kontor'
|
|
||||||
version = '0.3.0-SNAPSHOT'
|
|
||||||
|
|
||||||
java {
|
|
||||||
toolchain {
|
|
||||||
languageVersion = JavaLanguageVersion.of(21)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
maven { setUrl("https://repo.spring.io/milestone") }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencyManagement {
|
|
||||||
imports {
|
|
||||||
mavenBom libs.camel.bom.get().toString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-artemis'
|
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
|
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
||||||
implementation 'org.apache.camel.springboot:camel-spring-boot-starter:4.20.0'
|
|
||||||
implementation 'org.apache.camel.springboot:camel-jms-starter'
|
|
||||||
implementation 'io.micrometer:micrometer-registry-prometheus'
|
|
||||||
implementation 'org.apache.activemq:artemis-jakarta-client'
|
|
||||||
implementation 'org.postgresql:postgresql'
|
|
||||||
implementation libs.jackson
|
|
||||||
implementation libs.gson
|
|
||||||
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
|
|
||||||
compileOnly 'org.projectlombok:lombok'
|
|
||||||
annotationProcessor 'org.projectlombok:lombok'
|
|
||||||
testImplementation 'org.apache.camel:camel-test-spring-junit5'
|
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-artemis-test'
|
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
|
|
||||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.named('test') {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
[versions]
|
|
||||||
gradle = "8.6"
|
|
||||||
args4j = "2.33"
|
|
||||||
commonscli = "1.5.0"
|
|
||||||
junit = "5.8.2"
|
|
||||||
logback = "1.1.2"
|
|
||||||
mockito = "1.9.5"
|
|
||||||
picoli = "4.7.0"
|
|
||||||
slf4j = "1.7.22"
|
|
||||||
hsqldb = "2.7.1"
|
|
||||||
sqlite = "3.25.2"
|
|
||||||
spotbugs = "6.0.7"
|
|
||||||
asciidoctor = "4.0.2"
|
|
||||||
rouge = "3.15.0"
|
|
||||||
#diagram = "2.2.2"
|
|
||||||
diagram = "2.3.1"
|
|
||||||
sonarqube = "3.3"
|
|
||||||
cimtConventions = "1.0.0-SNAPSHOT"
|
|
||||||
springboot = "3.2.5"
|
|
||||||
springdependencies = "1.1.4"
|
|
||||||
vaadin = "24.3.8"
|
|
||||||
camel = "4.10.6"
|
|
||||||
artemis = "2.41.0"
|
|
||||||
lombok = "8.6"
|
|
||||||
gson = "2.9.0"
|
|
||||||
jackson = "2.16.1"
|
|
||||||
json_simple = "1.1.1"
|
|
||||||
mail = "1.6.2"
|
|
||||||
hypersistence = "3.9.10"
|
|
||||||
|
|
||||||
[libraries]
|
|
||||||
args4j = { module = "args4j:args4j", version.ref = "args4j" }
|
|
||||||
commonscli = { module = "commons-cli:commons-cli", version.ref = "commonscli" }
|
|
||||||
junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
|
|
||||||
logbackCore = { module = "ch.qos.logback:logback-core", version.ref = "logback" }
|
|
||||||
logbackClassic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
|
|
||||||
mockito = { module = "org.mockito:mockito-all", version.ref = "mockito" }
|
|
||||||
picocli = { module = "info.picocli:picocli", version.ref = "picoli" }
|
|
||||||
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
|
|
||||||
hsqldb = { module = "org.hsqldb:hsqldb", version.ref = "hsqldb" }
|
|
||||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
|
||||||
jackson = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" }
|
|
||||||
json = { module = "com.googlecode.json-simple:json-simple", version.ref ="json_simple" }
|
|
||||||
mail = { module = "com.sun.mail:javax.mail", version.ref ="mail" }
|
|
||||||
sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version.ref = "sqlite" }
|
|
||||||
hypersistence = { module = "io.hypersistence:hypersistence-utils-hibernate-63", version.ref = "hypersistence" }
|
|
||||||
vaadin-bom = { module = "com.vaadin:vaadin-bom", version.ref = "vaadin" }
|
|
||||||
camel-bom = { module = "org.apache.camel.springboot:camel-spring-boot-bom", version.ref = "camel"}
|
|
||||||
artemis = { module = "org.apache.activemq:artemis-jms-server", version.ref = "artemis" }
|
|
||||||
asciidoctorGradleJvmGems = { module = "org.asciidoctor:asciidoctor-gradle-jvm-gems", version.ref= "asciidoctor" }
|
|
||||||
asciidoctorGradleJvm = { module = "org.asciidoctor:asciidoctor-gradle-jvm", version.ref= "asciidoctor" }
|
|
||||||
asciidoctorGradleJvmPdf = { module = "org.asciidoctor:asciidoctor-gradle-jvm-pdf", version.ref= "asciidoctor" }
|
|
||||||
rouge = { module = "rubygems:rouge", version.ref = "rouge" }
|
|
||||||
diagram = { module = "rubygems:asciidoctor-diagram", version.ref = "diagram" }
|
|
||||||
|
|
||||||
[bundles]
|
|
||||||
logback = ["logbackCore", "logbackClassic"]
|
|
||||||
|
|
||||||
[plugins]
|
|
||||||
spotbugs = { id = "com.github.spotbugs", version.ref = "spotbugs" }
|
|
||||||
sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" }
|
|
||||||
asciidoctorPdf = { id = "org.asciidoctor.jvm.pdf", version.ref = "asciidoctor" }
|
|
||||||
asciidoctorConvert = { id = "org.asciidoctor.jvm.convert", version.ref = "asciidoctor" }
|
|
||||||
asciidoctorGems = { id = "org.asciidoctor.jvm.gems", version.ref = "asciidoctor" }
|
|
||||||
javaConvention = { id = "de.cimt.java-conventions", version.ref = "cimtConventions" }
|
|
||||||
applicationConvention = { id = "de.cimt.application-conventions", version.ref = "cimtConventions" }
|
|
||||||
libraryConvention = { id = "de.cimt.library-conventions", version.ref = "cimtConventions" }
|
|
||||||
asciidoctorConvention = { id = "de.cimt.asciidoctor-conventions", version.ref = "cimtConventions" }
|
|
||||||
spring-boot = { id = "org.springframework.boot", version.ref = "springboot"}
|
|
||||||
spring-dependencies = { id = "io.spring.dependency-management", version.ref = "springdependencies" }
|
|
||||||
vaadin = { id = "com.vaadin", version.ref = "vaadin" }
|
|
||||||
lombok = { id = "io.freefair.lombok", version.ref = "lombok" }
|
|
||||||
BIN
Binary file not shown.
@@ -1,9 +0,0 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
|
||||||
distributionPath=wrapper/dists
|
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
|
||||||
networkTimeout=10000
|
|
||||||
retries=0
|
|
||||||
retryBackOffMs=500
|
|
||||||
validateDistributionUrl=true
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
|
||||||
Vendored
-248
@@ -1,248 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright © 2015 the original authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Gradle start up script for POSIX generated by Gradle.
|
|
||||||
#
|
|
||||||
# Important for running:
|
|
||||||
#
|
|
||||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
||||||
# noncompliant, but you have some other compliant shell such as ksh or
|
|
||||||
# bash, then to run this script, type that shell name before the whole
|
|
||||||
# command line, like:
|
|
||||||
#
|
|
||||||
# ksh Gradle
|
|
||||||
#
|
|
||||||
# Busybox and similar reduced shells will NOT work, because this script
|
|
||||||
# requires all of these POSIX shell features:
|
|
||||||
# * functions;
|
|
||||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
||||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
||||||
# * compound commands having a testable exit status, especially «case»;
|
|
||||||
# * various built-in commands including «command», «set», and «ulimit».
|
|
||||||
#
|
|
||||||
# Important for patching:
|
|
||||||
#
|
|
||||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
||||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
||||||
#
|
|
||||||
# The "traditional" practice of packing multiple parameters into a
|
|
||||||
# space-separated string is a well documented source of bugs and security
|
|
||||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
||||||
# options in "$@", and eventually passing that to Java.
|
|
||||||
#
|
|
||||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
||||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
||||||
# see the in-line comments for details.
|
|
||||||
#
|
|
||||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
||||||
# Darwin, MinGW, and NonStop.
|
|
||||||
#
|
|
||||||
# (3) This script is generated from the Groovy template
|
|
||||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
||||||
# within the Gradle project.
|
|
||||||
#
|
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
|
||||||
app_path=$0
|
|
||||||
|
|
||||||
# Need this for daisy-chained symlinks.
|
|
||||||
while
|
|
||||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
|
||||||
[ -h "$app_path" ]
|
|
||||||
do
|
|
||||||
ls=$( ls -ld "$app_path" )
|
|
||||||
link=${ls#*' -> '}
|
|
||||||
case $link in #(
|
|
||||||
/*) app_path=$link ;; #(
|
|
||||||
*) app_path=$APP_HOME$link ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# This is normally unused
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
APP_BASE_NAME=${0##*/}
|
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
||||||
MAX_FD=maximum
|
|
||||||
|
|
||||||
warn () {
|
|
||||||
echo "$*"
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
die () {
|
|
||||||
echo
|
|
||||||
echo "$*"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
|
||||||
cygwin=false
|
|
||||||
msys=false
|
|
||||||
darwin=false
|
|
||||||
nonstop=false
|
|
||||||
case "$( uname )" in #(
|
|
||||||
CYGWIN* ) cygwin=true ;; #(
|
|
||||||
Darwin* ) darwin=true ;; #(
|
|
||||||
MSYS* | MINGW* ) msys=true ;; #(
|
|
||||||
NONSTOP* ) nonstop=true ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
|
||||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
|
||||||
else
|
|
||||||
JAVACMD=$JAVA_HOME/bin/java
|
|
||||||
fi
|
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
JAVACMD=java
|
|
||||||
if ! command -v java >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
||||||
case $MAX_FD in #(
|
|
||||||
max*)
|
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC2039,SC3045
|
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
|
||||||
warn "Could not query maximum file descriptor limit"
|
|
||||||
esac
|
|
||||||
case $MAX_FD in #(
|
|
||||||
'' | soft) :;; #(
|
|
||||||
*)
|
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC2039,SC3045
|
|
||||||
ulimit -n "$MAX_FD" ||
|
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Collect all arguments for the java command, stacking in reverse order:
|
|
||||||
# * args from the command line
|
|
||||||
# * the main class name
|
|
||||||
# * -classpath
|
|
||||||
# * -D...appname settings
|
|
||||||
# * --module-path (only if needed)
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
||||||
if "$cygwin" || "$msys" ; then
|
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
|
||||||
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
for arg do
|
|
||||||
if
|
|
||||||
case $arg in #(
|
|
||||||
-*) false ;; # don't mess with options #(
|
|
||||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
|
||||||
[ -e "$t" ] ;; #(
|
|
||||||
*) false ;;
|
|
||||||
esac
|
|
||||||
then
|
|
||||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
|
||||||
fi
|
|
||||||
# Roll the args list around exactly as many times as the number of
|
|
||||||
# args, so each arg winds up back in the position where it started, but
|
|
||||||
# possibly modified.
|
|
||||||
#
|
|
||||||
# NB: a `for` loop captures its iteration list before it begins, so
|
|
||||||
# changing the positional parameters here affects neither the number of
|
|
||||||
# iterations, nor the values presented in `arg`.
|
|
||||||
shift # remove old arg
|
|
||||||
set -- "$@" "$arg" # push replacement arg
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
||||||
# and any embedded shellness will be escaped.
|
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
||||||
# treated as '${Hostname}' itself on the command line.
|
|
||||||
|
|
||||||
set -- \
|
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
|
||||||
"$@"
|
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
|
||||||
if ! command -v xargs >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
die "xargs is not available"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
|
||||||
#
|
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
|
||||||
#
|
|
||||||
# In Bash we could simply go:
|
|
||||||
#
|
|
||||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
|
||||||
# set -- "${ARGS[@]}" "$@"
|
|
||||||
#
|
|
||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
|
||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
|
||||||
# character that might be a shell metacharacter, then use eval to reverse
|
|
||||||
# that process (while maintaining the separation between arguments), and wrap
|
|
||||||
# the whole thing up as a single "set" statement.
|
|
||||||
#
|
|
||||||
# This will of course break if any of these variables contains a newline or
|
|
||||||
# an unmatched quote.
|
|
||||||
#
|
|
||||||
|
|
||||||
eval "set -- $(
|
|
||||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
|
||||||
xargs -n1 |
|
|
||||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
|
||||||
tr '\n' ' '
|
|
||||||
)" '"$@"'
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
|
||||||
Vendored
-82
@@ -1,82 +0,0 @@
|
|||||||
@rem
|
|
||||||
@rem Copyright 2015 the original author or authors.
|
|
||||||
@rem
|
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
@rem you may not use this file except in compliance with the License.
|
|
||||||
@rem You may obtain a copy of the License at
|
|
||||||
@rem
|
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
@rem
|
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
@rem See the License for the specific language governing permissions and
|
|
||||||
@rem limitations under the License.
|
|
||||||
@rem
|
|
||||||
@rem SPDX-License-Identifier: Apache-2.0
|
|
||||||
@rem
|
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
|
||||||
@rem ##########################################################################
|
|
||||||
@rem
|
|
||||||
@rem Gradle startup script for Windows
|
|
||||||
@rem
|
|
||||||
@rem ##########################################################################
|
|
||||||
|
|
||||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
|
||||||
setlocal EnableExtensions
|
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
|
||||||
@rem This is normally unused
|
|
||||||
set APP_BASE_NAME=%~n0
|
|
||||||
set APP_HOME=%DIRNAME%
|
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
||||||
|
|
||||||
@rem Find java.exe
|
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
|
||||||
|
|
||||||
echo. 1>&2
|
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
||||||
echo. 1>&2
|
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
||||||
echo location of your Java installation. 1>&2
|
|
||||||
|
|
||||||
"%COMSPEC%" /c exit 1
|
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
|
||||||
|
|
||||||
echo. 1>&2
|
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
||||||
echo. 1>&2
|
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
||||||
echo location of your Java installation. 1>&2
|
|
||||||
|
|
||||||
"%COMSPEC%" /c exit 1
|
|
||||||
|
|
||||||
:execute
|
|
||||||
@rem Setup the command line
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
|
||||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
|
||||||
@rem which allows us to clear the local environment before executing the java command
|
|
||||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
|
||||||
|
|
||||||
:exitWithErrorLevel
|
|
||||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
|
||||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
rootProject.name = 'integration'
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package de.thpeetz.kontor.integration;
|
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
|
||||||
public class IntegrationApplication {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(IntegrationApplication.class, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package de.thpeetz.kontor.integration.routes;
|
|
||||||
|
|
||||||
import de.thpeetz.kontor.integration.services.AddLinkProcessor;
|
|
||||||
import de.thpeetz.kontor.media.services.MediaFileService;
|
|
||||||
import org.apache.camel.builder.RouteBuilder;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class AddLinkFromQueue extends RouteBuilder {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private final MediaFileService mediaFileService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public AddLinkFromQueue(MediaFileService mediaFileService) {
|
|
||||||
this.mediaFileService = mediaFileService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configure() throws Exception {
|
|
||||||
from("jms:queue:add_link_file")
|
|
||||||
.routeId("read-queue-add-link_file")
|
|
||||||
.log("${body}")
|
|
||||||
.process(new AddLinkProcessor(mediaFileService))
|
|
||||||
.to("jms:queue:update_title");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package de.thpeetz.kontor.integration.routes;
|
|
||||||
import de.thpeetz.kontor.media.services.MediaFileService;
|
|
||||||
import org.apache.camel.builder.RouteBuilder;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class QueueMediaLinkAdd extends RouteBuilder {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private final MediaFileService mediaFileService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public QueueMediaLinkAdd(MediaFileService mediaFileService) {
|
|
||||||
this.mediaFileService = mediaFileService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configure() throws Exception {
|
|
||||||
from("jms:queue:media.link.add")
|
|
||||||
.routeId("read-queue-media-link-add")
|
|
||||||
.log("${body}")
|
|
||||||
.to("jms:queue:media.link.add.processed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package de.thpeetz.kontor.integration.routes;
|
|
||||||
|
|
||||||
import org.apache.camel.builder.RouteBuilder;
|
|
||||||
import de.thpeetz.kontor.media.services.MediaFileService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class QueueMediaLoFiAdd extends RouteBuilder {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private final MediaFileService mediaFileService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public QueueMediaLoFiAdd(MediaFileService mediaFileService) {
|
|
||||||
this.mediaFileService = mediaFileService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configure() throws Exception {
|
|
||||||
from("jms:queue:media.lofi.add")
|
|
||||||
.routeId("read-queue-media-lofi-add")
|
|
||||||
.log("${body}")
|
|
||||||
.to("jms:queue:media.lofi.add.processed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
package de.thpeetz.kontor.integration.routes;
|
|
||||||
|
|
||||||
import org.apache.camel.builder.RouteBuilder;
|
|
||||||
import de.thpeetz.kontor.media.services.MediaFileService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class QueueMediaVideoAdd extends RouteBuilder {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private final MediaFileService mediaFileService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public QueueMediaVideoAdd(MediaFileService mediaFileService) {
|
|
||||||
this.mediaFileService = mediaFileService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configure() throws Exception {
|
|
||||||
from("jms:queue:media.video.add")
|
|
||||||
.routeId("read-queue-media-video-add")
|
|
||||||
.log("${body}")
|
|
||||||
.to("jms:queue:media.video.add.processed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package de.thpeetz.kontor.integration.routes;
|
|
||||||
|
|
||||||
import org.apache.camel.builder.RouteBuilder;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class ReadQueueRoute extends RouteBuilder {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configure() throws Exception {
|
|
||||||
from("jms:queue:KontorMediaFile")
|
|
||||||
.routeId("add-link-from-queue")
|
|
||||||
.trace(true)
|
|
||||||
.log(">>> ${body}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-53
@@ -1,53 +0,0 @@
|
|||||||
package de.thpeetz.kontor.integration.services;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import de.thpeetz.kontor.media.data.MediaFile;
|
|
||||||
import de.thpeetz.kontor.media.services.MediaFileService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.camel.Exchange;
|
|
||||||
import org.apache.camel.Processor;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
public class AddLinkProcessor implements Processor {
|
|
||||||
|
|
||||||
private final MediaFileService mediaFileService;
|
|
||||||
|
|
||||||
public AddLinkProcessor(MediaFileService mediaFileService) {
|
|
||||||
this.mediaFileService = mediaFileService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void process(Exchange exchange) throws Exception {
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
HashMap<String, String> myMap = objectMapper.readValue(exchange.getIn().getBody().toString(),
|
|
||||||
new TypeReference<HashMap<String, String>>() {
|
|
||||||
});
|
|
||||||
String url = myMap.get("url");
|
|
||||||
log.info("found url: {}", url);
|
|
||||||
MediaFile mediaFile = mediaFileService.findAllMediaFilesByUrl(url);
|
|
||||||
if (mediaFile == null) {
|
|
||||||
log.info("URL not found, create MediaFile");
|
|
||||||
mediaFile = new MediaFile();
|
|
||||||
mediaFile.setUrl(url);
|
|
||||||
mediaFile.setPath("");
|
|
||||||
mediaFile.setCloudLink("");
|
|
||||||
mediaFile.setFileName("");
|
|
||||||
mediaFile.setTitle("");
|
|
||||||
mediaFile.setReview(true);
|
|
||||||
mediaFile.setShouldDownload(true);
|
|
||||||
MediaFile mediaFileResult = mediaFileService.saveMediaFile(mediaFile);
|
|
||||||
log.info("created MediaFile with {}", mediaFileResult.getId());
|
|
||||||
exchange.getMessage().getHeaders().put("mediafile_id", mediaFileResult.getId());
|
|
||||||
} else {
|
|
||||||
log.info("found MediaFile with {}", mediaFile.getId());
|
|
||||||
exchange.getMessage().getHeaders().put("mediafile_id", mediaFile.getId());
|
|
||||||
}
|
|
||||||
log.info("found MediaFile: {}", mediaFile);
|
|
||||||
Map<String, Object> map = exchange.getMessage().getHeaders();
|
|
||||||
log.info("Headers: {}", map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package de.thpeetz.kontor.integration.services;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
|
||||||
public class AddLinkService {
|
|
||||||
|
|
||||||
public void fromQueue(String messageBody) throws JsonProcessingException {
|
|
||||||
log.info("get body: {}", messageBody);
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
HashMap<String,String> myMap = objectMapper.readValue(messageBody, new TypeReference<HashMap<String,String>>() {});
|
|
||||||
String url = myMap.get("url");
|
|
||||||
log.info("found url: {}", url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: integration
|
|
||||||
server:
|
|
||||||
port:
|
|
||||||
8110
|
|
||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
package de.thpeetz.kontor.integration;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
|
|
||||||
@SpringBootTest
|
|
||||||
class IntegrationApplicationTests {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void contextLoads() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -14,7 +14,9 @@ ENV PATH="/root/.local/bin:${PATH}"
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ./pyproject.toml .
|
COPY ./pyproject.toml .
|
||||||
|
#RUN --mount=type=bind,source=/home/tpeetz/projects/kontor/kontor-model,target=/container/kontor-model uv add /container/kontor-model
|
||||||
|
#COPY ../kontor-model/ /container
|
||||||
|
RUN uv add /container/kontor-model
|
||||||
RUN uv sync
|
RUN uv sync
|
||||||
|
|
||||||
# ------------------------------- Production Stage ------------------------------ ##
|
# ------------------------------- Production Stage ------------------------------ ##
|
||||||
|
|||||||
@@ -24,10 +24,13 @@ dependencies = [
|
|||||||
"psycopg2-binary>=2.9.10",
|
"psycopg2-binary>=2.9.10",
|
||||||
"pytest-cov>=6.1.1",
|
"pytest-cov>=6.1.1",
|
||||||
"databases[sqlite]>=0.9.0",
|
"databases[sqlite]>=0.9.0",
|
||||||
"pydantic[email]>=2.11.3",
|
|
||||||
"jinja2>=3.1.6",
|
"jinja2>=3.1.6",
|
||||||
"asyncpg>=0.30.0",
|
"asyncpg>=0.30.0",
|
||||||
"bcrypt>=4.3.0",
|
"bcrypt>=4.3.0",
|
||||||
"fastapi-jwt-auth>=0.5.0",
|
"fastapi-jwt-auth>=0.5.0",
|
||||||
"msgspec[toml,yaml]>=0.21.1",
|
"msgspec[toml,yaml]>=0.21.1",
|
||||||
|
"kontor-model",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.uv.sources]
|
||||||
|
kontor-model = { path = "../kontor-model", editable = true }
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ from src.apis.version1.comics import (
|
|||||||
from src.apis.version1.media import (
|
from src.apis.version1.media import (
|
||||||
actor,
|
actor,
|
||||||
file,
|
file,
|
||||||
|
lofi,
|
||||||
mediaactorfile,
|
mediaactorfile,
|
||||||
mediavideo,
|
mediavideo,
|
||||||
mediaarticle,
|
mediaarticle,
|
||||||
@@ -104,6 +105,12 @@ api_router.include_router(
|
|||||||
tags=["media"],
|
tags=["media"],
|
||||||
dependencies=[Depends(get_current_user_from_token)],
|
dependencies=[Depends(get_current_user_from_token)],
|
||||||
)
|
)
|
||||||
|
api_router.include_router(
|
||||||
|
lofi.router,
|
||||||
|
prefix="/media",
|
||||||
|
tags=["media"],
|
||||||
|
dependencies=[Depends(get_current_user_from_token)],
|
||||||
|
)
|
||||||
api_router.include_router(
|
api_router.include_router(
|
||||||
mediaarticle.router,
|
mediaarticle.router,
|
||||||
prefix="/media",
|
prefix="/media",
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ from src.core.security import (
|
|||||||
authenticate_user_by_username,
|
authenticate_user_by_username,
|
||||||
create_access_token,
|
create_access_token,
|
||||||
)
|
)
|
||||||
from src.schema.admin.login import LoginRequest
|
from kontor_model.schema.admin.login import LoginRequest
|
||||||
from src.schema.admin.token import Token
|
from kontor_model.schema.admin.token import Token
|
||||||
from src.webapps.auth.forms import LoginForm
|
from src.webapps.auth.forms import LoginForm
|
||||||
|
|
||||||
login_router = APIRouter()
|
login_router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.admin import MailAccount
|
from kontor_model.db.models.admin import MailAccount
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.admin.mailaccount import MailAccountResponse, to_response
|
from kontor_model.schema.admin.mailaccount import MailAccountResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
|
||||||
from src.db.models.bookshelf import Article
|
from kontor_model.db.models.bookshelf import Article
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.bookshelf.article import ArticleResponse, to_response
|
from kontor_model.schema.bookshelf.article import ArticleResponse, to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
|
||||||
from src.db.models.bookshelf import ArticleAuthor
|
from kontor_model.db.models.bookshelf import ArticleAuthor
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.bookshelf.articleauthor import ArticleAuthorResponse, to_response
|
from kontor_model.schema.bookshelf.articleauthor import ArticleAuthorResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.bookshelf import Author
|
from kontor_model.db.models.bookshelf import Author
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.bookshelf.author import AuthorResponse, to_response
|
from kontor_model.schema.bookshelf.author import AuthorResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
|
||||||
from src.db.models.bookshelf import Book
|
from kontor_model.db.models.bookshelf import Book
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.bookshelf.book import BookResponse, to_response
|
from kontor_model.schema.bookshelf.book import BookResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
|
||||||
from src.db.models.bookshelf import BookAuthor
|
from kontor_model.db.models.bookshelf import BookAuthor
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.bookshelf.bookauthor import BookAuthorResponse, to_response
|
from kontor_model.schema.bookshelf.bookauthor import BookAuthorResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
|
||||||
from src.db.models.bookshelf import BookshelfPublisher
|
from kontor_model.db.models.bookshelf import BookshelfPublisher
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.bookshelf.publisher import PublisherResponse, to_response
|
from kontor_model.schema.bookshelf.publisher import PublisherResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException, status
|
from fastapi import APIRouter, HTTPException, status
|
||||||
|
|
||||||
from src.db.models.comic import Artist
|
from kontor_model.db.models.comic import Artist
|
||||||
from src.db.repository.comics.artist import get_artist_details
|
from kontor_model.db.repository.comics.artist import get_artist_details
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.artist import ArtistCreation, ArtistResponse, artist_to_response
|
from kontor_model.schema.comics.artist import ArtistCreation, ArtistResponse, artist_to_response
|
||||||
from src.schema.comics.artist_details import ArtistDetailResponse
|
from kontor_model.schema.comics.artist_details import ArtistDetailResponse
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ from typing import List
|
|||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.db.models.comic import Comic
|
from kontor_model.db.models.comic import Comic
|
||||||
from src.db.repository.comics.comic import (
|
from kontor_model.db.repository.comics.comic import (
|
||||||
get_comic_details,
|
get_comic_details,
|
||||||
)
|
)
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.comic import ComicResponse, comic_to_response
|
from kontor_model.schema.comics.comic import ComicResponse, comic_to_response
|
||||||
from src.schema.comics.comic_details import ComicDetailsResponse
|
from kontor_model.schema.comics.comic_details import ComicDetailsResponse
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.comic import ComicWork
|
from kontor_model.db.models.comic import ComicWork
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.comicwork import ComicWorkResponse, comicwork_to_response
|
from kontor_model.schema.comics.comicwork import ComicWorkResponse, comicwork_to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.comic import Issue
|
from kontor_model.db.models.comic import Issue
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.issue import IssueResponse, issue_to_response
|
from kontor_model.schema.comics.issue import IssueResponse, issue_to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.comic import IssueWork
|
from kontor_model.db.models.comic import IssueWork
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.issuework import IssueWorkResponse, issuework_to_response
|
from kontor_model.schema.comics.issuework import IssueWorkResponse, issuework_to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.comic import Publisher
|
from kontor_model.db.models.comic import Publisher
|
||||||
from src.db.repository.comics.publisher import get_publisher_details
|
from kontor_model.db.repository.comics.publisher import get_publisher_details
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.publisher import PublisherResponse, publisher_to_response
|
from kontor_model.schema.comics.publisher import PublisherResponse, publisher_to_response
|
||||||
from src.schema.comics.publisher_details import PublisherDetailsResponse
|
from kontor_model.schema.comics.publisher_details import PublisherDetailsResponse
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.comic import StoryArc
|
from kontor_model.db.models.comic import StoryArc
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.storyarc import StoryArcResponse, storyarc_to_response
|
from kontor_model.schema.comics.storyarc import StoryArcResponse, storyarc_to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.comic import Volume
|
from kontor_model.db.models.comic import Volume
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.volume import VolumeResponse, volume_to_response
|
from kontor_model.schema.comics.volume import VolumeResponse, volume_to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.comic import WorkType
|
from kontor_model.db.models.comic import WorkType
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.worktype import WorktypeResponse, worktype_to_response
|
from kontor_model.schema.comics.worktype import WorktypeResponse, worktype_to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from fastapi import APIRouter, status
|
from fastapi import APIRouter, status
|
||||||
|
|
||||||
from src.schema.admin.healthcheck import HealthCheck
|
from kontor_model.schema.admin.healthcheck import HealthCheck
|
||||||
|
|
||||||
health_router = APIRouter()
|
health_router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, status, HTTPException
|
from fastapi import APIRouter, status, HTTPException
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.db.repository.media.actor import delete_mediaactor, import_mediaactor
|
from kontor_model.db.repository.media.actor import delete_mediaactor, import_mediaactor
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.media.actor import MediaActorModel, MediaActorResponse, actor_to_response
|
from kontor_model.schema.media.actor import MediaActorModel, MediaActorResponse, actor_to_response
|
||||||
from src.db.models.media import MediaActor
|
from kontor_model.db.models.media import MediaActor
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,21 +2,21 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, status, HTTPException
|
from fastapi import APIRouter, status, HTTPException
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.db.repository.media.actorfile import (
|
from kontor_model.db.repository.media.actorfile import (
|
||||||
create_new_mediaactorfile,
|
create_new_mediaactorfile,
|
||||||
delete_mediaactorfile,
|
delete_mediaactorfile,
|
||||||
)
|
)
|
||||||
from src.db.repository.media.file import delete_mediafile, import_mediafile
|
from kontor_model.db.repository.media.file import delete_mediafile, import_mediafile
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.media.actor import MediaActorResponse, actor_to_response
|
from kontor_model.schema.media.actor import MediaActorResponse, actor_to_response
|
||||||
from src.schema.media.actorfile import MediaActorFileResponse, actorfile_to_response
|
from kontor_model.schema.media.actorfile import MediaActorFileResponse, actorfile_to_response
|
||||||
from src.schema.media.file import (
|
from kontor_model.schema.media.file import (
|
||||||
MediaFileModel,
|
MediaFileModel,
|
||||||
MediaFileResponse,
|
MediaFileResponse,
|
||||||
file_to_response,
|
file_to_response,
|
||||||
file_to_model,
|
file_to_model,
|
||||||
)
|
)
|
||||||
from src.db.models.media import MediaFile
|
from kontor_model.db.models.media import MediaFile
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
from typing import List
|
||||||
|
|
||||||
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
|
from kontor_model.db.models.media import MediaLofi
|
||||||
|
from src.db.session import SessionDep
|
||||||
|
from kontor_model.schema.media.lofi import MediaLofiResponse, lofi_to_response
|
||||||
|
|
||||||
|
|
||||||
|
router = APIRouter()
|
||||||
|
|
||||||
|
@router.get("/lofi", response_model=List[MediaLofiResponse])
|
||||||
|
def get_all_lofis(
|
||||||
|
db: SessionDep, review: bool = False, download: bool = False
|
||||||
|
) -> List[MediaLofiResponse]:
|
||||||
|
"""
|
||||||
|
Get all MediaLofis.
|
||||||
|
"""
|
||||||
|
results: List[MediaLofiResponse] = []
|
||||||
|
lofis: List[MediaLofi]
|
||||||
|
if review:
|
||||||
|
lofis = db.query(MediaLofi).filter(MediaLofi.review.is_(True)).all()
|
||||||
|
elif download:
|
||||||
|
lofis = db.query(MediaLofi).filter(MediaLofi.should_download.is_(True)).all()
|
||||||
|
else:
|
||||||
|
lofis = db.query(MediaLofi).all()
|
||||||
|
for medialofi in lofis:
|
||||||
|
response = lofi_to_response(medialofi)
|
||||||
|
results.append(response)
|
||||||
|
return results
|
||||||
|
|
||||||
|
@router.get("/lofi/{lofi_id}", response_model=MediaLofiResponse)
|
||||||
|
def get_lofi(lofi_id: str, db: SessionDep) -> MediaLofiResponse:
|
||||||
|
"""
|
||||||
|
Get MediaLofi by id.
|
||||||
|
"""
|
||||||
|
lofi = db.get(MediaLofi, lofi_id)
|
||||||
|
if lofi is None:
|
||||||
|
raise HTTPException(status_code=404, detail="MediaLofi could not be found")
|
||||||
|
response = lofi_to_response(lofi)
|
||||||
|
return response
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
from typing import List
|
from typing import List
|
||||||
from fastapi import APIRouter, status, HTTPException
|
from fastapi import APIRouter, status, HTTPException
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.db.models.media import MediaActorFile
|
from kontor_model.db.models.media import MediaActorFile
|
||||||
from src.db.repository.media.actorfile import delete_mediaactorfile, import_mediaactorfile
|
from kontor_model.db.repository.media.actorfile import delete_mediaactorfile, import_mediaactorfile
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.media.actorfile import MediaActorFileModel, MediaActorFileResponse, actorfile_to_response
|
from kontor_model.schema.media.actorfile import MediaActorFileModel, MediaActorFileResponse, actorfile_to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
|
||||||
from src.db.models.media import MediaArticle
|
from kontor_model.db.models.media import MediaArticle
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.media.article import MediaArticleResponse, to_response
|
from kontor_model.schema.media.article import MediaArticleResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.media import MediaVideo
|
from kontor_model.db.models.media import MediaVideo
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.media.video import MediaVideoResponse, video_to_response
|
from kontor_model.schema.media.video import MediaVideoResponse, video_to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.tysc import Card
|
from kontor_model.db.models.tysc import Card
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.tysc.card import CardResponse, to_response
|
from kontor_model.schema.tysc.card import CardResponse, to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.tysc import CardSet
|
from kontor_model.db.models.tysc import CardSet
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.tysc.cardset import CardSetResponse, to_response
|
from kontor_model.schema.tysc.cardset import CardSetResponse, to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.tysc import FieldPosition
|
from kontor_model.db.models.tysc import FieldPosition
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.tysc.fieldposition import FieldPositionResponse, to_response
|
from kontor_model.schema.tysc.fieldposition import FieldPositionResponse, to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.tysc import Player
|
from kontor_model.db.models.tysc import Player
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.tysc.player import PlayerResponse, to_response
|
from kontor_model.schema.tysc.player import PlayerResponse, to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.tysc import Rooster
|
from kontor_model.db.models.tysc import Rooster
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.tysc.rooster import RoosterResponse, to_response
|
from kontor_model.schema.tysc.rooster import RoosterResponse, to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ from fastapi import APIRouter, HTTPException
|
|||||||
|
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.tysc.sport import SportResponse, to_response
|
from kontor_model.schema.tysc.sport import SportResponse, to_response
|
||||||
from src.db.models.tysc import Sport
|
from kontor_model.db.models.tysc import Sport
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.tysc import Team
|
from kontor_model.db.models.tysc import Team
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.tysc.team import TeamResponse, to_response
|
from kontor_model.schema.tysc.team import TeamResponse, to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.tysc import Vendor
|
from kontor_model.db.models.tysc import Vendor
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.tysc.vendor import VendorResponse, to_response
|
from kontor_model.schema.tysc.vendor import VendorResponse, to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.admin import Assignment
|
from kontor_model.db.models.admin import Assignment
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.user.assignment import AssignmentResponse, to_response
|
from kontor_model.schema.user.assignment import AssignmentResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
from src.db.models.admin import Permission
|
from kontor_model.db.models.admin import Permission
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.user.permission import PermissionResponse, to_response
|
from kontor_model.schema.user.permission import PermissionResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ from sqlalchemy import select
|
|||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
|
|
||||||
from src.core.security import CurrentUser
|
from src.core.security import CurrentUser
|
||||||
from src.db.models.admin import Profile
|
from kontor_model.db.models.admin import Profile
|
||||||
from src.db.repository.user import create_new_profile
|
from src.db.repository.user import create_new_profile
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.user.profile import ProfileResponse, ProfileModel, to_response
|
from kontor_model.schema.user.profile import ProfileResponse, ProfileModel, to_response
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ from typing import List
|
|||||||
|
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
|
||||||
from src.db.models.admin import Token
|
from kontor_model.db.models.admin import Token
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.user.token import TokenResponse, to_response
|
from kontor_model.schema.user.token import TokenResponse, to_response
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -15,15 +15,15 @@ from pydantic import ValidationError
|
|||||||
|
|
||||||
from src.core.config import settings
|
from src.core.config import settings
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.db.models.admin import Profile
|
from kontor_model.db.models.admin import Profile
|
||||||
from src.db.repository.admin import (
|
from kontor_model.db.repository.admin import (
|
||||||
get_profile_by_username,
|
get_profile_by_username,
|
||||||
get_profile_by_email,
|
get_profile_by_email,
|
||||||
is_database_empty,
|
is_database_empty,
|
||||||
)
|
)
|
||||||
from src.db.session import SessionLocal
|
from src.db.session import SessionLocal
|
||||||
from src.schema.admin.token import TokenData
|
from kontor_model.schema.admin.token import TokenData
|
||||||
from src.schema.user.profile import ProfileModel, to_model
|
from kontor_model.schema.user.profile import ProfileModel, to_model
|
||||||
|
|
||||||
oauth2_scheme = OAuth2PasswordBearer(
|
oauth2_scheme = OAuth2PasswordBearer(
|
||||||
tokenUrl="/token",
|
tokenUrl="/token",
|
||||||
@@ -163,7 +163,7 @@ async def get_current_user(
|
|||||||
async def get_current_active_user(
|
async def get_current_active_user(
|
||||||
current_user: Annotated[Profile, Security(get_current_user, scopes=["me"])],
|
current_user: Annotated[Profile, Security(get_current_user, scopes=["me"])],
|
||||||
) -> ProfileModel:
|
) -> ProfileModel:
|
||||||
if not current_user.enabled:
|
if not bool(current_user.enabled):
|
||||||
raise HTTPException(status_code=400, detail="Inactive user")
|
raise HTTPException(status_code=400, detail="Inactive user")
|
||||||
user_model = to_model(current_user)
|
user_model = to_model(current_user)
|
||||||
return user_model
|
return user_model
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
from datetime import datetime
|
|
||||||
from typing import List
|
|
||||||
|
|
||||||
from sqlalchemy import ForeignKey
|
|
||||||
from sqlalchemy.orm import relationship, mapped_column, Mapped
|
|
||||||
|
|
||||||
from src.db.models.base import Base, BaseMixin
|
|
||||||
|
|
||||||
|
|
||||||
class Profile(Base, BaseMixin):
|
|
||||||
__tablename__ = 'profile'
|
|
||||||
first_name: Mapped[str]
|
|
||||||
last_name: Mapped[str]
|
|
||||||
user_name: Mapped[str] = mapped_column(nullable=False)
|
|
||||||
email: Mapped[str]
|
|
||||||
password: Mapped[str]
|
|
||||||
enabled: Mapped[bool]
|
|
||||||
assignments: Mapped[List["Assignment"]] = relationship(back_populates="profile")
|
|
||||||
tokens: Mapped[List["Token"]] = relationship(back_populates="profile")
|
|
||||||
|
|
||||||
def get_full_name(self) -> str:
|
|
||||||
full_name: str = ""
|
|
||||||
if self.first_name is not None:
|
|
||||||
full_name += str(self.first_name)
|
|
||||||
if self.last_name is not None:
|
|
||||||
if len(full_name) > 0:
|
|
||||||
full_name += " "
|
|
||||||
full_name += str(self.last_name)
|
|
||||||
return full_name
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return f"Profile({self.id} {self.user_name}, {self.email})"
|
|
||||||
|
|
||||||
|
|
||||||
class Token(Base, BaseMixin):
|
|
||||||
__tablename__ = "token"
|
|
||||||
token: Mapped[str] = mapped_column(nullable=False, unique=True)
|
|
||||||
name: Mapped[str]
|
|
||||||
last_used_date: Mapped[datetime]
|
|
||||||
enabled: Mapped[bool]
|
|
||||||
profile_id = mapped_column(ForeignKey("profile.id"), nullable=False)
|
|
||||||
profile: Mapped[Profile] = relationship(back_populates="tokens")
|
|
||||||
|
|
||||||
|
|
||||||
class Permission(Base, BaseMixin):
|
|
||||||
__tablename__ = "permission"
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False)
|
|
||||||
assignments: Mapped[List["Assignment"]] = relationship(back_populates="permission")
|
|
||||||
|
|
||||||
|
|
||||||
class Assignment(Base, BaseMixin):
|
|
||||||
__tablename__ = "assignment"
|
|
||||||
profile_id = mapped_column(ForeignKey("profile.id"), nullable=False)
|
|
||||||
profile: Mapped[Profile] = relationship(back_populates="assignments")
|
|
||||||
permission_id = mapped_column(ForeignKey("permission.id"), nullable=False)
|
|
||||||
permission: Mapped[Permission] = relationship(back_populates="assignments")
|
|
||||||
|
|
||||||
|
|
||||||
class MailAccount(Base, BaseMixin):
|
|
||||||
__tablename__ = "mail_account"
|
|
||||||
host: Mapped[str]
|
|
||||||
port: Mapped[int]
|
|
||||||
protocol: Mapped[str]
|
|
||||||
user_name: Mapped[str]
|
|
||||||
password: Mapped[str]
|
|
||||||
start_tls: Mapped[bool]
|
|
||||||
|
|
||||||
|
|
||||||
class Mail(Base, BaseMixin):
|
|
||||||
__tablename__ = "mail"
|
|
||||||
folder: Mapped[str]
|
|
||||||
subject: Mapped[str]
|
|
||||||
body: Mapped[str]
|
|
||||||
sent_date: Mapped[datetime]
|
|
||||||
received_date: Mapped[datetime]
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
from typing import Optional
|
|
||||||
import uuid
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
from sqlalchemy import func
|
|
||||||
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
|
|
||||||
|
|
||||||
|
|
||||||
class Base(DeclarativeBase):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class BaseMixin:
|
|
||||||
id: Mapped[str] = mapped_column(primary_key=True, default=str(uuid.uuid4()))
|
|
||||||
created_date: Mapped[datetime] = mapped_column(default=func.now())
|
|
||||||
last_modified_date: Mapped[datetime] = mapped_column(default=func.now())
|
|
||||||
version: Mapped[int] = mapped_column(default=0)
|
|
||||||
|
|
||||||
|
|
||||||
class BaseVideoMixin:
|
|
||||||
cloud_link: Mapped[Optional[str]]
|
|
||||||
file_name: Mapped[Optional[str]]
|
|
||||||
path: Mapped[str]
|
|
||||||
review: Mapped[bool]
|
|
||||||
title: Mapped[str]
|
|
||||||
url: Mapped[str]
|
|
||||||
should_download: Mapped[bool]
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
from typing import List
|
|
||||||
|
|
||||||
from sqlalchemy import Column, ForeignKey, Integer, String
|
|
||||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
||||||
|
|
||||||
from src.db.models.base import Base, BaseMixin
|
|
||||||
|
|
||||||
|
|
||||||
class Article(Base, BaseMixin):
|
|
||||||
__tablename__ = 'article'
|
|
||||||
title: Mapped[str] = mapped_column(unique=True)
|
|
||||||
article_authors = relationship("ArticleAuthor")
|
|
||||||
|
|
||||||
|
|
||||||
class Author(Base, BaseMixin):
|
|
||||||
__tablename__ = 'author'
|
|
||||||
first_name: Mapped[str]
|
|
||||||
last_name: Mapped[str]
|
|
||||||
article_authors: Mapped[List["ArticleAuthor"]] = relationship(back_populates="author")
|
|
||||||
book_authors: Mapped[List["BookAuthor"]] = relationship(back_populates="author")
|
|
||||||
|
|
||||||
|
|
||||||
class BookshelfPublisher(Base, BaseMixin):
|
|
||||||
__tablename__ = 'bookshelf_publisher'
|
|
||||||
name: Mapped[str] = mapped_column(unique=True)
|
|
||||||
books: Mapped[List["Book"]] = relationship(back_populates="publisher")
|
|
||||||
|
|
||||||
|
|
||||||
class Book(Base, BaseMixin):
|
|
||||||
__tablename__ = 'book'
|
|
||||||
isbn: Mapped[str] = mapped_column(unique=True)
|
|
||||||
title: Mapped[str]
|
|
||||||
year: Mapped[int] = mapped_column(nullable=False)
|
|
||||||
publisher_id: Mapped[str] = mapped_column(ForeignKey("bookshelf_publisher.id"), nullable=False)
|
|
||||||
publisher: Mapped[BookshelfPublisher] = relationship(back_populates="books")
|
|
||||||
book_authors: Mapped[List["BookAuthor"]] = relationship(back_populates="book")
|
|
||||||
|
|
||||||
|
|
||||||
class ArticleAuthor(Base, BaseMixin):
|
|
||||||
__tablename__ = 'article_author'
|
|
||||||
article_id: Mapped[str] = mapped_column(ForeignKey("article.id"), nullable=False)
|
|
||||||
article: Mapped[Article] = relationship(back_populates="article_authors")
|
|
||||||
author_id: Mapped[str] = mapped_column(ForeignKey("author.id"), nullable=False)
|
|
||||||
author: Mapped[Author] = relationship(back_populates="article_authors")
|
|
||||||
|
|
||||||
|
|
||||||
class BookAuthor(Base, BaseMixin):
|
|
||||||
__tablename__ = 'book_author'
|
|
||||||
author_id: Mapped[str] = mapped_column(ForeignKey("author.id"), nullable=False)
|
|
||||||
author: Mapped[Author] = relationship(back_populates="book_authors")
|
|
||||||
book_id: Mapped[str] = mapped_column(ForeignKey("book.id"), nullable=False)
|
|
||||||
book: Mapped[Book] = relationship(back_populates="book_authors")
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
import uuid
|
|
||||||
from datetime import datetime
|
|
||||||
from typing import Dict, List, Optional, Any
|
|
||||||
from natsort import natsorted
|
|
||||||
from sqlalchemy import ForeignKey, func
|
|
||||||
from sqlalchemy.orm import relationship, Mapped, mapped_column
|
|
||||||
|
|
||||||
from src.db.models.base import Base, BaseMixin
|
|
||||||
|
|
||||||
|
|
||||||
class Publisher(Base):
|
|
||||||
__tablename__ = "publisher"
|
|
||||||
id: Mapped[str] = mapped_column(primary_key=True, default=uuid.uuid4)
|
|
||||||
created_date: Mapped[datetime] = mapped_column(default=func.now())
|
|
||||||
last_modified_date: Mapped[datetime] = mapped_column(default=func.now())
|
|
||||||
version: Mapped[int] = mapped_column(default=0)
|
|
||||||
name: Mapped[str] = mapped_column(unique=True)
|
|
||||||
weblink: Mapped[Optional[str]]
|
|
||||||
parent_publisher_id: Mapped[Optional[str]] = mapped_column(ForeignKey('publisher.id'))
|
|
||||||
parent_publisher: Mapped[Optional['Publisher']] = relationship(back_populates="imprints", remote_side=[id])
|
|
||||||
imprints: Mapped[List['Publisher']] = relationship(back_populates="parent_publisher")
|
|
||||||
comics: Mapped[List["Comic"]] = relationship(back_populates="publisher")
|
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
return f'Publisher({self.id} {self.name})'
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return self.__repr__()
|
|
||||||
|
|
||||||
|
|
||||||
class Comic(Base, BaseMixin):
|
|
||||||
__tablename__ = 'comic'
|
|
||||||
title: Mapped[str] = mapped_column(unique=True)
|
|
||||||
publisher_id: Mapped[str] = mapped_column(ForeignKey('publisher.id'), nullable=False)
|
|
||||||
publisher: Mapped[Publisher] = relationship(back_populates="comics")
|
|
||||||
current_order: Mapped[bool]
|
|
||||||
completed: Mapped[bool]
|
|
||||||
weblink: Mapped[Optional[str]]
|
|
||||||
issues: Mapped[List["Issue"]] = relationship(back_populates="comic", order_by="Issue.issue_number")
|
|
||||||
story_arcs: Mapped[List["StoryArc"]] = relationship(back_populates="comic")
|
|
||||||
trade_paperbacks: Mapped[List["TradePaperback"]] = relationship(back_populates="comic")
|
|
||||||
volumes: Mapped[List["Volume"]] = relationship(back_populates="comic")
|
|
||||||
comic_works: Mapped[List["ComicWork"]] = relationship(back_populates="comic")
|
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
return f'Comic({self.id} {self.version} {self.title} {self.publisher.name})'
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return f'{self.title}({self.id})'
|
|
||||||
|
|
||||||
def get_artists(self) -> Dict[Any, List[Any]]:
|
|
||||||
works: Dict[Any, List[Any]] = {}
|
|
||||||
for work in self.comic_works:
|
|
||||||
work_type = work.work_type
|
|
||||||
artist = work.artist
|
|
||||||
if work_type in works:
|
|
||||||
works[work_type].append(artist)
|
|
||||||
else:
|
|
||||||
works[work_type] = [artist]
|
|
||||||
return works
|
|
||||||
|
|
||||||
def sorted_issues(self):
|
|
||||||
sorted_issues = natsorted(self.issues, key=lambda x: getattr(x, 'issue_number'))
|
|
||||||
return sorted_issues
|
|
||||||
|
|
||||||
|
|
||||||
class Volume(Base, BaseMixin):
|
|
||||||
__tablename__ = "volume"
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False)
|
|
||||||
comic_id: Mapped[str] = mapped_column(ForeignKey("comic.id"), nullable=False)
|
|
||||||
comic: Mapped[Comic] = relationship(back_populates="volumes")
|
|
||||||
story_arcs: Mapped[List["StoryArc"]] = relationship(back_populates="volume")
|
|
||||||
issues: Mapped[List["Issue"]] = relationship(back_populates="volume")
|
|
||||||
|
|
||||||
|
|
||||||
class TradePaperback(Base, BaseMixin):
|
|
||||||
__tablename__ = "trade_paperback"
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False)
|
|
||||||
issue_start: Mapped[int]
|
|
||||||
issue_end: Mapped[int]
|
|
||||||
comic_id: Mapped[str] = mapped_column(ForeignKey("comic.id"), nullable=False)
|
|
||||||
comic: Mapped[Comic] = relationship(back_populates="trade_paperbacks")
|
|
||||||
|
|
||||||
|
|
||||||
class StoryArc(Base, BaseMixin):
|
|
||||||
__tablename__ = "story_arc"
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False)
|
|
||||||
comic_id: Mapped[str] = mapped_column(ForeignKey("comic.id"), nullable=False)
|
|
||||||
comic: Mapped[Comic] = relationship(back_populates="story_arcs")
|
|
||||||
volume_id: Mapped[str] = mapped_column(ForeignKey("volume.id"), nullable=True)
|
|
||||||
volume: Mapped[Volume] = relationship(back_populates="story_arcs")
|
|
||||||
issues: Mapped[List["Issue"]] = relationship(back_populates="story_arc")
|
|
||||||
|
|
||||||
|
|
||||||
class Issue(Base, BaseMixin):
|
|
||||||
__tablename__ = "issue"
|
|
||||||
issue_number: Mapped[str]
|
|
||||||
title: Mapped[Optional[str]]
|
|
||||||
published_on: Mapped[Optional[datetime]]
|
|
||||||
in_stock: Mapped[bool]
|
|
||||||
is_read: Mapped[bool]
|
|
||||||
comic_id: Mapped[str] = mapped_column(ForeignKey("comic.id"), nullable=False)
|
|
||||||
comic: Mapped[Comic] = relationship(back_populates="issues")
|
|
||||||
volume_id: Mapped[str] = mapped_column(ForeignKey("volume.id"), nullable=True)
|
|
||||||
volume: Mapped[Volume] = relationship(back_populates="issues")
|
|
||||||
story_arc_id: Mapped[str] = mapped_column(ForeignKey("story_arc.id"), nullable=True)
|
|
||||||
story_arc: Mapped[StoryArc] = relationship(back_populates="issues")
|
|
||||||
issue_works: Mapped[List["IssueWork"]] = relationship(back_populates="issue")
|
|
||||||
|
|
||||||
def get_full_title(self) -> str:
|
|
||||||
full_title: str = str(self.issue_number)
|
|
||||||
if self.title:
|
|
||||||
full_title += str(": " + self.title)
|
|
||||||
return full_title
|
|
||||||
|
|
||||||
def get_artists(self) -> Dict[Any, List[Any]]:
|
|
||||||
works: Dict[Any, List[Any]] = {}
|
|
||||||
for work in self.issue_works:
|
|
||||||
work_type = work.work_type
|
|
||||||
artist = work.artist
|
|
||||||
if work_type in works:
|
|
||||||
works[work_type].append(artist)
|
|
||||||
else:
|
|
||||||
works[work_type] = [artist]
|
|
||||||
return works
|
|
||||||
|
|
||||||
|
|
||||||
class Artist(Base, BaseMixin):
|
|
||||||
__tablename__ = "artist"
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False)
|
|
||||||
weblink: Mapped[str] = mapped_column(nullable=True)
|
|
||||||
comic_works: Mapped[List["ComicWork"]] = relationship(back_populates="artist")
|
|
||||||
issue_works: Mapped[List["IssueWork"]] = relationship(back_populates="artist")
|
|
||||||
|
|
||||||
def get_comics(self) -> Dict[Any, List[Comic]]:
|
|
||||||
works: Dict[Any, List[Comic]] = {}
|
|
||||||
for work in self.comic_works:
|
|
||||||
work_type = work.work_type
|
|
||||||
comic = work.comic
|
|
||||||
if work_type in works:
|
|
||||||
works[work_type].append(comic)
|
|
||||||
else:
|
|
||||||
works[work_type] = [comic]
|
|
||||||
return works
|
|
||||||
|
|
||||||
|
|
||||||
class WorkType(Base, BaseMixin):
|
|
||||||
__tablename__ = "worktype"
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False, unique=True)
|
|
||||||
comic_works: Mapped[List["ComicWork"]] = relationship(back_populates="work_type")
|
|
||||||
issue_works: Mapped[List["IssueWork"]] = relationship(back_populates="work_type")
|
|
||||||
|
|
||||||
def get_artists(self) -> Dict[str, List[Artist]]:
|
|
||||||
works: Dict[str, List[Artist]] = {}
|
|
||||||
for work in self.comic_works:
|
|
||||||
comic = work.comic.title
|
|
||||||
artist = work.artist
|
|
||||||
if comic in works:
|
|
||||||
works[comic].append(artist)
|
|
||||||
else:
|
|
||||||
works[comic] = [artist]
|
|
||||||
return works
|
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
return f'Worktype({self.id} {self.version} {self.name} {len(self.comic_works)})'
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return f'{self.name}({self.id})'
|
|
||||||
|
|
||||||
|
|
||||||
class ComicWork(Base, BaseMixin):
|
|
||||||
__tablename__ = "comic_work"
|
|
||||||
comic_id: Mapped[str] = mapped_column(ForeignKey("comic.id"), nullable=False)
|
|
||||||
comic: Mapped[Comic] = relationship(back_populates="comic_works")
|
|
||||||
artist_id: Mapped[str] = mapped_column(ForeignKey("artist.id"), nullable=False)
|
|
||||||
artist: Mapped[Artist] = relationship(back_populates="comic_works")
|
|
||||||
work_type_id: Mapped[str] = mapped_column(ForeignKey("worktype.id"), nullable=False)
|
|
||||||
work_type: Mapped[WorkType] = relationship(back_populates="comic_works")
|
|
||||||
|
|
||||||
|
|
||||||
class IssueWork(Base, BaseMixin):
|
|
||||||
__tablename__ = "issue_work"
|
|
||||||
issue_id: Mapped[str] = mapped_column(ForeignKey("issue.id"), nullable=False)
|
|
||||||
issue: Mapped[Issue] = relationship(back_populates="issue_works")
|
|
||||||
artist_id: Mapped[str] = mapped_column(ForeignKey("artist.id"), nullable=False)
|
|
||||||
artist: Mapped[Artist] = relationship(back_populates="issue_works")
|
|
||||||
work_type_id: Mapped[str] = mapped_column(ForeignKey("worktype.id"), nullable=False)
|
|
||||||
work_type: Mapped[WorkType] = relationship(back_populates="issue_works")
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
import logging
|
|
||||||
import re
|
|
||||||
import subprocess
|
|
||||||
from datetime import datetime
|
|
||||||
from pathlib import Path
|
|
||||||
from typing import List, Optional
|
|
||||||
|
|
||||||
import requests
|
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
from sqlalchemy import ForeignKey
|
|
||||||
from sqlalchemy.orm import Mapped, relationship, mapped_column
|
|
||||||
|
|
||||||
from src.db.models.base import Base, BaseMixin, BaseVideoMixin
|
|
||||||
|
|
||||||
|
|
||||||
class MediaFile(Base, BaseMixin, BaseVideoMixin):
|
|
||||||
"""
|
|
||||||
MediaFile represents video link.
|
|
||||||
"""
|
|
||||||
|
|
||||||
__tablename__ = "media_file"
|
|
||||||
media_actor_files: Mapped[List["MediaActorFile"]] = relationship(
|
|
||||||
back_populates="media_file"
|
|
||||||
)
|
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
return f"MediaFile({self.id} {self.title} {self.title})"
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return f"{self.title}({self.id})"
|
|
||||||
|
|
||||||
def update_title(self):
|
|
||||||
"""
|
|
||||||
Update title from url.
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
class MediaActor(Base, BaseMixin):
|
|
||||||
__tablename__ = "media_actor"
|
|
||||||
name: Mapped[str]
|
|
||||||
url: Mapped[Optional[str]] = mapped_column(unique=True)
|
|
||||||
media_actor_files = relationship("MediaActorFile")
|
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
|
||||||
return f"MediaActor({self.id} {self.name} {self.url})"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return f"{self.url}({self.id})"
|
|
||||||
|
|
||||||
|
|
||||||
class MediaActorFile(Base, BaseMixin):
|
|
||||||
__tablename__ = "media_actor_file"
|
|
||||||
media_actor_id: Mapped[str] = mapped_column(
|
|
||||||
ForeignKey("media_actor.id"), nullable=False
|
|
||||||
)
|
|
||||||
media_actor: Mapped[MediaActor] = relationship(back_populates="media_actor_files")
|
|
||||||
media_file_id: Mapped[str] = mapped_column(
|
|
||||||
ForeignKey("media_file.id"), nullable=True
|
|
||||||
)
|
|
||||||
media_file: Mapped[MediaFile] = relationship(back_populates="media_actor_files")
|
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
return f"MediaActorFile({self.id} {self.media_actor_id} {self.media_file_id})"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return f"{self.id} {self.media_actor_id} {self.media_file_id}"
|
|
||||||
|
|
||||||
|
|
||||||
class MediaArticle(Base, BaseMixin):
|
|
||||||
__tablename__ = "media_article"
|
|
||||||
review: Mapped[bool]
|
|
||||||
title: Mapped[str]
|
|
||||||
url: Mapped[str] = mapped_column(unique=True)
|
|
||||||
|
|
||||||
|
|
||||||
class MediaVideo(Base, BaseMixin):
|
|
||||||
"""
|
|
||||||
MediaFile represents video link.
|
|
||||||
"""
|
|
||||||
|
|
||||||
__tablename__ = "media_video"
|
|
||||||
cloud_link: Mapped[str]
|
|
||||||
file_name: Mapped[str]
|
|
||||||
path: Mapped[str]
|
|
||||||
review: Mapped[bool]
|
|
||||||
title: Mapped[str]
|
|
||||||
url: Mapped[str] = mapped_column(unique=True)
|
|
||||||
should_download: Mapped[bool]
|
|
||||||
|
|
||||||
def __repr__(self):
|
|
||||||
return f"MediaFile({self.id} {self.title} {self.url})"
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
if self.title is None:
|
|
||||||
return f"{self.url}({self.id})"
|
|
||||||
else:
|
|
||||||
return f"{self.title}({self.id})"
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
from typing import List
|
|
||||||
from sqlalchemy import ForeignKey, UniqueConstraint
|
|
||||||
from sqlalchemy.orm import relationship, mapped_column, Mapped
|
|
||||||
|
|
||||||
from src.db.models.base import Base, BaseMixin
|
|
||||||
|
|
||||||
|
|
||||||
class Sport(Base, BaseMixin):
|
|
||||||
__tablename__ = "sport"
|
|
||||||
__table_args__ = (
|
|
||||||
UniqueConstraint("name"),
|
|
||||||
)
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False, index=True, unique=True)
|
|
||||||
teams: Mapped[List["Team"]] = relationship(back_populates="sport")
|
|
||||||
positions: Mapped[List["FieldPosition"]] = relationship(back_populates="sport")
|
|
||||||
|
|
||||||
|
|
||||||
class Team(Base, BaseMixin):
|
|
||||||
__tablename__ = "team"
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False, index=True, unique=True)
|
|
||||||
short_name: Mapped[str] = mapped_column(nullable=False)
|
|
||||||
sport_id: Mapped[str] = mapped_column(ForeignKey("sport.id"), nullable=False)
|
|
||||||
sport: Mapped[Sport] = relationship(back_populates="teams")
|
|
||||||
roosters: Mapped[List["Rooster"]] = relationship(back_populates="team")
|
|
||||||
|
|
||||||
|
|
||||||
class FieldPosition(Base, BaseMixin):
|
|
||||||
__tablename__ = "field_position"
|
|
||||||
__table_args__ = (
|
|
||||||
UniqueConstraint("name", "sport_id"),
|
|
||||||
UniqueConstraint("short_name", "sport_id"),
|
|
||||||
)
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False, index=True)
|
|
||||||
short_name: Mapped[str] = mapped_column(nullable=False)
|
|
||||||
sport_id: Mapped[str] = mapped_column(ForeignKey("sport.id"), nullable=False, index=True)
|
|
||||||
sport: Mapped[Sport] = relationship(back_populates="positions")
|
|
||||||
roosters: Mapped[List["Rooster"]] = relationship(back_populates="position")
|
|
||||||
|
|
||||||
|
|
||||||
class Player(Base, BaseMixin):
|
|
||||||
__tablename__ = "player"
|
|
||||||
__table_args__ = (
|
|
||||||
UniqueConstraint("first_name", "last_name"),
|
|
||||||
)
|
|
||||||
first_name: Mapped[str] = mapped_column(nullable=False, index=True)
|
|
||||||
last_name: Mapped[str] = mapped_column(nullable=False, index=True)
|
|
||||||
roosters: Mapped[List["Rooster"]] = relationship(back_populates="player")
|
|
||||||
|
|
||||||
def get_full_name(self) -> str:
|
|
||||||
return f"{self.last_name}, {self.first_name}"
|
|
||||||
|
|
||||||
|
|
||||||
class Rooster(Base, BaseMixin):
|
|
||||||
__tablename__ = "rooster"
|
|
||||||
__table_args__ = (
|
|
||||||
UniqueConstraint("year", "team_id", "player_id", "position_id"),
|
|
||||||
)
|
|
||||||
year: Mapped[int]
|
|
||||||
team_id: Mapped[str] = mapped_column(ForeignKey("team.id"), nullable=False, index=True)
|
|
||||||
team: Mapped[Team] = relationship(back_populates="roosters")
|
|
||||||
player_id: Mapped[str] = mapped_column(ForeignKey("player.id"), nullable=False, index=True)
|
|
||||||
player: Mapped[Player] = relationship(back_populates="roosters")
|
|
||||||
position_id: Mapped[str] = mapped_column(ForeignKey("field_position.id"), nullable=False, index=True)
|
|
||||||
position: Mapped[FieldPosition] = relationship(back_populates="roosters")
|
|
||||||
cards: Mapped[List["Card"]] = relationship(back_populates="rooster")
|
|
||||||
|
|
||||||
|
|
||||||
class Vendor(Base, BaseMixin):
|
|
||||||
__tablename__ = "vendor"
|
|
||||||
name: Mapped[str] = mapped_column(nullable=False, unique=True, index=True)
|
|
||||||
card_sets: Mapped[List["CardSet"]] = relationship(back_populates="vendor")
|
|
||||||
cards: Mapped[List["Card"]] = relationship(back_populates="vendor")
|
|
||||||
|
|
||||||
|
|
||||||
class CardSet(Base, BaseMixin):
|
|
||||||
__tablename__ = "card_set"
|
|
||||||
__table_args__ = (
|
|
||||||
UniqueConstraint("name", "vendor_id"),
|
|
||||||
)
|
|
||||||
name: Mapped[str] = mapped_column(index=True)
|
|
||||||
parallel_set: Mapped[bool]
|
|
||||||
insert_set: Mapped[bool]
|
|
||||||
vendor_id: Mapped[str] = mapped_column(ForeignKey("vendor.id"), nullable=False, index=True)
|
|
||||||
vendor: Mapped[Vendor] = relationship(back_populates="card_sets")
|
|
||||||
cards: Mapped[List["Card"]] = relationship(back_populates="card_set")
|
|
||||||
|
|
||||||
|
|
||||||
class Card(Base, BaseMixin):
|
|
||||||
__tablename__ = "card"
|
|
||||||
__table_args__ = (
|
|
||||||
UniqueConstraint("card_number", "year", "vendor_id", "card_set_id"),
|
|
||||||
)
|
|
||||||
card_number: Mapped[int] = mapped_column(index=True)
|
|
||||||
year: Mapped[int] = mapped_column(index=True)
|
|
||||||
card_set_id: Mapped[str] = mapped_column(ForeignKey("card_set.id"), nullable=False)
|
|
||||||
card_set: Mapped[CardSet] = relationship(back_populates="cards")
|
|
||||||
rooster_id: Mapped[str] = mapped_column(ForeignKey("rooster.id"), nullable=False)
|
|
||||||
rooster: Mapped[Rooster] = relationship(back_populates="cards")
|
|
||||||
vendor_id: Mapped[str] = mapped_column(ForeignKey("vendor.id"), nullable=False)
|
|
||||||
vendor: Mapped[Vendor] = relationship(back_populates="cards")
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
from typing import List
|
|
||||||
|
|
||||||
from src.db.models.comic import Publisher
|
|
||||||
from src.schema.comics.comic import ComicResponse
|
|
||||||
from src.schema.comics.publisher import PublisherResponse
|
|
||||||
from src.schema.comics.publisher_details import PublisherDetailsResponse
|
|
||||||
|
|
||||||
|
|
||||||
def get_publisher_details(publisher: Publisher) -> PublisherDetailsResponse:
|
|
||||||
imprints: List[PublisherResponse] = []
|
|
||||||
for imprint in publisher.imprints:
|
|
||||||
imprints.append(PublisherResponse(id=imprint.id, name=str(imprint.name)))
|
|
||||||
comics: List[ComicResponse] = []
|
|
||||||
for comic in publisher.comics:
|
|
||||||
comics.append(
|
|
||||||
ComicResponse(id=comic.id, title=comic.title, completed=comic.completed)
|
|
||||||
)
|
|
||||||
parent_publisher: PublisherResponse | None = None
|
|
||||||
if publisher.parent_publisher:
|
|
||||||
parent_publisher = PublisherResponse(id=publisher.parent_publisher.id, name=str(publisher.parent_publisher.name))
|
|
||||||
response: PublisherDetailsResponse = PublisherDetailsResponse(
|
|
||||||
id=publisher.id, name=str(publisher.name), parent_publisher=parent_publisher, imprints=imprints, comics=comics
|
|
||||||
)
|
|
||||||
return response
|
|
||||||
@@ -2,10 +2,10 @@ from datetime import datetime
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
import uuid
|
import uuid
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.db.models.admin import Assignment, Profile
|
from kontor_model.db.models.admin import Assignment, Profile
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from src.schema.user.profile import ProfileModel
|
from kontor_model.schema.user.profile import ProfileModel
|
||||||
|
|
||||||
|
|
||||||
def create_new_profile(new_profile: ProfileModel, db: Session) -> Profile:
|
def create_new_profile(new_profile: ProfileModel, db: Session) -> Profile:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from src.apis.version1.admin.login import login_router
|
|||||||
from src.core.config import settings
|
from src.core.config import settings
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.core.middleware import RequestLoggingMiddleware
|
from src.core.middleware import RequestLoggingMiddleware
|
||||||
from src.db.models.base import Base
|
from kontor_model.db.models.base import Base
|
||||||
from src.db.session import engine
|
from src.db.session import engine
|
||||||
from src.db.utils import check_db_connected, check_db_disconnected
|
from src.db.utils import check_db_connected, check_db_disconnected
|
||||||
from src.webapps.base import api_router as web_app_router
|
from src.webapps.base import api_router as web_app_router
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{% extends "shared/base.html" %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
<title>Add a Lofi Link</title>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="text-danger font-weight-bold">
|
||||||
|
{% for error in errors %}
|
||||||
|
<li>{{error}}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-5">
|
||||||
|
<h3 class="text-center display-4">Add a Lofi Link</h3>
|
||||||
|
<form method="POST">
|
||||||
|
<div class="mb-3">
|
||||||
|
<input type="text" required class="form-control" name="url" value="{{url}}" placeholder="Lofi Link here">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
{% extends "shared/base.html" %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
<title>MediaLofi Detail</title>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h1 class="display-5">MediaLofi Detail</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">MediaLofi Title</th>
|
||||||
|
<td colspan="2">{{medialofi.title}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">MediaLofi URL</th>
|
||||||
|
<td colspan="2">{{medialofi.url}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">MediaLofi Download?</th>
|
||||||
|
<td colspan="2">{{medialofi.should_download}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">MediaLofi Review?</th>
|
||||||
|
<td colspan="2">{{medialofi.review}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Data Created</th>
|
||||||
|
<td colspan="2">{{medialofi.created_date}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Data Modified</th>
|
||||||
|
<td colspan="2">{{medialofi.last_modified_date}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Data Version</th>
|
||||||
|
<td colspan="2">{{medialofi.version}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{% extends "shared/base.html" %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
<title>Lofi Links</title>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% with msg=msg %}
|
||||||
|
{% include "components/alerts.html" %}
|
||||||
|
{% endwith %}
|
||||||
|
<div class="container">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead><tr>
|
||||||
|
<th scope="col">Titel</th>
|
||||||
|
<th scope="col">Review</th>
|
||||||
|
<th scope="col">Download</th>
|
||||||
|
</tr></thead>
|
||||||
|
<tbody>
|
||||||
|
{% for medialofi in medialofis %}
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><a href="/media/lofi/{{medialofi.id}}">{{medialofi.title}}</a></th>
|
||||||
|
<td>{% with check=medialofi.review %}{% include "components/check.html" %}{% endwith %}</td>
|
||||||
|
<td>{% with check=medialofi.should_download %}{% include "components/check.html" %}{% endwith %}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@@ -2,4 +2,5 @@
|
|||||||
<a href="/media/files/">MediaFiles</a>
|
<a href="/media/files/">MediaFiles</a>
|
||||||
<a href="/media/actors/">MediaActors</a>
|
<a href="/media/actors/">MediaActors</a>
|
||||||
<a href="/media/videos/">MediaVideos</a>
|
<a href="/media/videos/">MediaVideos</a>
|
||||||
|
<a href="/media/lofi/">MediaLofi</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ from typing import Optional
|
|||||||
from fastapi import APIRouter, Request
|
from fastapi import APIRouter, Request
|
||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
|
|
||||||
from src.db.models.admin import Permission, Profile
|
from kontor_model.db.models.admin import Permission, Profile
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
|
|
||||||
templates = Jinja2Templates(directory="src/templates")
|
templates = Jinja2Templates(directory="src/templates")
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from fastapi.templating import Jinja2Templates
|
|||||||
from src.webapps.admin import route_admin
|
from src.webapps.admin import route_admin
|
||||||
from src.webapps.auth import route_login
|
from src.webapps.auth import route_login
|
||||||
from src.webapps.comic import route_comics, route_worktype, route_artists
|
from src.webapps.comic import route_comics, route_worktype, route_artists
|
||||||
from src.webapps.media import route_actors, route_media, route_videos
|
from src.webapps.media import route_actors, route_lofi, route_media, route_videos
|
||||||
|
|
||||||
templates = Jinja2Templates(directory="src/templates")
|
templates = Jinja2Templates(directory="src/templates")
|
||||||
|
|
||||||
@@ -15,6 +15,7 @@ api_router.include_router(route_worktype.router, tags=["webapp"])
|
|||||||
api_router.include_router(route_media.router, tags=["webapp"])
|
api_router.include_router(route_media.router, tags=["webapp"])
|
||||||
api_router.include_router(route_actors.router, tags=["webapp"])
|
api_router.include_router(route_actors.router, tags=["webapp"])
|
||||||
api_router.include_router(route_videos.router, tags=["webapp"])
|
api_router.include_router(route_videos.router, tags=["webapp"])
|
||||||
|
api_router.include_router(route_lofi.router, tags=["webapp"])
|
||||||
api_router.include_router(route_login.router, tags=["webapp"])
|
api_router.include_router(route_login.router, tags=["webapp"])
|
||||||
api_router.include_router(route_admin.router, tags=["webapp"])
|
api_router.include_router(route_admin.router, tags=["webapp"])
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,13 @@ from fastapi import APIRouter, Request, status, Form
|
|||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
from fastapi.responses import RedirectResponse
|
from fastapi.responses import RedirectResponse
|
||||||
|
|
||||||
from src.db.models.comic import Artist
|
from kontor_model.db.models.comic import Artist
|
||||||
from typing import AnyStr
|
from typing import AnyStr
|
||||||
|
|
||||||
from src.db.repository.comics.artist import update_artist
|
from kontor_model.db.repository.comics.artist import update_artist
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
#from src.db.repository.comic import create_new_worktype, update_worktype
|
#from src.db.repository.comic import create_new_worktype, update_worktype
|
||||||
from src.main import logger
|
from kontor_model.schema.comics.artist import AddArtist
|
||||||
from src.schema.comics.artist import AddArtist
|
|
||||||
from src.webapps.comic.forms.artist import AddArtistForm
|
from src.webapps.comic.forms.artist import AddArtistForm
|
||||||
|
|
||||||
#from src.schema.comics.worktype import AddWorkType
|
#from src.schema.comics.worktype import AddWorkType
|
||||||
@@ -35,7 +34,7 @@ def edit_artist(db: SessionDep, request: Request, artist_id: str):
|
|||||||
return templates.TemplateResponse("comic/artist_edit.html", {"request": request, "artist_name": artist.name, "artist_link": artist.weblink})
|
return templates.TemplateResponse("comic/artist_edit.html", {"request": request, "artist_name": artist.name, "artist_link": artist.weblink})
|
||||||
|
|
||||||
@router.post("/artist/edit/{artist_id}")
|
@router.post("/artist/edit/{artist_id}")
|
||||||
async def edit_artist(request: Request, db: SessionDep, artist_id: str, action: str = Form(...), artist_name: str = Form(...), artist_link: str = Form(...)):
|
async def edit_artist_post(request: Request, db: SessionDep, artist_id: str, action: str = Form(...), artist_name: str = Form(...), artist_link: str = Form(...)):
|
||||||
if action == "cancel":
|
if action == "cancel":
|
||||||
return RedirectResponse(f"/comic/artists/{artist_id}", status_code=status.HTTP_303_SEE_OTHER)
|
return RedirectResponse(f"/comic/artists/{artist_id}", status_code=status.HTTP_303_SEE_OTHER)
|
||||||
form = AddArtistForm(request, artist_id, artist_name, artist_link)
|
form = AddArtistForm(request, artist_id, artist_name, artist_link)
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ from fastapi import APIRouter, Form, Request, status
|
|||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
from fastapi.responses import RedirectResponse
|
from fastapi.responses import RedirectResponse
|
||||||
|
|
||||||
from src.db.models.comic import Comic, Publisher, Issue
|
from kontor_model.db.models.comic import Comic, Publisher, Issue
|
||||||
from typing import AnyStr
|
from typing import AnyStr
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.db.repository.comics.comic import update_comic
|
from kontor_model.db.repository.comics.comic import update_comic
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.schema.comics.comic import ComicSchema
|
from kontor_model.schema.comics.comic import ComicSchema
|
||||||
from src.webapps.comic.forms.comic import ValidateComicForm
|
from src.webapps.comic.forms.comic import ValidateComicForm
|
||||||
|
|
||||||
templates = Jinja2Templates(directory="src/templates")
|
templates = Jinja2Templates(directory="src/templates")
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ from fastapi import APIRouter, Request, status
|
|||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
from fastapi.responses import RedirectResponse
|
from fastapi.responses import RedirectResponse
|
||||||
|
|
||||||
from src.db.models.comic import WorkType
|
from kontor_model.db.models.comic import WorkType
|
||||||
from typing import AnyStr
|
from typing import AnyStr
|
||||||
|
|
||||||
from src.db.repository.comics.worktype import create_new_worktype, update_worktype
|
from kontor_model.db.repository.comics.worktype import create_new_worktype, update_worktype
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.main import logger
|
from src.main import logger
|
||||||
from src.schema.comics.worktype import AddWorkType
|
from kontor_model.schema.comics.worktype import AddWorkType
|
||||||
from src.webapps.comic.forms.worktype import AddWorktypeForm
|
from src.webapps.comic.forms.worktype import AddWorktypeForm
|
||||||
|
|
||||||
templates = Jinja2Templates(directory="src/templates")
|
templates = Jinja2Templates(directory="src/templates")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ from typing import AnyStr
|
|||||||
|
|
||||||
from fastapi import APIRouter, Request
|
from fastapi import APIRouter, Request
|
||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
from src.db.models.media import MediaActor
|
from kontor_model.db.models.media import MediaActor
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
|
|
||||||
templates = Jinja2Templates(directory="src/templates")
|
templates = Jinja2Templates(directory="src/templates")
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from fastapi import APIRouter, Request, status, responses
|
||||||
|
from fastapi.security.utils import get_authorization_scheme_param
|
||||||
|
from fastapi.templating import Jinja2Templates
|
||||||
|
|
||||||
|
from src.core.security import get_current_user_from_token
|
||||||
|
from kontor_model.db.models.media import MediaLofi
|
||||||
|
from kontor_model.db.models.admin import Profile
|
||||||
|
from kontor_model.db.repository.media.lofi import create_new_lofi
|
||||||
|
from src.db.session import SessionDep
|
||||||
|
from src.webapps.media.forms import AddLinkForm
|
||||||
|
|
||||||
|
templates = Jinja2Templates(directory="src/templates")
|
||||||
|
router = APIRouter(include_in_schema=False, prefix="/media")
|
||||||
|
|
||||||
|
@router.get("/lofi")
|
||||||
|
def get_medialofis(db: SessionDep, request: Request, msg: Optional[str] = None):
|
||||||
|
medialofis = db.query(MediaLofi).all()
|
||||||
|
try:
|
||||||
|
token = request.cookies.get("access_token")
|
||||||
|
_, param = get_authorization_scheme_param(token) # scheme will hold "Bearer" and param will hold actual token value
|
||||||
|
current_user: Profile = get_current_user_from_token(token=param)
|
||||||
|
return templates.TemplateResponse("media/lofi_list.html", {"request": request, "msg": msg, "user": current_user, "medialofis": medialofis})
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
return templates.TemplateResponse("media/lofi_list.html", {"request": request, "msg": msg, "user": None, "medialofis": medialofis})
|
||||||
|
|
||||||
|
@router.get("/lofi/{lofi_id}")
|
||||||
|
def lofi_details(lofi_id: str, request: Request, db: SessionDep):
|
||||||
|
medialofi = db.get(MediaLofi, lofi_id)
|
||||||
|
return templates.TemplateResponse("media/lofi_detail.html", {"request": request, "medialofi":medialofi})
|
||||||
|
|
||||||
|
@router.get("/add-lofi")
|
||||||
|
def add_lofi_link(request: Request, db: SessionDep):
|
||||||
|
return templates.TemplateResponse("media/add_lofi_link.html", {"request": request})
|
||||||
|
|
||||||
|
@router.post("/add-lofi")
|
||||||
|
async def post_lofi_link(request: Request, db: SessionDep):
|
||||||
|
form = AddLinkForm(request)
|
||||||
|
await form.load_data()
|
||||||
|
if form.is_valid():
|
||||||
|
try:
|
||||||
|
#video = AddLink(**form.__dict__)
|
||||||
|
medialofi = create_new_lofi(url=str(form.url), db=db)
|
||||||
|
return responses.RedirectResponse(f"media/lofi/{medialofi.id}", status_code=status.HTTP_302_FOUND)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
form.__dict__.get("errors").append("Link already added")
|
||||||
|
return templates.TemplateResponse("media/add_lofi_link.html", form.__dict__)
|
||||||
|
return templates.TemplateResponse("media/add_lofi_link.html", form.__dict__)
|
||||||
@@ -6,8 +6,8 @@ from fastapi.templating import Jinja2Templates
|
|||||||
from sqlalchemy import or_
|
from sqlalchemy import or_
|
||||||
|
|
||||||
from src.core.security import get_current_user_from_token
|
from src.core.security import get_current_user_from_token
|
||||||
from src.db.models.admin import Profile
|
from kontor_model.db.models.admin import Profile
|
||||||
from src.db.models.media import MediaFile
|
from kontor_model.db.models.media import MediaFile
|
||||||
from src.core.log_conf import logger
|
from src.core.log_conf import logger
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ def get_mediafiles(db: SessionDep, request: Request, msg: str | None = None):
|
|||||||
try:
|
try:
|
||||||
token = request.cookies.get("access_token")
|
token = request.cookies.get("access_token")
|
||||||
scheme, param = get_authorization_scheme_param(token) # scheme will hold "Bearer" and param will hold actual token value
|
scheme, param = get_authorization_scheme_param(token) # scheme will hold "Bearer" and param will hold actual token value
|
||||||
current_user: Profile = get_current_user_from_token(token=param)
|
#current_user: Profile = get_current_user_from_token(token=param)
|
||||||
return templates.TemplateResponse("media/files.html", {"request": request, "msg": msg, "mediafiles": mediafiles})
|
return templates.TemplateResponse("media/files.html", {"request": request, "msg": msg, "mediafiles": mediafiles})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
from fastapi import APIRouter, Request, status, responses
|
from fastapi import APIRouter, Request, status, responses
|
||||||
from fastapi.security.utils import get_authorization_scheme_param
|
from fastapi.security.utils import get_authorization_scheme_param
|
||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
|
|
||||||
from src.core.security import get_current_user_from_token
|
from src.core.security import get_current_user_from_token
|
||||||
from src.db.models.media import MediaVideo
|
from kontor_model.db.models.media import MediaVideo
|
||||||
from src.db.models.admin import Profile
|
from kontor_model.db.models.admin import Profile
|
||||||
from src.db.repository.media.video import create_new_video
|
from kontor_model.db.repository.media.video import create_new_video
|
||||||
from src.db.session import SessionDep
|
from src.db.session import SessionDep
|
||||||
from src.webapps.media.forms import AddLinkForm
|
from src.webapps.media.forms import AddLinkForm
|
||||||
|
|
||||||
@@ -13,12 +15,12 @@ templates = Jinja2Templates(directory="src/templates")
|
|||||||
router = APIRouter(include_in_schema=False, prefix="/media")
|
router = APIRouter(include_in_schema=False, prefix="/media")
|
||||||
|
|
||||||
@router.get("/videos")
|
@router.get("/videos")
|
||||||
def get_mediavideos(db: SessionDep, request: Request, msg: str = None):
|
def get_mediavideos(db: SessionDep, request: Request, msg: Optional[str] = None):
|
||||||
mediavideos = db.query(MediaVideo).all()
|
mediavideos = db.query(MediaVideo).all()
|
||||||
try:
|
try:
|
||||||
token = request.cookies.get("access_token")
|
token = request.cookies.get("access_token")
|
||||||
_, param = get_authorization_scheme_param(token) # scheme will hold "Bearer" and param will hold actual token value
|
_, param = get_authorization_scheme_param(token) # scheme will hold "Bearer" and param will hold actual token value
|
||||||
current_user: Profile = get_current_user_from_token(token=param, db=db)
|
current_user: Profile = get_current_user_from_token(token=param)
|
||||||
return templates.TemplateResponse("media/videos.html", {"request": request, "msg": msg, "user": current_user, "mediavideos": mediavideos})
|
return templates.TemplateResponse("media/videos.html", {"request": request, "msg": msg, "user": current_user, "mediavideos": mediavideos})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
@@ -40,7 +42,7 @@ async def post_video_link(request: Request, db: SessionDep):
|
|||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
try:
|
try:
|
||||||
#video = AddLink(**form.__dict__)
|
#video = AddLink(**form.__dict__)
|
||||||
mediavideo = create_new_video(video=form, db=db)
|
mediavideo = create_new_video(url=str(form.url), db=db)
|
||||||
return responses.RedirectResponse(f"media/videos/{mediavideo.id}", status_code=status.HTTP_302_FOUND)
|
return responses.RedirectResponse(f"media/videos/{mediavideo.id}", status_code=status.HTTP_302_FOUND)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ from sqlalchemy import create_engine
|
|||||||
from sqlalchemy.orm import Session, sessionmaker
|
from sqlalchemy.orm import Session, sessionmaker
|
||||||
|
|
||||||
from src.apis.base import api_router
|
from src.apis.base import api_router
|
||||||
from src.db.models.base import Base
|
from kontor_model.db.models.base import Base
|
||||||
from src.db.session import get_db
|
from src.db.session import get_db
|
||||||
|
|
||||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
|
|||||||
Generated
+94
-42
@@ -524,12 +524,12 @@ dependencies = [
|
|||||||
{ name = "fastapi-jwt-auth" },
|
{ name = "fastapi-jwt-auth" },
|
||||||
{ name = "httpx" },
|
{ name = "httpx" },
|
||||||
{ name = "jinja2" },
|
{ name = "jinja2" },
|
||||||
|
{ name = "kontor-model" },
|
||||||
{ name = "msgspec", extra = ["toml", "yaml"] },
|
{ name = "msgspec", extra = ["toml", "yaml"] },
|
||||||
{ name = "natsort" },
|
{ name = "natsort" },
|
||||||
{ name = "pathlib" },
|
{ name = "pathlib" },
|
||||||
{ name = "platformdirs" },
|
{ name = "platformdirs" },
|
||||||
{ name = "psycopg2-binary" },
|
{ name = "psycopg2-binary" },
|
||||||
{ name = "pydantic", extra = ["email"] },
|
|
||||||
{ name = "pytest" },
|
{ name = "pytest" },
|
||||||
{ name = "pytest-cov" },
|
{ name = "pytest-cov" },
|
||||||
{ name = "python-dotenv" },
|
{ name = "python-dotenv" },
|
||||||
@@ -551,12 +551,12 @@ requires-dist = [
|
|||||||
{ name = "fastapi-jwt-auth", specifier = ">=0.5.0" },
|
{ name = "fastapi-jwt-auth", specifier = ">=0.5.0" },
|
||||||
{ name = "httpx", specifier = "==0.24.1" },
|
{ name = "httpx", specifier = "==0.24.1" },
|
||||||
{ name = "jinja2", specifier = ">=3.1.6" },
|
{ name = "jinja2", specifier = ">=3.1.6" },
|
||||||
|
{ name = "kontor-model", editable = "../kontor-model" },
|
||||||
{ name = "msgspec", extras = ["toml", "yaml"], specifier = ">=0.21.1" },
|
{ name = "msgspec", extras = ["toml", "yaml"], specifier = ">=0.21.1" },
|
||||||
{ name = "natsort", specifier = ">=8.4.0" },
|
{ name = "natsort", specifier = ">=8.4.0" },
|
||||||
{ name = "pathlib", specifier = ">=1.0.1" },
|
{ name = "pathlib", specifier = ">=1.0.1" },
|
||||||
{ name = "platformdirs", specifier = ">=4.3.7" },
|
{ name = "platformdirs", specifier = ">=4.3.7" },
|
||||||
{ name = "psycopg2-binary", specifier = ">=2.9.10" },
|
{ name = "psycopg2-binary", specifier = ">=2.9.10" },
|
||||||
{ name = "pydantic", extras = ["email"], specifier = ">=2.11.3" },
|
|
||||||
{ name = "pytest", specifier = "==7.4.0" },
|
{ name = "pytest", specifier = "==7.4.0" },
|
||||||
{ name = "pytest-cov", specifier = ">=6.1.1" },
|
{ name = "pytest-cov", specifier = ">=6.1.1" },
|
||||||
{ name = "python-dotenv", specifier = ">=1.1.0" },
|
{ name = "python-dotenv", specifier = ">=1.1.0" },
|
||||||
@@ -568,6 +568,23 @@ requires-dist = [
|
|||||||
{ name = "sqlmodel", specifier = ">=0.0.24" },
|
{ name = "sqlmodel", specifier = ">=0.0.24" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "kontor-model"
|
||||||
|
version = "0.3.0"
|
||||||
|
source = { editable = "../kontor-model" }
|
||||||
|
dependencies = [
|
||||||
|
{ name = "msgspec", extra = ["toml", "yaml"] },
|
||||||
|
{ name = "pydantic", extra = ["email"] },
|
||||||
|
{ name = "sqlalchemy" },
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.metadata]
|
||||||
|
requires-dist = [
|
||||||
|
{ name = "msgspec", extras = ["toml", "yaml"], specifier = ">=0.21.1" },
|
||||||
|
{ name = "pydantic", extras = ["email"], specifier = ">=2.13.4" },
|
||||||
|
{ name = "sqlalchemy", specifier = ">=2.0.52" },
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "markdown-it-py"
|
name = "markdown-it-py"
|
||||||
version = "3.0.0"
|
version = "3.0.0"
|
||||||
@@ -741,7 +758,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pydantic"
|
name = "pydantic"
|
||||||
version = "2.11.3"
|
version = "2.13.4"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "annotated-types" },
|
{ name = "annotated-types" },
|
||||||
@@ -749,9 +766,9 @@ dependencies = [
|
|||||||
{ name = "typing-extensions" },
|
{ name = "typing-extensions" },
|
||||||
{ name = "typing-inspection" },
|
{ name = "typing-inspection" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/10/2e/ca897f093ee6c5f3b0bee123ee4465c50e75431c3d5b6a3b44a47134e891/pydantic-2.11.3.tar.gz", hash = "sha256:7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3", size = 785513, upload-time = "2025-04-08T13:27:06.399Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/18/a5/b60d21ac674192f8ab0ba4e9fd860690f9b4a6e51ca5df118733b487d8d6/pydantic-2.13.4.tar.gz", hash = "sha256:c40756b57adaa8b1efeeced5c196f3f3b7c435f90e84ea7f443901bec8099ef6", size = 844775, upload-time = "2026-05-06T13:43:05.343Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/b0/1d/407b29780a289868ed696d1616f4aad49d6388e5a77f567dcd2629dcd7b8/pydantic-2.11.3-py3-none-any.whl", hash = "sha256:a082753436a07f9ba1289c6ffa01cd93db3548776088aa917cc43b63f68fa60f", size = 443591, upload-time = "2025-04-08T13:27:03.789Z" },
|
{ url = "https://files.pythonhosted.org/packages/fd/7b/122376b1fd3c62c1ed9dc80c931ace4844b3c55407b6fb2d199377c9736f/pydantic-2.13.4-py3-none-any.whl", hash = "sha256:45a282cde31d808236fd7ea9d919b128653c8b38b393d1c4ab335c62924d9aba", size = 472262, upload-time = "2026-05-06T13:43:02.641Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.optional-dependencies]
|
[package.optional-dependencies]
|
||||||
@@ -761,30 +778,58 @@ email = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pydantic-core"
|
name = "pydantic-core"
|
||||||
version = "2.33.1"
|
version = "2.46.4"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "typing-extensions" },
|
{ name = "typing-extensions" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/17/19/ed6a078a5287aea7922de6841ef4c06157931622c89c2a47940837b5eecd/pydantic_core-2.33.1.tar.gz", hash = "sha256:bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df", size = 434395, upload-time = "2025-04-02T09:49:41.8Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/9d/56/921726b776ace8d8f5db44c4ef961006580d91dc52b803c489fafd1aa249/pydantic_core-2.46.4.tar.gz", hash = "sha256:62f875393d7f270851f20523dd2e29f082bcc82292d66db2b64ea71f64b6e1c1", size = 471464, upload-time = "2026-05-06T13:37:06.98Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/7a/24/eed3466a4308d79155f1cdd5c7432c80ddcc4530ba8623b79d5ced021641/pydantic_core-2.33.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:70af6a21237b53d1fe7b9325b20e65cbf2f0a848cf77bed492b029139701e66a", size = 2033551, upload-time = "2025-04-02T09:47:51.648Z" },
|
{ url = "https://files.pythonhosted.org/packages/51/a2/5d30b469c5267a17b39dec53208222f76a8d351dfac4af661888c5aee77d/pydantic_core-2.46.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:5d5902252db0d3cedf8d4a1bc68f70eeb430f7e4c7104c8c476753519b423008", size = 2106306, upload-time = "2026-05-06T13:37:48.029Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/ab/14/df54b1a0bc9b6ded9b758b73139d2c11b4e8eb43e8ab9c5847c0a2913ada/pydantic_core-2.33.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:282b3fe1bbbe5ae35224a0dbd05aed9ccabccd241e8e6b60370484234b456266", size = 1852785, upload-time = "2025-04-02T09:47:53.149Z" },
|
{ url = "https://files.pythonhosted.org/packages/c1/81/4fa520eaffa8bd7d1525e644cd6d39e7d60b1592bc5b516693c7340b50f1/pydantic_core-2.46.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c94f0688e7b8d0a67abf40e57a7eaaecd17cc9586706a31b76c031f63df052b4", size = 1951906, upload-time = "2026-05-06T13:37:17.012Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/fa/96/e275f15ff3d34bb04b0125d9bc8848bf69f25d784d92a63676112451bfb9/pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b315e596282bbb5822d0c7ee9d255595bd7506d1cb20c2911a4da0b970187d3", size = 1897758, upload-time = "2025-04-02T09:47:55.006Z" },
|
{ url = "https://files.pythonhosted.org/packages/03/d5/fd02da45b659668b05923b17ba3a0100a0a3d5541e3bd8fcc4ecb711309e/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f027324c56cd5406ca49c124b0db10e56c69064fec039acc571c29020cc87c76", size = 1976802, upload-time = "2026-05-06T13:37:35.113Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/b7/d8/96bc536e975b69e3a924b507d2a19aedbf50b24e08c80fb00e35f9baaed8/pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1dfae24cf9921875ca0ca6a8ecb4bb2f13c855794ed0d468d6abbec6e6dcd44a", size = 1986109, upload-time = "2025-04-02T09:47:56.532Z" },
|
{ url = "https://files.pythonhosted.org/packages/21/f2/95727e1368be3d3ed485eaab7adbd7dda408f33f7a36e8b48e0144002b91/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e739fee756ba1010f8bcccb534252e85a35fe45ae92c295a06059ce58b74ccd3", size = 2052446, upload-time = "2026-05-06T13:37:12.313Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/90/72/ab58e43ce7e900b88cb571ed057b2fcd0e95b708a2e0bed475b10130393e/pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6dd8ecfde08d8bfadaea669e83c63939af76f4cf5538a72597016edfa3fad516", size = 2129159, upload-time = "2025-04-02T09:47:58.088Z" },
|
{ url = "https://files.pythonhosted.org/packages/9c/86/5d99feea3f77c7234b8718075b23db11532773c1a0dbd9b9490215dc2eeb/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d56801be94b86a9da183e5f3766e6310752b99ff647e38b09a9500d88e46e76", size = 2232757, upload-time = "2026-05-06T13:39:01.149Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/dc/3f/52d85781406886c6870ac995ec0ba7ccc028b530b0798c9080531b409fdb/pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2f593494876eae852dc98c43c6f260f45abdbfeec9e4324e31a481d948214764", size = 2680222, upload-time = "2025-04-02T09:47:59.591Z" },
|
{ url = "https://files.pythonhosted.org/packages/d2/3a/508ac615935ef7588cf6d9e9b91309fdc2da751af865e02a9098de88258c/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2412e734dcb48da14d4e4006b82b46b74f2518b8a26ee7e58c6844a6cd6d03c4", size = 2309275, upload-time = "2026-05-06T13:37:41.406Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/f4/56/6e2ef42f363a0eec0fd92f74a91e0ac48cd2e49b695aac1509ad81eee86a/pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:948b73114f47fd7016088e5186d13faf5e1b2fe83f5e320e371f035557fd264d", size = 2006980, upload-time = "2025-04-02T09:48:01.397Z" },
|
{ url = "https://files.pythonhosted.org/packages/07/f8/41db9de19d7987d6b04715a02b3b40aea467000275d9d758ffaa31af7d50/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9551187363ffc0de2a00b2e47c25aeaeb1020b69b668762966df15fc5659dd5a", size = 2094467, upload-time = "2026-05-06T13:39:18.847Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/4c/c0/604536c4379cc78359f9ee0aa319f4aedf6b652ec2854953f5a14fc38c5a/pydantic_core-2.33.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e11f3864eb516af21b01e25fac915a82e9ddad3bb0fb9e95a246067398b435a4", size = 2120840, upload-time = "2025-04-02T09:48:03.056Z" },
|
{ url = "https://files.pythonhosted.org/packages/2c/e2/f35033184cb11d0052daf4416e8e10a502ea2ac006fc4f459aee872727d1/pydantic_core-2.46.4-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:0186750b482eefa11d7f435892b09c5c606193ef3375bcf94aa00ae6bfb66262", size = 2134417, upload-time = "2026-05-06T13:40:17.944Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/1f/46/9eb764814f508f0edfb291a0f75d10854d78113fa13900ce13729aaec3ae/pydantic_core-2.33.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:549150be302428b56fdad0c23c2741dcdb5572413776826c965619a25d9c6bde", size = 2072518, upload-time = "2025-04-02T09:48:04.662Z" },
|
{ url = "https://files.pythonhosted.org/packages/7e/7b/6ceeb1cc90e193862f444ebe373d8fdf613f0a82572dde03fb10734c6c71/pydantic_core-2.46.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5855698a4856556d86e8e6cd8434bc3ac0314ee8e12089ae0e143f64c6256e4e", size = 2179782, upload-time = "2026-05-06T13:40:32.618Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/42/e3/fb6b2a732b82d1666fa6bf53e3627867ea3131c5f39f98ce92141e3e3dc1/pydantic_core-2.33.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:495bc156026efafd9ef2d82372bd38afce78ddd82bf28ef5276c469e57c0c83e", size = 2248025, upload-time = "2025-04-02T09:48:06.226Z" },
|
{ url = "https://files.pythonhosted.org/packages/5a/f2/c8d7773ede6af08036423a00ae0ceffce266c3c52a096c435d68c896083f/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:cbaf13819775b7f769bf4a1f066cb6df7a28d4480081a589828ef190226881cd", size = 2188782, upload-time = "2026-05-06T13:36:51.018Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/5c/9d/fbe8fe9d1aa4dac88723f10a921bc7418bd3378a567cb5e21193a3c48b43/pydantic_core-2.33.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ec79de2a8680b1a67a07490bddf9636d5c2fab609ba8c57597e855fa5fa4dacd", size = 2254991, upload-time = "2025-04-02T09:48:08.114Z" },
|
{ url = "https://files.pythonhosted.org/packages/59/31/0c864784e31f09f05cdd87606f08923b9c9e7f6e51dd27f20f62f975ce9f/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:633147d34cf4550417f12e2b1a0383973bdf5cdfde212cb09e9a581cf10820be", size = 2328334, upload-time = "2026-05-06T13:40:37.764Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/aa/99/07e2237b8a66438d9b26482332cda99a9acccb58d284af7bc7c946a42fd3/pydantic_core-2.33.1-cp313-cp313-win32.whl", hash = "sha256:ee12a7be1742f81b8a65b36c6921022301d466b82d80315d215c4c691724986f", size = 1915262, upload-time = "2025-04-02T09:48:09.708Z" },
|
{ url = "https://files.pythonhosted.org/packages/c2/eb/4f6c8a41efa30baa755590f4141abf3a8c370fab610915733e74134a7270/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:82cf5301172168103724d49a1444d3378cb20cdee30b116a1bd6031236298a5d", size = 2372986, upload-time = "2026-05-06T13:39:34.152Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/8a/f4/e457a7849beeed1e5defbcf5051c6f7b3c91a0624dd31543a64fc9adcf52/pydantic_core-2.33.1-cp313-cp313-win_amd64.whl", hash = "sha256:ede9b407e39949d2afc46385ce6bd6e11588660c26f80576c11c958e6647bc40", size = 1956626, upload-time = "2025-04-02T09:48:11.288Z" },
|
{ url = "https://files.pythonhosted.org/packages/5b/24/b375a480d53113860c299764bfe9f349a3dc9108b3adc0d7f0d786492ebf/pydantic_core-2.46.4-cp313-cp313-win32.whl", hash = "sha256:9fa8ae11da9e2b3126c6426f147e0fba88d96d65921799bb30c6abd1cb2c97fb", size = 1973693, upload-time = "2026-05-06T13:37:55.072Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/20/d0/e8d567a7cff7b04e017ae164d98011f1e1894269fe8e90ea187a3cbfb562/pydantic_core-2.33.1-cp313-cp313-win_arm64.whl", hash = "sha256:aa687a23d4b7871a00e03ca96a09cad0f28f443690d300500603bd0adba4b523", size = 1909590, upload-time = "2025-04-02T09:48:12.861Z" },
|
{ url = "https://files.pythonhosted.org/packages/7e/e8/cff247591966f2d22ec8c003cd7587e27b7ba7b81ab2fb888e3ab75dc285/pydantic_core-2.46.4-cp313-cp313-win_amd64.whl", hash = "sha256:6b3ace8194b0e5204818c92802dcdca7fc6d88aabbb799d7c795540d9cd6d292", size = 2071819, upload-time = "2026-05-06T13:38:49.139Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/ef/fd/24ea4302d7a527d672c5be06e17df16aabfb4e9fdc6e0b345c21580f3d2a/pydantic_core-2.33.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:401d7b76e1000d0dd5538e6381d28febdcacb097c8d340dde7d7fc6e13e9f95d", size = 1812963, upload-time = "2025-04-02T09:48:14.553Z" },
|
{ url = "https://files.pythonhosted.org/packages/c6/1a/f4aee670d5670e9e148e0c82c7db98d780be566c6e6a97ee8035528ca0b3/pydantic_core-2.46.4-cp313-cp313-win_arm64.whl", hash = "sha256:184c081504d17f1c1066e430e117142b2c77d9448a97f7b65c6ac9fd9aee238d", size = 2027411, upload-time = "2026-05-06T13:40:45.796Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/5f/95/4fbc2ecdeb5c1c53f1175a32d870250194eb2fdf6291b795ab08c8646d5d/pydantic_core-2.33.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7aeb055a42d734c0255c9e489ac67e75397d59c6fbe60d155851e9782f276a9c", size = 1986896, upload-time = "2025-04-02T09:48:16.222Z" },
|
{ url = "https://files.pythonhosted.org/packages/8d/74/228a26ddad29c6672b805d9fd78e8d251cd04004fa7eed0e622096cd0250/pydantic_core-2.46.4-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:428e04521a40150c85216fc8b85e8d39fece235a9cf5e383761238c7fa9b96fb", size = 2102079, upload-time = "2026-05-06T13:38:41.019Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/71/ae/fe31e7f4a62431222d8f65a3bd02e3fa7e6026d154a00818e6d30520ea77/pydantic_core-2.33.1-cp313-cp313t-win_amd64.whl", hash = "sha256:338ea9b73e6e109f15ab439e62cb3b78aa752c7fd9536794112e14bee02c8d18", size = 1931810, upload-time = "2025-04-02T09:48:17.97Z" },
|
{ url = "https://files.pythonhosted.org/packages/ad/1f/8970b150a4b4365623ae00fc88603491f763c627311ae8031e3111356d6e/pydantic_core-2.46.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:23ace664830ee0bfe014a0c7bc248b1f7f25ed7ad103852c317624a1083af462", size = 1952179, upload-time = "2026-05-06T13:36:59.812Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/95/30/5211a831ae054928054b2f79731661087a2bc5c01e825c672b3a4a8f1b3e/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce5c1d2a8b27468f433ca974829c44060b8097eedc39933e3c206a90ee49c4a9", size = 1978926, upload-time = "2026-05-06T13:37:39.933Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/57/e9/689668733b1eb67adeef047db3c2e8788fcf65a7fd9c9e2b46b7744fe245/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7283d57845ecf5a163403eb0702dfc220cc4fbdd18919cb5ccea4f95ee1cdab4", size = 2046785, upload-time = "2026-05-06T13:38:01.995Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/60/d9/6715260422ff50a2109878fd24d948a6c3446bb2664f34ee78cd972b3acd/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8daafc69c93ee8a0204506a3b6b30f586ef54028f52aeeeb5c4cfc5184fd5914", size = 2228733, upload-time = "2026-05-06T13:40:50.371Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/18/ae/fdb2f64316afca925640f8e70bb1a564b0ec2721c1389e25b8eb4bf9a299/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd2213145bcc2ba85884d0ac63d222fece9209678f77b9b4d76f054c561adb28", size = 2307534, upload-time = "2026-05-06T13:37:21.531Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/89/1d/8eff589b45bb8190a9d12c49cfad0f176a5cbd1534908a6b5125e2886239/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a5f930472650a82629163023e630d160863fce524c616f4e5186e5de9d9a49b", size = 2099732, upload-time = "2026-05-06T13:39:31.942Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/06/d5/ee5a3366637fee41dee51a1fc91562dcf12ddbc68fda34e6b253da2324bb/pydantic_core-2.46.4-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:c1b3f518abeca3aa13c712fd202306e145abf59a18b094a6bafb2d2bbf59192c", size = 2129627, upload-time = "2026-05-06T13:37:25.033Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/94/33/2414be571d2c6a6c4d08be21f9292b6d3fdb08949a97b6dfe985017821db/pydantic_core-2.46.4-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a7dd0b3ee80d90150e3495a3a13ac34dbcbfd4f012996a6a1d8900e91b5c0fb", size = 2179141, upload-time = "2026-05-06T13:37:14.046Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/7b/79/7daa95be995be0eecc4cf75064cb33f9bbbfe3fe0158caf2f0d4a996a5c7/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:3fb702cd90b0446a3a1c5e470bfa0dd23c0233b676a9099ddcc964fa6ca13898", size = 2184325, upload-time = "2026-05-06T13:36:53.615Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/9f/cb/d0a382f5c0de8a222dc61c65348e0ce831b1f68e0a018450d31c2cace3a5/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:b8458003118a712e66286df6a707db01c52c0f52f7db8e4a38f0da1d3b94fc4e", size = 2323990, upload-time = "2026-05-06T13:40:29.971Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/05/db/d9ba624cc4a5aced1598e88c04fdbd8310c8a69b9d38b9a3d39ce3a61ed7/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:372429a130e469c9cd698925ce5fc50940b7a1336b0d82038e63d5bbc4edc519", size = 2369978, upload-time = "2026-05-06T13:37:23.027Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/f2/20/d15df15ba918c423461905802bfd2981c3af0bfa0e40d05e13edbfa48bc3/pydantic_core-2.46.4-cp314-cp314-win32.whl", hash = "sha256:85bb3611ff1802f3ee7fdd7dbff26b56f343fb432d57a4728fdd49b6ef35e2f4", size = 1966354, upload-time = "2026-05-06T13:38:03.499Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/fc/b6/6b8de4c0a7d7ab3004c439c80c5c1e0a3e8d78bbae19379b01960383d9e5/pydantic_core-2.46.4-cp314-cp314-win_amd64.whl", hash = "sha256:811ff8e9c313ab425368bcbb36e5c4ebd7108c2bbf4e4089cfbb0b01eff63fac", size = 2072238, upload-time = "2026-05-06T13:39:40.807Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/32/36/51eb763beec1f4cf59b1db243a7dcc39cbb41230f050a09b9d69faaf0a48/pydantic_core-2.46.4-cp314-cp314-win_arm64.whl", hash = "sha256:bfec22eab3c8cc2ceec0248aec886624116dc079afa027ecc8ad4a7e62010f8a", size = 2018251, upload-time = "2026-05-06T13:37:26.72Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/e8/91/855af51d625b23aa987116a19e231d2aaef9c4a415273ddc189b79a45fee/pydantic_core-2.46.4-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:af8244b2bef6aaad6d92cda81372de7f8c8d36c9f0c3ea36e827c60e7d9467a0", size = 2099593, upload-time = "2026-05-06T13:39:47.682Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/fb/1b/8784a54c65edb5f49f0a14d6977cf1b209bba85a4c77445b255c2de58ab3/pydantic_core-2.46.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a4330cdbc57162e4b3aa303f588ba752257694c9c9be3e7ebb11b4aca659b5d", size = 1935226, upload-time = "2026-05-06T13:40:40.428Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/e8/e7/1955d28d1afc56dd4b3ad7cc0cf39df1b9852964cf16e5d13912756d6d6b/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29c61fc04a3d840155ff08e475a04809278972fe6aef51e2720554e96367e34b", size = 1974605, upload-time = "2026-05-06T13:37:32.029Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/93/e2/3fedbf0ba7a22850e6e9fd78117f1c0f10f950182344d8a6c535d468fdd8/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c50f2528cf200c5eed56faf3f4e22fcd5f38c157a8b78576e6ba3168ec35f000", size = 2030777, upload-time = "2026-05-06T13:38:55.239Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/f8/61/46be275fcaaba0b4f5b9669dd852267ce1ff616592dccf7a7845588df091/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0cbe8b01f948de4286c74cdd6c667aceb38f5c1e26f0693b3983d9d74887c65e", size = 2236641, upload-time = "2026-05-06T13:37:08.096Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/60/db/12e93e46a8bac9988be3c016860f83293daea8c716c029c9ace279036f2f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:617d7e2ca7dcb8c5cf6bcb8c59b8832c94b36196bbf1cbd1bfb56ed341905edd", size = 2286404, upload-time = "2026-05-06T13:40:20.221Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/e2/4a/4d8b19008f38d31c53b8219cfedc2e3d5de5fe99d90076b7e767de29274f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7027560ee92211647d0d34e3f7cd6f50da56399d26a9c8ad0da286d3869a53f3", size = 2109219, upload-time = "2026-05-06T13:38:12.153Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/88/70/3cbc40978fefb7bb09c6708d40d4ad1a5d70fd7213c3d17f971de868ec1f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:f99626688942fb746e545232e7726926f3be91b5975f8b55327665fafda991c7", size = 2110594, upload-time = "2026-05-06T13:40:02.971Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/9d/20/b8d36736216e29491125531685b2f9e61aa5b4b2599893f8268551da3338/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fc3e9034a63de20e15e8ade85358bc6efc614008cab72898b4b4952bea0509ff", size = 2159542, upload-time = "2026-05-06T13:39:27.506Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/1d/a2/367df868eb584dacf6bf82a389272406d7178e301c4ac82545ab98bc2dd9/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:97e7cf2be5c77b7d1a9713a05605d49460d02c6078d38d8bef3cbe323c548424", size = 2168146, upload-time = "2026-05-06T13:38:31.93Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/c1/b8/4460f77f7e201893f649a29ab355dddd3beee8a97bcb1a320db414f9a06e/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:3bf92c5d0e00fefaab325a4d27828fe6b6e2a21848686b5b60d2d9eeb09d76c6", size = 2306309, upload-time = "2026-05-06T13:37:44.717Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/64/c4/be2639293acd87dc8ddbcec41a73cee9b2ebf996fe6d892a1a74e88ad3f7/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:3ecbc122d18468d06ca279dc26a8c2e2d5acb10943bb35e36ae92096dc3b5565", size = 2369736, upload-time = "2026-05-06T13:37:05.645Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/30/a6/9f9f380dbb301f67023bf8f707aaa75daadf84f7152d95c410fd7e81d994/pydantic_core-2.46.4-cp314-cp314t-win32.whl", hash = "sha256:e846ae7835bf0703ae43f534ab79a867146dadd59dc9ca5c8b53d5c8f7c9ef02", size = 1955575, upload-time = "2026-05-06T13:38:51.116Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/40/1f/f1eb9eb350e795d1af8586289746f5c5677d16043040d63710e22abc43c9/pydantic_core-2.46.4-cp314-cp314t-win_amd64.whl", hash = "sha256:2108ba5c1c1eca18030634489dc544844144ee36357f2f9f780b93e7ddbb44b5", size = 2051624, upload-time = "2026-05-06T13:38:21.672Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/f6/d2/42dd53d0a85c27606f316d3aa5d2869c4e8470a5ed6dec30e4a1abe19192/pydantic_core-2.46.4-cp314-cp314t-win_arm64.whl", hash = "sha256:4fcbe087dbc2068af7eda3aa87634eba216dbda64d1ae73c8684b621d33f6596", size = 2017325, upload-time = "2026-05-06T13:40:52.723Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -979,23 +1024,30 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlalchemy"
|
name = "sqlalchemy"
|
||||||
version = "2.0.40"
|
version = "2.0.52"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "greenlet", marker = "(python_full_version < '3.14' and platform_machine == 'AMD64') or (python_full_version < '3.14' and platform_machine == 'WIN32') or (python_full_version < '3.14' and platform_machine == 'aarch64') or (python_full_version < '3.14' and platform_machine == 'amd64') or (python_full_version < '3.14' and platform_machine == 'ppc64le') or (python_full_version < '3.14' and platform_machine == 'win32') or (python_full_version < '3.14' and platform_machine == 'x86_64')" },
|
{ name = "greenlet", marker = "platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'" },
|
||||||
{ name = "typing-extensions" },
|
{ name = "typing-extensions" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/68/c3/3f2bfa5e4dcd9938405fe2fab5b6ab94a9248a4f9536ea2fd497da20525f/sqlalchemy-2.0.40.tar.gz", hash = "sha256:d827099289c64589418ebbcaead0145cd19f4e3e8a93919a0100247af245fa00", size = 9664299, upload-time = "2025-03-27T17:52:31.876Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/3b/21/77b4c147963073040dc3c3a5cb7a8c3001a1893c0209432cb77f9df836aa/sqlalchemy-2.0.52.tar.gz", hash = "sha256:5e2d46356ac2ccb7d268ab6c2319ac6a2b42f1b8d5fd8bd3d46855cd82abee97", size = 9945637, upload-time = "2026-08-11T19:07:09.829Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/8c/18/4e3a86cc0232377bc48c373a9ba6a1b3fb79ba32dbb4eda0b357f5a2c59d/sqlalchemy-2.0.40-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:915866fd50dd868fdcc18d61d8258db1bf9ed7fbd6dfec960ba43365952f3b01", size = 2107887, upload-time = "2025-03-27T18:40:05.461Z" },
|
{ url = "https://files.pythonhosted.org/packages/7f/18/e30c6fe1eca1bf34a39fbdd6066121cc9974c850faf6f349eac563697a26/sqlalchemy-2.0.52-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2eb3c6a64b1bfe6704777cfd504e7b8ad093a5f3e03ce67663a5e6742f294e43", size = 2167724, upload-time = "2026-08-11T20:58:12.679Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/cb/60/9fa692b1d2ffc4cbd5f47753731fd332afed30137115d862d6e9a1e962c7/sqlalchemy-2.0.40-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4a4c5a2905a9ccdc67a8963e24abd2f7afcd4348829412483695c59e0af9a705", size = 2098367, upload-time = "2025-03-27T18:40:07.182Z" },
|
{ url = "https://files.pythonhosted.org/packages/d0/56/2e17d161a4f7ecc1c2ffb93e607b4e1898bb551b451b283235acb8f6ce47/sqlalchemy-2.0.52-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:923bb183c1dc64fdf7b717965e3d59938ec4f8b8710b419a21ce403e5da9a9e1", size = 3321189, upload-time = "2026-08-11T21:02:41.932Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/4c/9f/84b78357ca641714a439eb3fbbddb17297dacfa05d951dbf24f28d7b5c08/sqlalchemy-2.0.40-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55028d7a3ebdf7ace492fab9895cbc5270153f75442a0472d8516e03159ab364", size = 3184806, upload-time = "2025-03-27T18:51:29.356Z" },
|
{ url = "https://files.pythonhosted.org/packages/cf/b8/8490916e893f3f8d74dc9cc54c078619364999dee37047a188e73abbc852/sqlalchemy-2.0.52-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:651d6d8782e80679e6151707c7b490834d46ada526328895abf567f25e63d29c", size = 3338185, upload-time = "2026-08-11T21:17:02.597Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/4b/7d/e06164161b6bfce04c01bfa01518a20cccbd4100d5c951e5a7422189191a/sqlalchemy-2.0.40-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6cfedff6878b0e0d1d0a50666a817ecd85051d12d56b43d9d425455e608b5ba0", size = 3198131, upload-time = "2025-03-27T18:50:31.616Z" },
|
{ url = "https://files.pythonhosted.org/packages/8b/f7/752cc8ee453da222829b3f5c4613614bf750d97429363b70414fa10478e4/sqlalchemy-2.0.52-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b08cddb8989775e3c88799d86704bdfc3ee6e9846118201aa5997f16f27e3a15", size = 3271698, upload-time = "2026-08-11T21:02:43.963Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/6d/51/354af20da42d7ec7b5c9de99edafbb7663a1d75686d1999ceb2c15811302/sqlalchemy-2.0.40-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bb19e30fdae77d357ce92192a3504579abe48a66877f476880238a962e5b96db", size = 3131364, upload-time = "2025-03-27T18:51:31.336Z" },
|
{ url = "https://files.pythonhosted.org/packages/51/e6/074ade0c07b9e4c8e8bca46820320ed94df9702afdb6f2af06623068d2e6/sqlalchemy-2.0.52-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ab66fa9618269390d4dfa222f2f2f88f7bc4bf5da13905131b818217db7e8057", size = 3308936, upload-time = "2026-08-11T21:17:04.172Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/7a/2f/48a41ff4e6e10549d83fcc551ab85c268bde7c03cf77afb36303c6594d11/sqlalchemy-2.0.40-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:16d325ea898f74b26ffcd1cf8c593b0beed8714f0317df2bed0d8d1de05a8f26", size = 3159482, upload-time = "2025-03-27T18:50:33.201Z" },
|
{ url = "https://files.pythonhosted.org/packages/66/07/557c0d04716705599227945ac14e0a17ad0338e899f37d8c2ddff4dcc663/sqlalchemy-2.0.52-cp313-cp313-win32.whl", hash = "sha256:c63bda077685c85ca513286547a531ba57e7a68cf0a7ed3bafcc2bbd18896f4d", size = 2127308, upload-time = "2026-08-11T21:14:53.879Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/33/ac/e5e0a807163652a35be878c0ad5cfd8b1d29605edcadfb5df3c512cdf9f3/sqlalchemy-2.0.40-cp313-cp313-win32.whl", hash = "sha256:a669cbe5be3c63f75bcbee0b266779706f1a54bcb1000f302685b87d1b8c1500", size = 2080704, upload-time = "2025-03-27T18:46:00.193Z" },
|
{ url = "https://files.pythonhosted.org/packages/96/4e/226eda27654318ce525d043025221f689abef883da2c7126f9065121618c/sqlalchemy-2.0.52-cp313-cp313-win_amd64.whl", hash = "sha256:9876b09b9f1ce7398b0ffece585c0a911244c53191187341f6bcae640e133751", size = 2153876, upload-time = "2026-08-11T21:14:55.527Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/1c/cb/f38c61f7f2fd4d10494c1c135ff6a6ddb63508d0b47bccccd93670637309/sqlalchemy-2.0.40-cp313-cp313-win_amd64.whl", hash = "sha256:641ee2e0834812d657862f3a7de95e0048bdcb6c55496f39c6fa3d435f6ac6ad", size = 2104564, upload-time = "2025-03-27T18:46:01.442Z" },
|
{ url = "https://files.pythonhosted.org/packages/d5/f5/71cb30af58c9b80a4e1fac0b73bb48f86d497a774a6a2eb6d2f1e657bb73/sqlalchemy-2.0.52-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:410d52be41d17f1a236d19520fbe776257dc16516ed06bd16d433311842aefd9", size = 2169537, upload-time = "2026-08-11T20:58:13.855Z" },
|
||||||
{ url = "https://files.pythonhosted.org/packages/d1/7c/5fc8e802e7506fe8b55a03a2e1dab156eae205c91bee46305755e086d2e2/sqlalchemy-2.0.40-py3-none-any.whl", hash = "sha256:32587e2e1e359276957e6fe5dad089758bc042a971a8a09ae8ecf7a8fe23d07a", size = 1903894, upload-time = "2025-03-27T18:40:43.796Z" },
|
{ url = "https://files.pythonhosted.org/packages/4c/93/d07ebd645d1b07b6b5ed63450a70f063a346a7e0f2c8810daf2e532400cb/sqlalchemy-2.0.52-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dfe9ce533dbe4d0a2ae1486546619bd30b76bcd670539a44d910361376175f5e", size = 3319606, upload-time = "2026-08-11T21:02:45.829Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/ae/5c/290c84c7c2566ecd3b65baaae0fddec9bc33b033b398a06123bb86fbfc6e/sqlalchemy-2.0.52-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:812bae5138bfc0aa46fb0686da0fc7f581f68e2bbb05bc24c3713bebaedd1437", size = 3323642, upload-time = "2026-08-11T21:17:05.675Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/13/f5/2cc160590ca49173359557880b92a0572293ccb899e8f6cedf150c5a3ddf/sqlalchemy-2.0.52-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:50bff43b632a56fbf5ed9afdd76307e1512b62051bcd5afb341ae67205bbb6c8", size = 3268125, upload-time = "2026-08-11T21:02:47.649Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/35/f3/ea8933fc9f7d1353e9c2ff9965eae687c4cef181120574591ed2fa0633e1/sqlalchemy-2.0.52-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:49565daf5af554f538e23aef1fc81a95a4e49658f152285e45c02f5fc44f04cd", size = 3289516, upload-time = "2026-08-11T21:17:07.267Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/45/67/05cf86541c1e1716fca1e4a996954a439cd74501707cda607fb7cb02ef50/sqlalchemy-2.0.52-cp314-cp314-win32.whl", hash = "sha256:ab9da41e61b9979b910499d633b241df20c51ee5037e5405b11c2faac3cbe1a2", size = 2130249, upload-time = "2026-08-11T21:14:57.273Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/96/d7/8ac6ffa1e36169e762ef65bd835046abb2251b1bc17f8f6708e14ed8d31f/sqlalchemy-2.0.52-cp314-cp314-win_amd64.whl", hash = "sha256:a593db51b3bae75db17a5738ad5f992244b3a03863f83c28117ee482c6a3f76d", size = 2156718, upload-time = "2026-08-11T21:14:58.667Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/dc/4b/e01a737eef378e734cc6394a82248a6ce13b167dfa36c731075ce9fc9c64/sqlalchemy-2.0.52-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1e61d08bdf4ee2f41024569e3400de7d6734ba498144766b11260936ccfa582", size = 2190344, upload-time = "2026-08-11T19:53:21.393Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/b3/3f/3582293d1e185e71d19d7c731c3e2ee20ba21981c4a1115c0806c1f62120/sqlalchemy-2.0.52-py3-none-any.whl", hash = "sha256:3b81b8363a919ce53453591cdb93702e6bd54ade6c4fa2f468fc053baee5ed89", size = 1950700, upload-time = "2026-08-11T20:47:21.603Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1049,23 +1101,23 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typing-extensions"
|
name = "typing-extensions"
|
||||||
version = "4.13.2"
|
version = "4.16.0"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef", size = 106967, upload-time = "2025-04-10T14:19:05.416Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", size = 45806, upload-time = "2025-04-10T14:19:03.967Z" },
|
{ url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typing-inspection"
|
name = "typing-inspection"
|
||||||
version = "0.4.0"
|
version = "0.4.4"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "typing-extensions" },
|
{ name = "typing-extensions" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz", hash = "sha256:9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122", size = 76222, upload-time = "2025-02-25T17:27:59.638Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/a3/26/b09b8010994eccc3c09092e6b34058f36a460eea2d4c3e8b910c695975a0/typing_inspection-0.4.4.tar.gz", hash = "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47", size = 76928, upload-time = "2026-08-12T12:37:25.997Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/31/08/aa4fdfb71f7de5176385bd9e90852eaf6b5d622735020ad600f2bab54385/typing_inspection-0.4.0-py3-none-any.whl", hash = "sha256:50e72559fcd2a6367a19f7a7e610e6afcb9fac940c650290eed893d61386832f", size = 14125, upload-time = "2025-02-25T17:27:57.754Z" },
|
{ url = "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", size = 14750, upload-time = "2026-08-12T12:37:24.648Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'java'
|
|
||||||
id 'java-library'
|
|
||||||
id 'maven-publish'
|
|
||||||
id 'jacoco'
|
|
||||||
id 'test-report-aggregation'
|
|
||||||
id 'jacoco-report-aggregation'
|
|
||||||
alias(libs.plugins.lombok)
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
//maven { setUrl("https://nexus.thpeetz.de/repository/maven-central") }
|
|
||||||
mavenCentral()
|
|
||||||
maven { setUrl("https://repo.spring.io/milestone") }
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_21
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
|
||||||
developmentOnly
|
|
||||||
runtimeClasspath {
|
|
||||||
extendsFrom developmentOnly
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
//implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
||||||
//implementation 'org.postgresql:postgresql'
|
|
||||||
//implementation 'org.hibernate.orm:hibernate-community-dialects'
|
|
||||||
compileOnly libs.spring.data
|
|
||||||
compileOnly 'org.projectlombok:lombok'
|
|
||||||
annotationProcessor 'org.projectlombok:lombok'
|
|
||||||
}
|
|
||||||
|
|
||||||
wrapper {
|
|
||||||
gradleVersion = "8.6"
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
[versions]
|
|
||||||
gradle = "8.6"
|
|
||||||
args4j = "2.33"
|
|
||||||
commonscli = "1.5.0"
|
|
||||||
junit = "5.8.2"
|
|
||||||
logback = "1.1.2"
|
|
||||||
mockito = "1.9.5"
|
|
||||||
picoli = "4.7.0"
|
|
||||||
slf4j = "1.7.22"
|
|
||||||
hsqldb = "2.7.1"
|
|
||||||
sqlite = "3.25.2"
|
|
||||||
spotbugs = "6.0.7"
|
|
||||||
asciidoctor = "4.0.2"
|
|
||||||
rouge = "3.15.0"
|
|
||||||
#diagram = "2.2.2"
|
|
||||||
diagram = "2.3.1"
|
|
||||||
sonarqube = "3.3"
|
|
||||||
cimtConventions = "1.0.0-SNAPSHOT"
|
|
||||||
springboot = "3.2.5"
|
|
||||||
springdependencies = "1.1.4"
|
|
||||||
vaadin = "24.3.8"
|
|
||||||
camel = "4.10.6"
|
|
||||||
artemis = "2.41.0"
|
|
||||||
lombok = "8.6"
|
|
||||||
gson = "2.9.0"
|
|
||||||
jackson = "2.16.1"
|
|
||||||
json_simple = "1.1.1"
|
|
||||||
mail = "1.6.2"
|
|
||||||
hypersistence = "3.9.10"
|
|
||||||
|
|
||||||
[libraries]
|
|
||||||
args4j = { module = "args4j:args4j", version.ref = "args4j" }
|
|
||||||
commonscli = { module = "commons-cli:commons-cli", version.ref = "commonscli" }
|
|
||||||
junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
|
|
||||||
logbackCore = { module = "ch.qos.logback:logback-core", version.ref = "logback" }
|
|
||||||
logbackClassic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
|
|
||||||
mockito = { module = "org.mockito:mockito-all", version.ref = "mockito" }
|
|
||||||
picocli = { module = "info.picocli:picocli", version.ref = "picoli" }
|
|
||||||
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
|
|
||||||
hsqldb = { module = "org.hsqldb:hsqldb", version.ref = "hsqldb" }
|
|
||||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
|
||||||
jackson = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" }
|
|
||||||
json = { module = "com.googlecode.json-simple:json-simple", version.ref ="json_simple" }
|
|
||||||
mail = { module = "com.sun.mail:javax.mail", version.ref ="mail" }
|
|
||||||
sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version.ref = "sqlite" }
|
|
||||||
hypersistence = { module = "io.hypersistence:hypersistence-utils-hibernate-63", version.ref = "hypersistence" }
|
|
||||||
vaadin-bom = { module = "com.vaadin:vaadin-bom", version.ref = "vaadin" }
|
|
||||||
camel-bom = { module = "org.apache.camel.springboot:camel-spring-boot-bom", version.ref = "camel"}
|
|
||||||
spring-data = { module = "org.springframework.data:spring-data-jpa", version.ref = "springboot" }
|
|
||||||
artemis = { module = "org.apache.activemq:artemis-jms-server", version.ref = "artemis" }
|
|
||||||
asciidoctorGradleJvmGems = { module = "org.asciidoctor:asciidoctor-gradle-jvm-gems", version.ref= "asciidoctor" }
|
|
||||||
asciidoctorGradleJvm = { module = "org.asciidoctor:asciidoctor-gradle-jvm", version.ref= "asciidoctor" }
|
|
||||||
asciidoctorGradleJvmPdf = { module = "org.asciidoctor:asciidoctor-gradle-jvm-pdf", version.ref= "asciidoctor" }
|
|
||||||
rouge = { module = "rubygems:rouge", version.ref = "rouge" }
|
|
||||||
diagram = { module = "rubygems:asciidoctor-diagram", version.ref = "diagram" }
|
|
||||||
|
|
||||||
[bundles]
|
|
||||||
logback = ["logbackCore", "logbackClassic"]
|
|
||||||
|
|
||||||
[plugins]
|
|
||||||
spotbugs = { id = "com.github.spotbugs", version.ref = "spotbugs" }
|
|
||||||
sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" }
|
|
||||||
asciidoctorPdf = { id = "org.asciidoctor.jvm.pdf", version.ref = "asciidoctor" }
|
|
||||||
asciidoctorConvert = { id = "org.asciidoctor.jvm.convert", version.ref = "asciidoctor" }
|
|
||||||
asciidoctorGems = { id = "org.asciidoctor.jvm.gems", version.ref = "asciidoctor" }
|
|
||||||
javaConvention = { id = "de.cimt.java-conventions", version.ref = "cimtConventions" }
|
|
||||||
applicationConvention = { id = "de.cimt.application-conventions", version.ref = "cimtConventions" }
|
|
||||||
libraryConvention = { id = "de.cimt.library-conventions", version.ref = "cimtConventions" }
|
|
||||||
asciidoctorConvention = { id = "de.cimt.asciidoctor-conventions", version.ref = "cimtConventions" }
|
|
||||||
spring-boot = { id = "org.springframework.boot", version.ref = "springboot"}
|
|
||||||
spring-dependencies = { id = "io.spring.dependency-management", version.ref = "springdependencies" }
|
|
||||||
vaadin = { id = "com.vaadin", version.ref = "vaadin" }
|
|
||||||
lombok = { id = "io.freefair.lombok", version.ref = "lombok" }
|
|
||||||
BIN
Binary file not shown.
@@ -1,7 +0,0 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
|
||||||
distributionPath=wrapper/dists
|
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
|
||||||
networkTimeout=10000
|
|
||||||
validateDistributionUrl=true
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
|
||||||
Vendored
-248
@@ -1,248 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright © 2015 the original authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Gradle start up script for POSIX generated by Gradle.
|
|
||||||
#
|
|
||||||
# Important for running:
|
|
||||||
#
|
|
||||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
||||||
# noncompliant, but you have some other compliant shell such as ksh or
|
|
||||||
# bash, then to run this script, type that shell name before the whole
|
|
||||||
# command line, like:
|
|
||||||
#
|
|
||||||
# ksh Gradle
|
|
||||||
#
|
|
||||||
# Busybox and similar reduced shells will NOT work, because this script
|
|
||||||
# requires all of these POSIX shell features:
|
|
||||||
# * functions;
|
|
||||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
||||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
||||||
# * compound commands having a testable exit status, especially «case»;
|
|
||||||
# * various built-in commands including «command», «set», and «ulimit».
|
|
||||||
#
|
|
||||||
# Important for patching:
|
|
||||||
#
|
|
||||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
||||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
||||||
#
|
|
||||||
# The "traditional" practice of packing multiple parameters into a
|
|
||||||
# space-separated string is a well documented source of bugs and security
|
|
||||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
||||||
# options in "$@", and eventually passing that to Java.
|
|
||||||
#
|
|
||||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
||||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
||||||
# see the in-line comments for details.
|
|
||||||
#
|
|
||||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
||||||
# Darwin, MinGW, and NonStop.
|
|
||||||
#
|
|
||||||
# (3) This script is generated from the Groovy template
|
|
||||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
||||||
# within the Gradle project.
|
|
||||||
#
|
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
|
||||||
app_path=$0
|
|
||||||
|
|
||||||
# Need this for daisy-chained symlinks.
|
|
||||||
while
|
|
||||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
|
||||||
[ -h "$app_path" ]
|
|
||||||
do
|
|
||||||
ls=$( ls -ld "$app_path" )
|
|
||||||
link=${ls#*' -> '}
|
|
||||||
case $link in #(
|
|
||||||
/*) app_path=$link ;; #(
|
|
||||||
*) app_path=$APP_HOME$link ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# This is normally unused
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
APP_BASE_NAME=${0##*/}
|
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
||||||
MAX_FD=maximum
|
|
||||||
|
|
||||||
warn () {
|
|
||||||
echo "$*"
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
die () {
|
|
||||||
echo
|
|
||||||
echo "$*"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
|
||||||
cygwin=false
|
|
||||||
msys=false
|
|
||||||
darwin=false
|
|
||||||
nonstop=false
|
|
||||||
case "$( uname )" in #(
|
|
||||||
CYGWIN* ) cygwin=true ;; #(
|
|
||||||
Darwin* ) darwin=true ;; #(
|
|
||||||
MSYS* | MINGW* ) msys=true ;; #(
|
|
||||||
NONSTOP* ) nonstop=true ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
|
||||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
|
||||||
else
|
|
||||||
JAVACMD=$JAVA_HOME/bin/java
|
|
||||||
fi
|
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
JAVACMD=java
|
|
||||||
if ! command -v java >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
||||||
case $MAX_FD in #(
|
|
||||||
max*)
|
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC2039,SC3045
|
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
|
||||||
warn "Could not query maximum file descriptor limit"
|
|
||||||
esac
|
|
||||||
case $MAX_FD in #(
|
|
||||||
'' | soft) :;; #(
|
|
||||||
*)
|
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC2039,SC3045
|
|
||||||
ulimit -n "$MAX_FD" ||
|
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Collect all arguments for the java command, stacking in reverse order:
|
|
||||||
# * args from the command line
|
|
||||||
# * the main class name
|
|
||||||
# * -classpath
|
|
||||||
# * -D...appname settings
|
|
||||||
# * --module-path (only if needed)
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
||||||
if "$cygwin" || "$msys" ; then
|
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
|
||||||
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
for arg do
|
|
||||||
if
|
|
||||||
case $arg in #(
|
|
||||||
-*) false ;; # don't mess with options #(
|
|
||||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
|
||||||
[ -e "$t" ] ;; #(
|
|
||||||
*) false ;;
|
|
||||||
esac
|
|
||||||
then
|
|
||||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
|
||||||
fi
|
|
||||||
# Roll the args list around exactly as many times as the number of
|
|
||||||
# args, so each arg winds up back in the position where it started, but
|
|
||||||
# possibly modified.
|
|
||||||
#
|
|
||||||
# NB: a `for` loop captures its iteration list before it begins, so
|
|
||||||
# changing the positional parameters here affects neither the number of
|
|
||||||
# iterations, nor the values presented in `arg`.
|
|
||||||
shift # remove old arg
|
|
||||||
set -- "$@" "$arg" # push replacement arg
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
||||||
# and any embedded shellness will be escaped.
|
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
||||||
# treated as '${Hostname}' itself on the command line.
|
|
||||||
|
|
||||||
set -- \
|
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
|
||||||
"$@"
|
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
|
||||||
if ! command -v xargs >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
die "xargs is not available"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
|
||||||
#
|
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
|
||||||
#
|
|
||||||
# In Bash we could simply go:
|
|
||||||
#
|
|
||||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
|
||||||
# set -- "${ARGS[@]}" "$@"
|
|
||||||
#
|
|
||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
|
||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
|
||||||
# character that might be a shell metacharacter, then use eval to reverse
|
|
||||||
# that process (while maintaining the separation between arguments), and wrap
|
|
||||||
# the whole thing up as a single "set" statement.
|
|
||||||
#
|
|
||||||
# This will of course break if any of these variables contains a newline or
|
|
||||||
# an unmatched quote.
|
|
||||||
#
|
|
||||||
|
|
||||||
eval "set -- $(
|
|
||||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
|
||||||
xargs -n1 |
|
|
||||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
|
||||||
tr '\n' ' '
|
|
||||||
)" '"$@"'
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
|
||||||
Vendored
-82
@@ -1,82 +0,0 @@
|
|||||||
@rem
|
|
||||||
@rem Copyright 2015 the original author or authors.
|
|
||||||
@rem
|
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
@rem you may not use this file except in compliance with the License.
|
|
||||||
@rem You may obtain a copy of the License at
|
|
||||||
@rem
|
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
@rem
|
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
@rem See the License for the specific language governing permissions and
|
|
||||||
@rem limitations under the License.
|
|
||||||
@rem
|
|
||||||
@rem SPDX-License-Identifier: Apache-2.0
|
|
||||||
@rem
|
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
|
||||||
@rem ##########################################################################
|
|
||||||
@rem
|
|
||||||
@rem Gradle startup script for Windows
|
|
||||||
@rem
|
|
||||||
@rem ##########################################################################
|
|
||||||
|
|
||||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
|
||||||
setlocal EnableExtensions
|
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
|
||||||
@rem This is normally unused
|
|
||||||
set APP_BASE_NAME=%~n0
|
|
||||||
set APP_HOME=%DIRNAME%
|
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
||||||
|
|
||||||
@rem Find java.exe
|
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
|
||||||
|
|
||||||
echo. 1>&2
|
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
||||||
echo. 1>&2
|
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
||||||
echo location of your Java installation. 1>&2
|
|
||||||
|
|
||||||
"%COMSPEC%" /c exit 1
|
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
|
||||||
|
|
||||||
echo. 1>&2
|
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
||||||
echo. 1>&2
|
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
||||||
echo location of your Java installation. 1>&2
|
|
||||||
|
|
||||||
"%COMSPEC%" /c exit 1
|
|
||||||
|
|
||||||
:execute
|
|
||||||
@rem Setup the command line
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
|
||||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
|
||||||
@rem which allows us to clear the local environment before executing the java command
|
|
||||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
|
||||||
|
|
||||||
:exitWithErrorLevel
|
|
||||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
|
||||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
pluginManagement {
|
|
||||||
resolutionStrategy {
|
|
||||||
eachPlugin {
|
|
||||||
if (requested.id.id == 'org.springframework.boot') {
|
|
||||||
useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}")
|
|
||||||
}
|
|
||||||
if (requested.id.id == 'org.gradle.toolchains.foojay-resolver') {
|
|
||||||
useModule("org.gradle.toolchains.foojay-resolver-convention:0.4.0")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
repositories {
|
|
||||||
gradlePluginPortal()
|
|
||||||
mavenCentral()
|
|
||||||
maven { setUrl("https://maven.vaadin.com/vaadin-prereleases") }
|
|
||||||
maven { setUrl("https://repo.spring.io/milestone") }
|
|
||||||
maven { url 'https://plugins.gradle.org/m2/' }
|
|
||||||
}
|
|
||||||
// plugins {
|
|
||||||
// id 'com.vaadin' version "${vaadinVersion}"
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.name = 'kontor-spring'
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
package de.thpeetz.kontor.admin.data;
|
|
||||||
|
|
||||||
import de.thpeetz.kontor.common.data.AbstractEntity;
|
|
||||||
import jakarta.persistence.*;
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import lombok.ToString;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ToString
|
|
||||||
@Entity
|
|
||||||
@Table(indexes = @Index(columnList = "userName"), uniqueConstraints = @UniqueConstraint(columnNames = {"userName"}))
|
|
||||||
public class Profile extends AbstractEntity {
|
|
||||||
|
|
||||||
private String firstName;
|
|
||||||
|
|
||||||
private String lastName;
|
|
||||||
|
|
||||||
@NotEmpty
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
private String email;
|
|
||||||
|
|
||||||
private String password;
|
|
||||||
|
|
||||||
private boolean enabled;
|
|
||||||
|
|
||||||
@OneToMany(fetch = FetchType.EAGER, mappedBy = "profile")
|
|
||||||
@Nullable
|
|
||||||
private List<Assignment> assignments = new LinkedList<>();
|
|
||||||
|
|
||||||
@OneToMany(fetch = FetchType.EAGER, mappedBy = "profile")
|
|
||||||
@Nullable
|
|
||||||
private List<Token> tokens = new LinkedList<>();
|
|
||||||
|
|
||||||
public String getFullName() {
|
|
||||||
StringBuilder fullNameBuilder = new StringBuilder();
|
|
||||||
if (firstName != null) {
|
|
||||||
fullNameBuilder.append(firstName);
|
|
||||||
}
|
|
||||||
if (lastName != null) {
|
|
||||||
if (!fullNameBuilder.isEmpty()) {
|
|
||||||
fullNameBuilder.append(" ");
|
|
||||||
}
|
|
||||||
fullNameBuilder.append(lastName);
|
|
||||||
}
|
|
||||||
return fullNameBuilder.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
package de.thpeetz.kontor.admin.repository;
|
|
||||||
|
|
||||||
import de.thpeetz.kontor.admin.data.*;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface AssignmentRepository extends JpaRepository<Assignment, String> {
|
|
||||||
|
|
||||||
List<Assignment> findByProfile(Profile profile);
|
|
||||||
|
|
||||||
List<Assignment> findByPermission(Permission permission);
|
|
||||||
}
|
|
||||||
-8
@@ -1,8 +0,0 @@
|
|||||||
package de.thpeetz.kontor.admin.repository;
|
|
||||||
|
|
||||||
import de.thpeetz.kontor.mailclient.data.MailAccount;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
|
|
||||||
public interface MailAccountRepository extends JpaRepository<MailAccount, String> {
|
|
||||||
}
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
package de.thpeetz.kontor.admin.repository;
|
|
||||||
|
|
||||||
import de.thpeetz.kontor.admin.data.Profile;
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
import org.springframework.data.jpa.repository.Query;
|
|
||||||
import org.springframework.data.repository.query.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface ProfileRepository extends JpaRepository<Profile, String> {
|
|
||||||
|
|
||||||
@Query("select p from Profile p " +
|
|
||||||
"where lower(p.lastName) like lower(concat('%', :searchTerm, '%')) ")
|
|
||||||
List<Profile> search(@Param("searchTerm") String searchTerm);
|
|
||||||
|
|
||||||
Profile findByUserName(String userName);
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
package de.thpeetz.kontor.bookshelf.data;
|
|
||||||
|
|
||||||
import de.thpeetz.kontor.common.data.AbstractEntity;
|
|
||||||
import jakarta.persistence.Entity;
|
|
||||||
import jakarta.persistence.Index;
|
|
||||||
import jakarta.persistence.JoinColumn;
|
|
||||||
import jakarta.persistence.ManyToOne;
|
|
||||||
import jakarta.persistence.Table;
|
|
||||||
import jakarta.persistence.UniqueConstraint;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Entity
|
|
||||||
@Table(indexes = @Index(columnList = "author_id, article_id"), uniqueConstraints = @UniqueConstraint(columnNames = {"author_id", "article_id"}))
|
|
||||||
public class ArticleAuthor extends AbstractEntity {
|
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "author_id")
|
|
||||||
@NotNull
|
|
||||||
private Author author;
|
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "article_id")
|
|
||||||
@NotNull
|
|
||||||
private Article article;
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
package de.thpeetz.kontor.bookshelf.data;
|
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.thpeetz.kontor.common.data.AbstractEntity;
|
|
||||||
import jakarta.annotation.Nullable;
|
|
||||||
import jakarta.persistence.Entity;
|
|
||||||
import jakarta.persistence.FetchType;
|
|
||||||
import jakarta.persistence.Index;
|
|
||||||
import jakarta.persistence.OneToMany;
|
|
||||||
import jakarta.persistence.Table;
|
|
||||||
import jakarta.persistence.UniqueConstraint;
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ToString
|
|
||||||
@Entity
|
|
||||||
@Table(indexes = {
|
|
||||||
@Index(columnList = "firstName, lastName"),
|
|
||||||
@Index(columnList = "lastName, firstName")
|
|
||||||
}, uniqueConstraints = {
|
|
||||||
@UniqueConstraint(columnNames = { "firstName", "lastName" })
|
|
||||||
})
|
|
||||||
public class Author extends AbstractEntity {
|
|
||||||
|
|
||||||
@NotEmpty
|
|
||||||
private String firstName;
|
|
||||||
|
|
||||||
@NotEmpty
|
|
||||||
private String lastName;
|
|
||||||
|
|
||||||
@OneToMany(fetch = FetchType.EAGER, mappedBy = "author")
|
|
||||||
@Nullable
|
|
||||||
private List<BookAuthor> bookAuthors = new LinkedList<>();
|
|
||||||
|
|
||||||
@OneToMany(fetch = FetchType.EAGER, mappedBy = "author")
|
|
||||||
@Nullable
|
|
||||||
private List<ArticleAuthor> articleAuthors = new LinkedList<>();
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
package de.thpeetz.kontor.bookshelf.data;
|
|
||||||
|
|
||||||
import de.thpeetz.kontor.common.data.AbstractEntity;
|
|
||||||
import jakarta.persistence.Entity;
|
|
||||||
import jakarta.persistence.Index;
|
|
||||||
import jakarta.persistence.JoinColumn;
|
|
||||||
import jakarta.persistence.ManyToOne;
|
|
||||||
import jakarta.persistence.Table;
|
|
||||||
import jakarta.persistence.UniqueConstraint;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Entity
|
|
||||||
@Table(indexes = @Index(columnList = "author_id, book_id"), uniqueConstraints = @UniqueConstraint(columnNames = {"author_id", "book_id"}))
|
|
||||||
public class BookAuthor extends AbstractEntity {
|
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "author_id")
|
|
||||||
@NotNull
|
|
||||||
private Author author;
|
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "book_id")
|
|
||||||
@NotNull
|
|
||||||
private Book book;
|
|
||||||
}
|
|
||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
package de.thpeetz.kontor.bookshelf.data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
|
|
||||||
public interface BookAuthorRepository extends JpaRepository<BookAuthor, String> {
|
|
||||||
|
|
||||||
List<BookAuthor> findByAuthor(Author author);
|
|
||||||
|
|
||||||
List<BookAuthor> findByBook(Book book);
|
|
||||||
}
|
|
||||||
-18
@@ -1,18 +0,0 @@
|
|||||||
package de.thpeetz.kontor.bookshelf.data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
|
||||||
import org.springframework.data.jpa.repository.Query;
|
|
||||||
import org.springframework.data.repository.query.Param;
|
|
||||||
|
|
||||||
public interface BookshelfPublisherRepository extends JpaRepository<BookshelfPublisher, String> {
|
|
||||||
|
|
||||||
@Query("select p from BookshelfPublisher p " +
|
|
||||||
"where lower(p.name) like lower(concat('%', :searchTerm, '%')) ")
|
|
||||||
List<BookshelfPublisher> search(@Param("searchTerm") String searchTerm);
|
|
||||||
|
|
||||||
BookshelfPublisher findByName(String name);
|
|
||||||
|
|
||||||
List<BookshelfPublisher> findByNameIgnoreCase(String name);
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user