diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..8af972cde --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +/gradlew text eol=lf +*.bat text eol=crlf +*.jar binary diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..c2065bc26 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +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/ diff --git a/README.md b/README.md index 5fcc66b4d..38a08c192 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ ## [본 과정] 이커머스 핵심 프로세스 구현 -[단기 스킬업 Redis 교육 과정](https://hh-skillup.oopy.io/) 을 통해 상품 조회 및 주문 과정을 구현하며 현업에서 발생하는 문제를 Redis의 핵심 기술을 통해 해결합니다. -> Indexing, Caching을 통한 성능 개선 / 단계별 락 구현을 통한 동시성 이슈 해결 (낙관적/비관적 락, 분산락 등) + +### Multi Module +* module-movie: 영화와 관련된 작업을 합니다. +* module-theater: 상영관과 관련된 작업을 합니다. +* module-screening: 상영 정보와 관련된 작업을 합니다. +* module-common: Auditing 등 모든 모듈에 적용될 작업을 합니다. +* module-api: 현재 상영 중인 영화 조회 API 등 영화, 상영관, 상영 정보 외의 api와 관련된 작업을 합니다. + +### Architecture +* Layered Architecture를 사용하여 계층별로 책임을 분리하여 진행했습니다. + +### Table Design +![image](https://github.com/user-attachments/assets/b55c39d3-2488-40d9-a6ce-a60cfb507124) +* movie와 screening 관계 + * 1:N 관계 -> 하나의 영화는 여러 상영 정보를 가집니다. +* theater과 screening 관계 + * 1:N 관계 -> 하나의 상영관은 여러 상영 정보를 가집니다. +* theater과 seat 관계 + * 1:N 관계 -> 하나의 상영관은 여러 개의 좌석을 갖습니다. diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..4782b5501 --- /dev/null +++ b/build.gradle @@ -0,0 +1,52 @@ +plugins { + id 'java' + id 'org.springframework.boot' version '3.4.1' + id 'io.spring.dependency-management' version '1.1.7' +} + +bootJar.enabled = false // 루트 모듈의 .jar 생성 X + +group = 'com.example' +version = '0.0.1-SNAPSHOT' + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } +} + +repositories { + mavenCentral() +} + +subprojects { // 모든 하위 모듈들에 적용 + group 'com.example' + version '0.0.1-SNAPSHOT' + sourceCompatibility = '17' + + apply plugin: 'java' + apply plugin: 'java-library' + apply plugin: 'org.springframework.boot' + apply plugin: 'io.spring.dependency-management' + + configurations { + compileOnly { + extendsFrom annotationProcessor + } + } + + repositories { + mavenCentral() + } + + dependencies { // 모든 하위 모듈에 추가 + implementation 'org.springframework.boot:spring-boot-starter' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + implementation 'mysql:mysql-connector-java:8.0.33' + } + + tasks.named('test') { + useJUnitPlatform() + } +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..e07925e3e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +services: + mysql: + image: mysql:8.0 + container_name: skillUp-redis-db + environment: + MYSQL_ROOT_PASSWORD: root1234 # MySQL 루트 비밀번호 설정 + MYSQL_DATABASE: redisdb # 기본 데이터베이스 이름 + MYSQL_USER: user # MySQL 사용자 이름 + MYSQL_PASSWORD: user1234 # MySQL 사용자 비밀번호 + ports: + - "3307:3306" + volumes: + - ./init-scripts:/docker-entrypoint-initdb.d # init-scripts 폴더를 MySQL 컨테이너의 초기화 스크립트 디렉토리로 매핑 + command: + - --skip-character-set-client-handshake + - --character-set-server=utf8mb4 + - --collation-server=utf8mb4_unicode_ci + networks: + - my-network + +networks: + my-network: + driver: bridge + +volumes: + mysql-data: + driver: local \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..a4b76b953 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..e2847c820 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 000000000..f5feea6d6 --- /dev/null +++ b/gradlew @@ -0,0 +1,252 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 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/HEAD/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 +' "$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 + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# 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" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + 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, 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" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# 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" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 000000000..9d21a2183 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,94 @@ +@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 with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +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 + +goto fail + +: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 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/init-scripts/data.sql b/init-scripts/data.sql new file mode 100644 index 000000000..0b2a25a23 --- /dev/null +++ b/init-scripts/data.sql @@ -0,0 +1,1333 @@ +CREATE TABLE movie ( + movie_id BIGINT AUTO_INCREMENT PRIMARY KEY, + title VARCHAR(50) NOT NULL, + rating VARCHAR(255) NOT NULL, + release_date DATE NOT NULL, + thumbnail VARCHAR(255) NOT NULL, + running_time INT NOT NULL, + genre VARCHAR(255) NOT NULL +)CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +CREATE TABLE theater ( + theater_id BIGINT AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(20) NOT NULL +)CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +CREATE TABLE seat ( + seat_id BIGINT AUTO_INCREMENT PRIMARY KEY, + theater_id BIGINT NOT NULL, + seat_row VARCHAR(255) NOT NULL, + seat_column INT NOT NULL, + FOREIGN KEY (theater_id) REFERENCES theater(theater_id) +)CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + +CREATE TABLE screening ( + screening_id BIGINT AUTO_INCREMENT PRIMARY KEY, + movie_id BIGINT NOT NULL, + theater_id BIGINT NOT NULL, + start_time TIME NOT NULL, + FOREIGN KEY (movie_id) REFERENCES movie(movie_id), + FOREIGN KEY (theater_id) REFERENCES theater(theater_id) +)CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; + + +-- Theater 데이터 삽입 +INSERT INTO theater (name) VALUES +('Theater 1'), +('Theater 2'), +('Theater 3'), +('Theater 4'), +('Theater 5'), +('Theater 6'), +('Theater 7'), +('Theater 8'), +('Theater 9'), +('Theater 10'), +('Theater 11'), +('Theater 12'), +('Theater 13'), +('Theater 14'), +('Theater 15'), +('Theater 16'), +('Theater 17'), +('Theater 18'), +('Theater 19'), +('Theater 20'), +('Theater 21'), +('Theater 22'), +('Theater 23'), +('Theater 24'), +('Theater 25'), +('Theater 26'), +('Theater 27'), +('Theater 28'), +('Theater 29'), +('Theater 30'), +('Theater 31'), +('Theater 32'), +('Theater 33'), +('Theater 34'), +('Theater 35'), +('Theater 36'), +('Theater 37'), +('Theater 38'), +('Theater 39'), +('Theater 40'), +('Theater 41'), +('Theater 42'), +('Theater 43'), +('Theater 44'), +('Theater 45'), +('Theater 46'), +('Theater 47'), +('Theater 48'), +('Theater 49'), +('Theater 50'), +('Theater 51'), +('Theater 52'), +('Theater 53'), +('Theater 54'), +('Theater 55'), +('Theater 56'), +('Theater 57'), +('Theater 58'), +('Theater 59'), +('Theater 60'), +('Theater 61'), +('Theater 62'), +('Theater 63'), +('Theater 64'), +('Theater 65'), +('Theater 66'), +('Theater 67'), +('Theater 68'), +('Theater 69'), +('Theater 70'), +('Theater 71'), +('Theater 72'), +('Theater 73'), +('Theater 74'), +('Theater 75'), +('Theater 76'), +('Theater 77'), +('Theater 78'), +('Theater 79'), +('Theater 80'); + +-- Movie 데이터 삽입 +INSERT INTO movie (title, rating, release_date, thumbnail, running_time, genre) VALUES +('영화1', 'ALL', '2024-11-01', 'https://xxx', 110, 'ACTION'), +('영화2', 'AGE_12', '2024-11-02', 'https://xxx', 115, 'COMEDY'), +('영화3', 'AGE_15', '2024-11-03', 'https://xxx', 120, 'DRAMA'), +('영화4', 'ALL', '2024-11-05', 'https://xxx', 105, 'HORROR'), +('영화5', 'AGE_12', '2024-11-06', 'https://xxx', 110, 'ROMANCE'), +('영화6', 'AGE_15', '2024-11-07', 'https://xxx', 115, 'THRILLER'), +('영화7', 'AGE_12', '2024-11-08', 'https://xxx', 120, 'ACTION'), +('영화8', 'ALL', '2024-11-09', 'https://xxx', 105, 'COMEDY'), +('영화9', 'AGE_12', '2024-11-10', 'https://xxx', 110, 'DRAMA'), +('영화10', 'AGE_15', '2024-11-11', 'https://xxx', 115, 'HORROR'), +('영화11', 'AGE_12', '2024-11-12', 'https://xxx', 120, 'ROMANCE'), +('영화12', 'ALL', '2024-11-13', 'https://xxx', 110, 'THRILLER'), +('영화13', 'AGE_15', '2024-11-14', 'https://xxx', 105, 'ACTION'), +('영화14', 'AGE_12', '2024-11-15', 'https://xxx', 115, 'COMEDY'), +('영화15', 'ALL', '2024-11-16', 'https://xxx', 120, 'DRAMA'), +('영화16', 'AGE_12', '2024-11-17', 'https://xxx', 110, 'HORROR'), +('영화17', 'AGE_15', '2024-11-18', 'https://xxx', 120, 'ROMANCE'), +('영화18', 'ALL', '2024-11-19', 'https://xxx', 105, 'THRILLER'), +('영화19', 'AGE_12', '2024-11-20', 'https://xxx', 110, 'ACTION'), +('영화20', 'AGE_15', '2024-11-21', 'https://xxx', 115, 'COMEDY'), +('영화21', 'AGE_12', '2024-12-01', 'https://xxx', 120, 'DRAMA'), +('영화22', 'ALL', '2024-12-02', 'https://xxx', 105, 'HORROR'), +('영화23', 'AGE_12', '2024-12-03', 'https://xxx', 110, 'ROMANCE'), +('영화24', 'AGE_15', '2024-12-04', 'https://xxx', 115, 'THRILLER'), +('영화25', 'AGE_12', '2024-12-05', 'https://xxx', 120, 'ACTION'), +('영화26', 'ALL', '2024-12-06', 'https://xxx', 105, 'COMEDY'), +('영화27', 'AGE_15', '2024-12-07', 'https://xxx', 110, 'DRAMA'), +('영화28', 'AGE_12', '2024-12-08', 'https://xxx', 115, 'HORROR'), +('영화29', 'AGE_15', '2024-12-09', 'https://xxx', 120, 'ROMANCE'), +('영화30', 'AGE_12', '2024-12-10', 'https://xxx', 110, 'THRILLER'), +('영화31', 'AGE_19', '2024-12-15', 'https://xxx', 105, 'ACTION'), +('영화32', 'RESTRICTED', '2024-12-16', 'https://xxx', 115, 'COMEDY'), +('영화33', 'AGE_19', '2024-12-17', 'https://xxx', 120, 'DRAMA'), +('영화34', 'RESTRICTED', '2024-12-18', 'https://xxx', 110, 'HORROR'), +('영화35', 'AGE_19', '2024-12-19', 'https://xxx', 115, 'ROMANCE'), +('영화36', 'RESTRICTED', '2024-12-20', 'https://xxx', 120, 'THRILLER'), +('영화37', 'AGE_19', '2025-01-01', 'https://xxx', 110, 'ACTION'), +('영화38', 'RESTRICTED', '2025-01-02', 'https://xxx', 105, 'COMEDY'), +('영화39', 'AGE_19', '2025-01-05', 'https://xxx', 115, 'DRAMA'), +('Movie40', 'RESTRICTED', '2025-01-10', 'https://xxx', 120, 'HORROR'), +('영화41', 'ALL', '2025-11-01', 'https://xxx', 110, 'ACTION'); + +-- Screening 데이터 삽입 +-- 영화1 상영 데이터 (상영관 1, 2) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(1, 1, '09:00'), +(1, 1, '11:00'), +(1, 1, '13:00'), +(1, 1, '15:00'), +(1, 1, '17:00'), +(1, 1, '19:00'), +(1, 1, '21:00'), +(1, 2, '09:00'), +(1, 2, '11:00'), +(1, 2, '13:00'), +(1, 2, '15:00'), +(1, 2, '17:00'), +(1, 2, '19:00'), +(1, 2, '21:00'); + +-- 영화2 상영 데이터 (상영관 3, 4) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(2, 3, '09:00'), +(2, 3, '11:00'), +(2, 3, '13:00'), +(2, 3, '15:00'), +(2, 3, '17:00'), +(2, 3, '19:00'), +(2, 3, '21:00'), +(2, 4, '09:00'), +(2, 4, '11:00'), +(2, 4, '13:00'), +(2, 4, '15:00'), +(2, 4, '17:00'), +(2, 4, '19:00'), +(2, 4, '21:00'); + +-- 영화3 상영 데이터 (상영관 5, 6) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(3, 5, '09:00'), +(3, 5, '11:00'), +(3, 5, '13:00'), +(3, 5, '15:00'), +(3, 5, '17:00'), +(3, 5, '19:00'), +(3, 5, '21:00'), +(3, 6, '09:00'), +(3, 6, '11:00'), +(3, 6, '13:00'), +(3, 6, '15:00'), +(3, 6, '17:00'), +(3, 6, '19:00'), +(3, 6, '21:00'); + +-- 영화4 상영 데이터 (상영관 7, 8) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(4, 7, '09:00'), +(4, 7, '11:00'), +(4, 7, '13:00'), +(4, 7, '15:00'), +(4, 7, '17:00'), +(4, 7, '19:00'), +(4, 7, '21:00'), +(4, 8, '09:00'), +(4, 8, '11:00'), +(4, 8, '13:00'), +(4, 8, '15:00'), +(4, 8, '17:00'), +(4, 8, '19:00'), +(4, 8, '21:00'); + +-- 영화5 상영 데이터 (상영관 9, 10) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(5, 9, '09:00'), +(5, 9, '11:00'), +(5, 9, '13:00'), +(5, 9, '15:00'), +(5, 9, '17:00'), +(5, 9, '19:00'), +(5, 9, '21:00'), +(5, 10, '09:00'), +(5, 10, '11:00'), +(5, 10, '13:00'), +(5, 10, '15:00'), +(5, 10, '17:00'), +(5, 10, '19:00'), +(5, 10, '21:00'); + +-- 영화6 상영 데이터 (상영관 11, 12) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(6, 11, '09:00'), +(6, 11, '11:00'), +(6, 11, '13:00'), +(6, 11, '15:00'), +(6, 11, '17:00'), +(6, 11, '19:00'), +(6, 11, '21:00'), +(6, 12, '09:00'), +(6, 12, '11:00'), +(6, 12, '13:00'), +(6, 12, '15:00'), +(6, 12, '17:00'), +(6, 12, '19:00'), +(6, 12, '21:00'); + +-- 영화7 상영 데이터 (상영관 13, 14) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(7, 13, '09:00'), +(7, 13, '11:00'), +(7, 13, '13:00'), +(7, 13, '15:00'), +(7, 13, '17:00'), +(7, 13, '19:00'), +(7, 13, '21:00'), +(7, 14, '09:00'), +(7, 14, '11:00'), +(7, 14, '13:00'), +(7, 14, '15:00'), +(7, 14, '17:00'), +(7, 14, '19:00'), +(7, 14, '21:00'); + +-- 영화8 상영 데이터 (상영관 15, 16) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(8, 15, '09:00'), +(8, 15, '11:00'), +(8, 15, '13:00'), +(8, 15, '15:00'), +(8, 15, '17:00'), +(8, 15, '19:00'), +(8, 15, '21:00'), +(8, 16, '09:00'), +(8, 16, '11:00'), +(8, 16, '13:00'), +(8, 16, '15:00'), +(8, 16, '17:00'), +(8, 16, '19:00'), +(8, 16, '21:00'); + +-- 영화9 상영 데이터 (상영관 17, 18) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(9, 17, '09:00'), +(9, 17, '11:00'), +(9, 17, '13:00'), +(9, 17, '15:00'), +(9, 17, '17:00'), +(9, 17, '19:00'), +(9, 17, '21:00'), +(9, 18, '09:00'), +(9, 18, '11:00'), +(9, 18, '13:00'), +(9, 18, '15:00'), +(9, 18, '17:00'), +(9, 18, '19:00'), +(9, 18, '21:00'); + +-- 영화10 상영 데이터 (상영관 19, 20) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(10, 19, '09:00'), +(10, 19, '11:00'), +(10, 19, '13:00'), +(10, 19, '15:00'), +(10, 19, '17:00'), +(10, 19, '19:00'), +(10, 19, '21:00'), +(10, 20, '09:00'), +(10, 20, '11:00'), +(10, 20, '13:00'), +(10, 20, '15:00'), +(10, 20, '17:00'), +(10, 20, '19:00'), +(10, 20, '21:00'); + +-- 영화11 상영 데이터 (상영관 21, 22) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(11, 21, '09:00'), +(11, 21, '11:00'), +(11, 21, '13:00'), +(11, 21, '15:00'), +(11, 21, '17:00'), +(11, 21, '19:00'), +(11, 21, '21:00'), +(11, 22, '09:00'), +(11, 22, '11:00'), +(11, 22, '13:00'), +(11, 22, '15:00'), +(11, 22, '17:00'), +(11, 22, '19:00'), +(11, 22, '21:00'); + +-- 영화12 상영 데이터 (상영관 23, 24) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(12, 23, '09:00'), +(12, 23, '11:00'), +(12, 23, '13:00'), +(12, 23, '15:00'), +(12, 23, '17:00'), +(12, 23, '19:00'), +(12, 23, '21:00'), +(12, 24, '09:00'), +(12, 24, '11:00'), +(12, 24, '13:00'), +(12, 24, '15:00'), +(12, 24, '17:00'), +(12, 24, '19:00'), +(12, 24, '21:00'); + +-- 영화13 상영 데이터 (상영관 25, 26) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(13, 25, '09:00'), +(13, 25, '11:00'), +(13, 25, '13:00'), +(13, 25, '15:00'), +(13, 25, '17:00'), +(13, 25, '19:00'), +(13, 25, '21:00'), +(13, 26, '09:00'), +(13, 26, '11:00'), +(13, 26, '13:00'), +(13, 26, '15:00'), +(13, 26, '17:00'), +(13, 26, '19:00'), +(13, 26, '21:00'); + +-- 영화14 상영 데이터 (상영관 27, 28) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(14, 27, '09:00'), +(14, 27, '11:00'), +(14, 27, '13:00'), +(14, 27, '15:00'), +(14, 27, '17:00'), +(14, 27, '19:00'), +(14, 27, '21:00'), +(14, 28, '09:00'), +(14, 28, '11:00'), +(14, 28, '13:00'), +(14, 28, '15:00'), +(14, 28, '17:00'), +(14, 28, '19:00'), +(14, 28, '21:00'); + +-- 영화15 상영 데이터 (상영관 29, 30) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(15, 29, '09:00'), +(15, 29, '11:00'), +(15, 29, '13:00'), +(15, 29, '15:00'), +(15, 29, '17:00'), +(15, 29, '19:00'), +(15, 29, '21:00'), +(15, 30, '09:00'), +(15, 30, '11:00'), +(15, 30, '13:00'), +(15, 30, '15:00'), +(15, 30, '17:00'), +(15, 30, '19:00'), +(15, 30, '21:00'); + +-- 영화16 상영 데이터 (상영관 31, 32) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(16, 31, '09:00'), +(16, 31, '11:00'), +(16, 31, '13:00'), +(16, 31, '15:00'), +(16, 31, '17:00'), +(16, 31, '19:00'), +(16, 31, '21:00'), +(16, 32, '09:00'), +(16, 32, '11:00'), +(16, 32, '13:00'), +(16, 32, '15:00'), +(16, 32, '17:00'), +(16, 32, '19:00'), +(16, 32, '21:00'); + +-- 영화17 상영 데이터 (상영관 33, 34) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(17, 33, '09:00'), +(17, 33, '11:00'), +(17, 33, '13:00'), +(17, 33, '15:00'), +(17, 33, '17:00'), +(17, 33, '19:00'), +(17, 33, '21:00'), +(17, 34, '09:00'), +(17, 34, '11:00'), +(17, 34, '13:00'), +(17, 34, '15:00'), +(17, 34, '17:00'), +(17, 34, '19:00'), +(17, 34, '21:00'); + +-- 영화18 상영 데이터 (상영관 35, 36) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(18, 35, '09:00'), +(18, 35, '11:00'), +(18, 35, '13:00'), +(18, 35, '15:00'), +(18, 35, '17:00'), +(18, 35, '19:00'), +(18, 35, '21:00'), +(18, 36, '09:00'), +(18, 36, '11:00'), +(18, 36, '13:00'), +(18, 36, '15:00'), +(18, 36, '17:00'), +(18, 36, '19:00'), +(18, 36, '21:00'); + +-- 영화19 상영 데이터 (상영관 37, 38) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(19, 37, '09:00'), +(19, 37, '11:00'), +(19, 37, '13:00'), +(19, 37, '15:00'), +(19, 37, '17:00'), +(19, 37, '19:00'), +(19, 37, '21:00'), +(19, 38, '09:00'), +(19, 38, '11:00'), +(19, 38, '13:00'), +(19, 38, '15:00'), +(19, 38, '17:00'), +(19, 38, '19:00'), +(19, 38, '21:00'); + +-- 영화20 상영 데이터 (상영관 39, 40) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(20, 39, '09:00'), +(20, 39, '11:00'), +(20, 39, '13:00'), +(20, 39, '15:00'), +(20, 39, '17:00'), +(20, 39, '19:00'), +(20, 39, '21:00'), +(20, 40, '09:00'), +(20, 40, '11:00'), +(20, 40, '13:00'), +(20, 40, '15:00'), +(20, 40, '17:00'), +(20, 40, '19:00'), +(20, 40, '21:00'); + +-- 영화21 상영 데이터 (상영관 41, 42) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(21, 41, '09:00'), +(21, 41, '11:00'), +(21, 41, '13:00'), +(21, 41, '15:00'), +(21, 41, '17:00'), +(21, 41, '19:00'), +(21, 41, '21:00'), +(21, 42, '09:00'), +(21, 42, '11:00'), +(21, 42, '13:00'), +(21, 42, '15:00'), +(21, 42, '17:00'), +(21, 42, '19:00'), +(21, 42, '21:00'); + +-- 영화22 상영 데이터 (상영관 43, 44) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(22, 43, '09:00'), +(22, 43, '11:00'), +(22, 43, '13:00'), +(22, 43, '15:00'), +(22, 43, '17:00'), +(22, 43, '19:00'), +(22, 43, '21:00'), +(22, 44, '09:00'), +(22, 44, '11:00'), +(22, 44, '13:00'), +(22, 44, '15:00'), +(22, 44, '17:00'), +(22, 44, '19:00'), +(22, 44, '21:00'); + +-- 영화23 상영 데이터 (상영관 45, 46) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(23, 45, '09:00'), +(23, 45, '11:00'), +(23, 45, '13:00'), +(23, 45, '15:00'), +(23, 45, '17:00'), +(23, 45, '19:00'), +(23, 45, '21:00'), +(23, 46, '09:00'), +(23, 46, '11:00'), +(23, 46, '13:00'), +(23, 46, '15:00'), +(23, 46, '17:00'), +(23, 46, '19:00'), +(23, 46, '21:00'); + +-- 영화24 상영 데이터 (상영관 47, 48) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(24, 47, '09:00'), +(24, 47, '11:00'), +(24, 47, '13:00'), +(24, 47, '15:00'), +(24, 47, '17:00'), +(24, 47, '19:00'), +(24, 47, '21:00'), +(24, 48, '09:00'), +(24, 48, '11:00'), +(24, 48, '13:00'), +(24, 48, '15:00'), +(24, 48, '17:00'), +(24, 48, '19:00'), +(24, 48, '21:00'); + +-- 영화25 상영 데이터 (상영관 49, 50) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(25, 49, '09:00'), +(25, 49, '11:00'), +(25, 49, '13:00'), +(25, 49, '15:00'), +(25, 49, '17:00'), +(25, 49, '19:00'), +(25, 49, '21:00'), +(25, 50, '09:00'), +(25, 50, '11:00'), +(25, 50, '13:00'), +(25, 50, '15:00'), +(25, 50, '17:00'), +(25, 50, '19:00'), +(25, 50, '21:00'); + +-- 영화26 상영 데이터 (상영관 51, 52) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(26, 51, '09:00'), +(26, 51, '11:00'), +(26, 51, '13:00'), +(26, 51, '15:00'), +(26, 51, '17:00'), +(26, 51, '19:00'), +(26, 51, '21:00'), +(26, 52, '09:00'), +(26, 52, '11:00'), +(26, 52, '13:00'), +(26, 52, '15:00'), +(26, 52, '17:00'), +(26, 52, '19:00'), +(26, 52, '21:00'); + +-- 영화27 상영 데이터 (상영관 53, 54) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(27, 53, '09:00'), +(27, 53, '11:00'), +(27, 53, '13:00'), +(27, 53, '15:00'), +(27, 53, '17:00'), +(27, 53, '19:00'), +(27, 53, '21:00'), +(27, 54, '09:00'), +(27, 54, '11:00'), +(27, 54, '13:00'), +(27, 54, '15:00'), +(27, 54, '17:00'), +(27, 54, '19:00'), +(27, 54, '21:00'); + +-- 영화28 상영 데이터 (상영관 55, 56) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(28, 55, '09:00'), +(28, 55, '11:00'), +(28, 55, '13:00'), +(28, 55, '15:00'), +(28, 55, '17:00'), +(28, 55, '19:00'), +(28, 55, '21:00'), +(28, 56, '09:00'), +(28, 56, '11:00'), +(28, 56, '13:00'), +(28, 56, '15:00'), +(28, 56, '17:00'), +(28, 56, '19:00'), +(28, 56, '21:00'); + +-- 영화29 상영 데이터 (상영관 57, 58) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(29, 57, '09:00'), +(29, 57, '11:00'), +(29, 57, '13:00'), +(29, 57, '15:00'), +(29, 57, '17:00'), +(29, 57, '19:00'), +(29, 57, '21:00'), +(29, 58, '09:00'), +(29, 58, '11:00'), +(29, 58, '13:00'), +(29, 58, '15:00'), +(29, 58, '17:00'), +(29, 58, '19:00'), +(29, 58, '21:00'); + +-- 영화30 상영 데이터 (상영관 59, 60) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(30, 59, '09:00'), +(30, 59, '11:00'), +(30, 59, '13:00'), +(30, 59, '15:00'), +(30, 59, '17:00'), +(30, 59, '19:00'), +(30, 59, '21:00'), +(30, 60, '09:00'), +(30, 60, '11:00'), +(30, 60, '13:00'), +(30, 60, '15:00'), +(30, 60, '17:00'), +(30, 60, '19:00'), +(30, 60, '21:00'); + +-- 영화31 상영 데이터 (상영관 61, 62) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(31, 61, '09:00'), +(31, 61, '11:00'), +(31, 61, '13:00'), +(31, 61, '15:00'), +(31, 61, '17:00'), +(31, 61, '19:00'), +(31, 61, '21:00'), +(31, 62, '09:00'), +(31, 62, '11:00'), +(31, 62, '13:00'), +(31, 62, '15:00'), +(31, 62, '17:00'), +(31, 62, '19:00'), +(31, 62, '21:00'); + +-- 영화32 상영 데이터 (상영관 63, 64) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(32, 63, '09:00'), +(32, 63, '11:00'), +(32, 63, '13:00'), +(32, 63, '15:00'), +(32, 63, '17:00'), +(32, 63, '19:00'), +(32, 63, '21:00'), +(32, 64, '09:00'), +(32, 64, '11:00'), +(32, 64, '13:00'), +(32, 64, '15:00'), +(32, 64, '17:00'), +(32, 64, '19:00'), +(32, 64, '21:00'); + +-- 영화33 상영 데이터 (상영관 65, 66) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(33, 65, '09:00'), +(33, 65, '11:00'), +(33, 65, '13:00'), +(33, 65, '15:00'), +(33, 65, '17:00'), +(33, 65, '19:00'), +(33, 65, '21:00'), +(33, 66, '09:00'), +(33, 66, '11:00'), +(33, 66, '13:00'), +(33, 66, '15:00'), +(33, 66, '17:00'), +(33, 66, '19:00'), +(33, 66, '21:00'); + +-- 영화34 상영 데이터 (상영관 67, 68) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(34, 67, '09:00'), +(34, 67, '11:00'), +(34, 67, '13:00'), +(34, 67, '15:00'), +(34, 67, '17:00'), +(34, 67, '19:00'), +(34, 67, '21:00'), +(34, 68, '09:00'), +(34, 68, '11:00'), +(34, 68, '13:00'), +(34, 68, '15:00'), +(34, 68, '17:00'), +(34, 68, '19:00'), +(34, 68, '21:00'); + +-- 영화35 상영 데이터 (상영관 69, 70) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(35, 69, '09:00'), +(35, 69, '11:00'), +(35, 69, '13:00'), +(35, 69, '15:00'), +(35, 69, '17:00'), +(35, 69, '19:00'), +(35, 69, '21:00'), +(35, 70, '09:00'), +(35, 70, '11:00'), +(35, 70, '13:00'), +(35, 70, '15:00'), +(35, 70, '17:00'), +(35, 70, '19:00'), +(35, 70, '21:00'); + +-- 영화36 상영 데이터 (상영관 71, 72) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(36, 71, '09:00'), +(36, 71, '11:00'), +(36, 71, '13:00'), +(36, 71, '15:00'), +(36, 71, '17:00'), +(36, 71, '19:00'), +(36, 71, '21:00'), +(36, 72, '09:00'), +(36, 72, '11:00'), +(36, 72, '13:00'), +(36, 72, '15:00'), +(36, 72, '17:00'), +(36, 72, '19:00'), +(36, 72, '21:00'); + +-- 영화37 상영 데이터 (상영관 73, 74) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(37, 73, '09:00'), +(37, 73, '11:00'), +(37, 73, '13:00'), +(37, 73, '15:00'), +(37, 73, '17:00'), +(37, 73, '19:00'), +(37, 73, '21:00'), +(37, 74, '09:00'), +(37, 74, '11:00'), +(37, 74, '13:00'), +(37, 74, '15:00'), +(37, 74, '17:00'), +(37, 74, '19:00'), +(37, 74, '21:00'); + +-- 영화38 상영 데이터 (상영관 75, 76) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(38, 75, '09:00'), +(38, 75, '11:00'), +(38, 75, '13:00'), +(38, 75, '15:00'), +(38, 75, '17:00'), +(38, 75, '19:00'), +(38, 75, '21:00'), +(38, 76, '09:00'), +(38, 76, '11:00'), +(38, 76, '13:00'), +(38, 76, '15:00'), +(38, 76, '17:00'), +(38, 76, '19:00'), +(38, 76, '21:00'); + +-- 영화39 상영 데이터 (상영관 77, 78) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(39, 77, '09:00'), +(39, 77, '11:00'), +(39, 77, '13:00'), +(39, 77, '15:00'), +(39, 77, '17:00'), +(39, 77, '19:00'), +(39, 77, '21:00'), +(39, 78, '09:00'), +(39, 78, '11:00'), +(39, 78, '13:00'), +(39, 78, '15:00'), +(39, 78, '17:00'), +(39, 78, '19:00'), +(39, 78, '21:00'); + +-- 영화40 상영 데이터 (상영관 79, 80) +INSERT INTO screening (movie_id, theater_id, start_time) VALUES +(40, 79, '09:00'), +(40, 79, '11:00'), +(40, 79, '13:00'), +(40, 79, '15:00'), +(40, 79, '17:00'), +(40, 79, '19:00'), +(40, 79, '21:00'), +(40, 80, '09:00'), +(40, 80, '11:00'), +(40, 80, '13:00'), +(40, 80, '15:00'), +(40, 80, '17:00'), +(40, 80, '19:00'), +(40, 80, '21:00'); + +-- Seat 데이터 삽입 +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(1, 'A', 1), (1, 'A', 2), (1, 'A', 3), (1, 'A', 4), (1, 'A', 5), +(1, 'B', 1), (1, 'B', 2), (1, 'B', 3), (1, 'B', 4), (1, 'B', 5), +(1, 'C', 1), (1, 'C', 2), (1, 'C', 3), (1, 'C', 4), (1, 'C', 5), +(1, 'D', 1), (1, 'D', 2), (1, 'D', 3), (1, 'D', 4), (1, 'D', 5), +(1, 'E', 1), (1, 'E', 2), (1, 'E', 3), (1, 'E', 4), (1, 'E', 5), + +(2, 'A', 1), (2, 'A', 2), (2, 'A', 3), (2, 'A', 4), (2, 'A', 5), +(2, 'B', 1), (2, 'B', 2), (2, 'B', 3), (2, 'B', 4), (2, 'B', 5), +(2, 'C', 1), (2, 'C', 2), (2, 'C', 3), (2, 'C', 4), (2, 'C', 5), +(2, 'D', 1), (2, 'D', 2), (2, 'D', 3), (2, 'D', 4), (2, 'D', 5), +(2, 'E', 1), (2, 'E', 2), (2, 'E', 3), (2, 'E', 4), (2, 'E', 5), + +(3, 'A', 1), (3, 'A', 2), (3, 'A', 3), (3, 'A', 4), (3, 'A', 5), +(3, 'B', 1), (3, 'B', 2), (3, 'B', 3), (3, 'B', 4), (3, 'B', 5), +(3, 'C', 1), (3, 'C', 2), (3, 'C', 3), (3, 'C', 4), (3, 'C', 5), +(3, 'D', 1), (3, 'D', 2), (3, 'D', 3), (3, 'D', 4), (3, 'D', 5), +(3, 'E', 1), (3, 'E', 2), (3, 'E', 3), (3, 'E', 4), (3, 'E', 5), + +(4, 'A', 1), (4, 'A', 2), (4, 'A', 3), (4, 'A', 4), (4, 'A', 5), +(4, 'B', 1), (4, 'B', 2), (4, 'B', 3), (4, 'B', 4), (4, 'B', 5), +(4, 'C', 1), (4, 'C', 2), (4, 'C', 3), (4, 'C', 4), (4, 'C', 5), +(4, 'D', 1), (4, 'D', 2), (4, 'D', 3), (4, 'D', 4), (4, 'D', 5), +(4, 'E', 1), (4, 'E', 2), (4, 'E', 3), (4, 'E', 4), (4, 'E', 5), + +(5, 'A', 1), (5, 'A', 2), (5, 'A', 3), (5, 'A', 4), (5, 'A', 5), +(5, 'B', 1), (5, 'B', 2), (5, 'B', 3), (5, 'B', 4), (5, 'B', 5), +(5, 'C', 1), (5, 'C', 2), (5, 'C', 3), (5, 'C', 4), (5, 'C', 5), +(5, 'D', 1), (5, 'D', 2), (5, 'D', 3), (5, 'D', 4), (5, 'D', 5), +(5, 'E', 1), (5, 'E', 2), (5, 'E', 3), (5, 'E', 4), (5, 'E', 5); + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(6, 'A', 1), (6, 'A', 2), (6, 'A', 3), (6, 'A', 4), (6, 'A', 5), +(6, 'B', 1), (6, 'B', 2), (6, 'B', 3), (6, 'B', 4), (6, 'B', 5), +(6, 'C', 1), (6, 'C', 2), (6, 'C', 3), (6, 'C', 4), (6, 'C', 5), +(6, 'D', 1), (6, 'D', 2), (6, 'D', 3), (6, 'D', 4), (6, 'D', 5), +(6, 'E', 1), (6, 'E', 2), (6, 'E', 3), (6, 'E', 4), (6, 'E', 5), + +(7, 'A', 1), (7, 'A', 2), (7, 'A', 3), (7, 'A', 4), (7, 'A', 5), +(7, 'B', 1), (7, 'B', 2), (7, 'B', 3), (7, 'B', 4), (7, 'B', 5), +(7, 'C', 1), (7, 'C', 2), (7, 'C', 3), (7, 'C', 4), (7, 'C', 5), +(7, 'D', 1), (7, 'D', 2), (7, 'D', 3), (7, 'D', 4), (7, 'D', 5), +(7, 'E', 1), (7, 'E', 2), (7, 'E', 3), (7, 'E', 4), (7, 'E', 5), + +(8, 'A', 1), (8, 'A', 2), (8, 'A', 3), (8, 'A', 4), (8, 'A', 5), +(8, 'B', 1), (8, 'B', 2), (8, 'B', 3), (8, 'B', 4), (8, 'B', 5), +(8, 'C', 1), (8, 'C', 2), (8, 'C', 3), (8, 'C', 4), (8, 'C', 5), +(8, 'D', 1), (8, 'D', 2), (8, 'D', 3), (8, 'D', 4), (8, 'D', 5), +(8, 'E', 1), (8, 'E', 2), (8, 'E', 3), (8, 'E', 4), (8, 'E', 5), + +(9, 'A', 1), (9, 'A', 2), (9, 'A', 3), (9, 'A', 4), (9, 'A', 5), +(9, 'B', 1), (9, 'B', 2), (9, 'B', 3), (9, 'B', 4), (9, 'B', 5), +(9, 'C', 1), (9, 'C', 2), (9, 'C', 3), (9, 'C', 4), (9, 'C', 5), +(9, 'D', 1), (9, 'D', 2), (9, 'D', 3), (9, 'D', 4), (9, 'D', 5), +(9, 'E', 1), (9, 'E', 2), (9, 'E', 3), (9, 'E', 4), (9, 'E', 5), + +(10, 'A', 1), (10, 'A', 2), (10, 'A', 3), (10, 'A', 4), (10, 'A', 5), +(10, 'B', 1), (10, 'B', 2), (10, 'B', 3), (10, 'B', 4), (10, 'B', 5), +(10, 'C', 1), (10, 'C', 2), (10, 'C', 3), (10, 'C', 4), (10, 'C', 5), +(10, 'D', 1), (10, 'D', 2), (10, 'D', 3), (10, 'D', 4), (10, 'D', 5), +(10, 'E', 1), (10, 'E', 2), (10, 'E', 3), (10, 'E', 4), (10, 'E', 5); + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(11, 'A', 1), (11, 'A', 2), (11, 'A', 3), (11, 'A', 4), (11, 'A', 5), +(11, 'B', 1), (11, 'B', 2), (11, 'B', 3), (11, 'B', 4), (11, 'B', 5), +(11, 'C', 1), (11, 'C', 2), (11, 'C', 3), (11, 'C', 4), (11, 'C', 5), +(11, 'D', 1), (11, 'D', 2), (11, 'D', 3), (11, 'D', 4), (11, 'D', 5), +(11, 'E', 1), (11, 'E', 2), (11, 'E', 3), (11, 'E', 4), (11, 'E', 5), + +(12, 'A', 1), (12, 'A', 2), (12, 'A', 3), (12, 'A', 4), (12, 'A', 5), +(12, 'B', 1), (12, 'B', 2), (12, 'B', 3), (12, 'B', 4), (12, 'B', 5), +(12, 'C', 1), (12, 'C', 2), (12, 'C', 3), (12, 'C', 4), (12, 'C', 5), +(12, 'D', 1), (12, 'D', 2), (12, 'D', 3), (12, 'D', 4), (12, 'D', 5), +(12, 'E', 1), (12, 'E', 2), (12, 'E', 3), (12, 'E', 4), (12, 'E', 5), + +(13, 'A', 1), (13, 'A', 2), (13, 'A', 3), (13, 'A', 4), (13, 'A', 5), +(13, 'B', 1), (13, 'B', 2), (13, 'B', 3), (13, 'B', 4), (13, 'B', 5), +(13, 'C', 1), (13, 'C', 2), (13, 'C', 3), (13, 'C', 4), (13, 'C', 5), +(13, 'D', 1), (13, 'D', 2), (13, 'D', 3), (13, 'D', 4), (13, 'D', 5), +(13, 'E', 1), (13, 'E', 2), (13, 'E', 3), (13, 'E', 4), (13, 'E', 5), + +(14, 'A', 1), (14, 'A', 2), (14, 'A', 3), (14, 'A', 4), (14, 'A', 5), +(14, 'B', 1), (14, 'B', 2), (14, 'B', 3), (14, 'B', 4), (14, 'B', 5), +(14, 'C', 1), (14, 'C', 2), (14, 'C', 3), (14, 'C', 4), (14, 'C', 5), +(14, 'D', 1), (14, 'D', 2), (14, 'D', 3), (14, 'D', 4), (14, 'D', 5), +(14, 'E', 1), (14, 'E', 2), (14, 'E', 3), (14, 'E', 4), (14, 'E', 5); + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(15, 'A', 1), (15, 'A', 2), (15, 'A', 3), (15, 'A', 4), (15, 'A', 5), +(15, 'B', 1), (15, 'B', 2), (15, 'B', 3), (15, 'B', 4), (15, 'B', 5), +(15, 'C', 1), (15, 'C', 2), (15, 'C', 3), (15, 'C', 4), (15, 'C', 5), +(15, 'D', 1), (15, 'D', 2), (15, 'D', 3), (15, 'D', 4), (15, 'D', 5), +(15, 'E', 1), (15, 'E', 2), (15, 'E', 3), (15, 'E', 4), (15, 'E', 5), + +(16, 'A', 1), (16, 'A', 2), (16, 'A', 3), (16, 'A', 4), (16, 'A', 5), +(16, 'B', 1), (16, 'B', 2), (16, 'B', 3), (16, 'B', 4), (16, 'B', 5), +(16, 'C', 1), (16, 'C', 2), (16, 'C', 3), (16, 'C', 4), (16, 'C', 5), +(16, 'D', 1), (16, 'D', 2), (16, 'D', 3), (16, 'D', 4), (16, 'D', 5), +(16, 'E', 1), (16, 'E', 2), (16, 'E', 3), (16, 'E', 4), (16, 'E', 5), + +(17, 'A', 1), (17, 'A', 2), (17, 'A', 3), (17, 'A', 4), (17, 'A', 5), +(17, 'B', 1), (17, 'B', 2), (17, 'B', 3), (17, 'B', 4), (17, 'B', 5), +(17, 'C', 1), (17, 'C', 2), (17, 'C', 3), (17, 'C', 4), (17, 'C', 5), +(17, 'D', 1), (17, 'D', 2), (17, 'D', 3), (17, 'D', 4), (17, 'D', 5), +(17, 'E', 1), (17, 'E', 2), (17, 'E', 3), (17, 'E', 4), (17, 'E', 5), + +(18, 'A', 1), (18, 'A', 2), (18, 'A', 3), (18, 'A', 4), (18, 'A', 5), +(18, 'B', 1), (18, 'B', 2), (18, 'B', 3), (18, 'B', 4), (18, 'B', 5), +(18, 'C', 1), (18, 'C', 2), (18, 'C', 3), (18, 'C', 4), (18, 'C', 5), +(18, 'D', 1), (18, 'D', 2), (18, 'D', 3), (18, 'D', 4), (18, 'D', 5), +(18, 'E', 1), (18, 'E', 2), (18, 'E', 3), (18, 'E', 4), (18, 'E', 5), + +(19, 'A', 1), (19, 'A', 2), (19, 'A', 3), (19, 'A', 4), (19, 'A', 5), +(19, 'B', 1), (19, 'B', 2), (19, 'B', 3), (19, 'B', 4), (19, 'B', 5), +(19, 'C', 1), (19, 'C', 2), (19, 'C', 3), (19, 'C', 4), (19, 'C', 5), +(19, 'D', 1), (19, 'D', 2), (19, 'D', 3), (19, 'D', 4), (19, 'D', 5), +(19, 'E', 1), (19, 'E', 2), (19, 'E', 3), (19, 'E', 4), (19, 'E', 5), + +(20, 'A', 1), (20, 'A', 2), (20, 'A', 3), (20, 'A', 4), (20, 'A', 5), +(20, 'B', 1), (20, 'B', 2), (20, 'B', 3), (20, 'B', 4), (20, 'B', 5), +(20, 'C', 1), (20, 'C', 2), (20, 'C', 3), (20, 'C', 4), (20, 'C', 5), +(20, 'D', 1), (20, 'D', 2), (20, 'D', 3), (20, 'D', 4), (20, 'D', 5), +(20, 'E', 1), (20, 'E', 2), (20, 'E', 3), (20, 'E', 4), (20, 'E', 5); + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(21, 'A', 1), (21, 'A', 2), (21, 'A', 3), (21, 'A', 4), (21, 'A', 5), +(21, 'B', 1), (21, 'B', 2), (21, 'B', 3), (21, 'B', 4), (21, 'B', 5), +(21, 'C', 1), (21, 'C', 2), (21, 'C', 3), (21, 'C', 4), (21, 'C', 5), +(21, 'D', 1), (21, 'D', 2), (21, 'D', 3), (21, 'D', 4), (21, 'D', 5), +(21, 'E', 1), (21, 'E', 2), (21, 'E', 3), (21, 'E', 4), (21, 'E', 5), + +(22, 'A', 1), (22, 'A', 2), (22, 'A', 3), (22, 'A', 4), (22, 'A', 5), +(22, 'B', 1), (22, 'B', 2), (22, 'B', 3), (22, 'B', 4), (22, 'B', 5), +(22, 'C', 1), (22, 'C', 2), (22, 'C', 3), (22, 'C', 4), (22, 'C', 5), +(22, 'D', 1), (22, 'D', 2), (22, 'D', 3), (22, 'D', 4), (22, 'D', 5), +(22, 'E', 1), (22, 'E', 2), (22, 'E', 3), (22, 'E', 4), (22, 'E', 5), + +(23, 'A', 1), (23, 'A', 2), (23, 'A', 3), (23, 'A', 4), (23, 'A', 5), +(23, 'B', 1), (23, 'B', 2), (23, 'B', 3), (23, 'B', 4), (23, 'B', 5), +(23, 'C', 1), (23, 'C', 2), (23, 'C', 3), (23, 'C', 4), (23, 'C', 5), +(23, 'D', 1), (23, 'D', 2), (23, 'D', 3), (23, 'D', 4), (23, 'D', 5), +(23, 'E', 1), (23, 'E', 2), (23, 'E', 3), (23, 'E', 4), (23, 'E', 5), + +(24, 'A', 1), (24, 'A', 2), (24, 'A', 3), (24, 'A', 4), (24, 'A', 5), +(24, 'B', 1), (24, 'B', 2), (24, 'B', 3), (24, 'B', 4), (24, 'B', 5), +(24, 'C', 1), (24, 'C', 2), (24, 'C', 3), (24, 'C', 4), (24, 'C', 5), +(24, 'D', 1), (24, 'D', 2), (24, 'D', 3), (24, 'D', 4), (24, 'D', 5), +(24, 'E', 1), (24, 'E', 2), (24, 'E', 3), (24, 'E', 4), (24, 'E', 5), + +(25, 'A', 1), (25, 'A', 2), (25, 'A', 3), (25, 'A', 4), (25, 'A', 5), +(25, 'B', 1), (25, 'B', 2), (25, 'B', 3), (25, 'B', 4), (25, 'B', 5), +(25, 'C', 1), (25, 'C', 2), (25, 'C', 3), (25, 'C', 4), (25, 'C', 5), +(25, 'D', 1), (25, 'D', 2), (25, 'D', 3), (25, 'D', 4), (25, 'D', 5), +(25, 'E', 1), (25, 'E', 2), (25, 'E', 3), (25, 'E', 4), (25, 'E', 5), + +(26, 'A', 1), (26, 'A', 2), (26, 'A', 3), (26, 'A', 4), (26, 'A', 5), +(26, 'B', 1), (26, 'B', 2), (26, 'B', 3), (26, 'B', 4), (26, 'B', 5), +(26, 'C', 1), (26, 'C', 2), (26, 'C', 3), (26, 'C', 4), (26, 'C', 5), +(26, 'D', 1), (26, 'D', 2), (26, 'D', 3), (26, 'D', 4), (26, 'D', 5), +(26, 'E', 1), (26, 'E', 2), (26, 'E', 3), (26, 'E', 4), (26, 'E', 5), + +(27, 'A', 1), (27, 'A', 2), (27, 'A', 3), (27, 'A', 4), (27, 'A', 5), +(27, 'B', 1), (27, 'B', 2), (27, 'B', 3), (27, 'B', 4), (27, 'B', 5), +(27, 'C', 1), (27, 'C', 2), (27, 'C', 3), (27, 'C', 4), (27, 'C', 5), +(27, 'D', 1), (27, 'D', 2), (27, 'D', 3), (27, 'D', 4), (27, 'D', 5), +(27, 'E', 1), (27, 'E', 2), (27, 'E', 3), (27, 'E', 4), (27, 'E', 5), + +(28, 'A', 1), (28, 'A', 2), (28, 'A', 3), (28, 'A', 4), (28, 'A', 5), +(28, 'B', 1), (28, 'B', 2), (28, 'B', 3), (28, 'B', 4), (28, 'B', 5), +(28, 'C', 1), (28, 'C', 2), (28, 'C', 3), (28, 'C', 4), (28, 'C', 5), +(28, 'D', 1), (28, 'D', 2), (28, 'D', 3), (28, 'D', 4), (28, 'D', 5), +(28, 'E', 1), (28, 'E', 2), (28, 'E', 3), (28, 'E', 4), (28, 'E', 5), + +(29, 'A', 1), (29, 'A', 2), (29, 'A', 3), (29, 'A', 4), (29, 'A', 5), +(29, 'B', 1), (29, 'B', 2), (29, 'B', 3), (29, 'B', 4), (29, 'B', 5), +(29, 'C', 1), (29, 'C', 2), (29, 'C', 3), (29, 'C', 4), (29, 'C', 5), +(29, 'D', 1), (29, 'D', 2), (29, 'D', 3), (29, 'D', 4), (29, 'D', 5), +(29, 'E', 1), (29, 'E', 2), (29, 'E', 3), (29, 'E', 4), (29, 'E', 5), + +(30, 'A', 1), (30, 'A', 2), (30, 'A', 3), (30, 'A', 4), (30, 'A', 5), +(30, 'B', 1), (30, 'B', 2), (30, 'B', 3), (30, 'B', 4), (30, 'B', 5), +(30, 'C', 1), (30, 'C', 2), (30, 'C', 3), (30, 'C', 4), (30, 'C', 5), +(30, 'D', 1), (30, 'D', 2), (30, 'D', 3), (30, 'D', 4), (30, 'D', 5), +(30, 'E', 1), (30, 'E', 2), (30, 'E', 3), (30, 'E', 4), (30, 'E', 5); + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(31, 'A', 1), (31, 'A', 2), (31, 'A', 3), (31, 'A', 4), (31, 'A', 5), +(31, 'B', 1), (31, 'B', 2), (31, 'B', 3), (31, 'B', 4), (31, 'B', 5), +(31, 'C', 1), (31, 'C', 2), (31, 'C', 3), (31, 'C', 4), (31, 'C', 5), +(31, 'D', 1), (31, 'D', 2), (31, 'D', 3), (31, 'D', 4), (31, 'D', 5), +(31, 'E', 1), (31, 'E', 2), (31, 'E', 3), (31, 'E', 4), (31, 'E', 5), + +(32, 'A', 1), (32, 'A', 2), (32, 'A', 3), (32, 'A', 4), (32, 'A', 5), +(32, 'B', 1), (32, 'B', 2), (32, 'B', 3), (32, 'B', 4), (32, 'B', 5), +(32, 'C', 1), (32, 'C', 2), (32, 'C', 3), (32, 'C', 4), (32, 'C', 5), +(32, 'D', 1), (32, 'D', 2), (32, 'D', 3), (32, 'D', 4), (32, 'D', 5), +(32, 'E', 1), (32, 'E', 2), (32, 'E', 3), (32, 'E', 4), (32, 'E', 5), + +(33, 'A', 1), (33, 'A', 2), (33, 'A', 3), (33, 'A', 4), (33, 'A', 5), +(33, 'B', 1), (33, 'B', 2), (33, 'B', 3), (33, 'B', 4), (33, 'B', 5), +(33, 'C', 1), (33, 'C', 2), (33, 'C', 3), (33, 'C', 4), (33, 'C', 5), +(33, 'D', 1), (33, 'D', 2), (33, 'D', 3), (33, 'D', 4), (33, 'D', 5), +(33, 'E', 1), (33, 'E', 2), (33, 'E', 3), (33, 'E', 4), (33, 'E', 5), + +(34, 'A', 1), (34, 'A', 2), (34, 'A', 3), (34, 'A', 4), (34, 'A', 5), +(34, 'B', 1), (34, 'B', 2), (34, 'B', 3), (34, 'B', 4), (34, 'B', 5), +(34, 'C', 1), (34, 'C', 2), (34, 'C', 3), (34, 'C', 4), (34, 'C', 5), +(34, 'D', 1), (34, 'D', 2), (34, 'D', 3), (34, 'D', 4), (34, 'D', 5), +(34, 'E', 1), (34, 'E', 2), (34, 'E', 3), (34, 'E', 4), (34, 'E', 5), + +(35, 'A', 1), (35, 'A', 2), (35, 'A', 3), (35, 'A', 4), (35, 'A', 5), +(35, 'B', 1), (35, 'B', 2), (35, 'B', 3), (35, 'B', 4), (35, 'B', 5), +(35, 'C', 1), (35, 'C', 2), (35, 'C', 3), (35, 'C', 4), (35, 'C', 5), +(35, 'D', 1), (35, 'D', 2), (35, 'D', 3), (35, 'D', 4), (35, 'D', 5), +(35, 'E', 1), (35, 'E', 2), (35, 'E', 3), (35, 'E', 4), (35, 'E', 5), + +(36, 'A', 1), (36, 'A', 2), (36, 'A', 3), (36, 'A', 4), (36, 'A', 5), +(36, 'B', 1), (36, 'B', 2), (36, 'B', 3), (36, 'B', 4), (36, 'B', 5), +(36, 'C', 1), (36, 'C', 2), (36, 'C', 3), (36, 'C', 4), (36, 'C', 5), +(36, 'D', 1), (36, 'D', 2), (36, 'D', 3), (36, 'D', 4), (36, 'D', 5), +(36, 'E', 1), (36, 'E', 2), (36, 'E', 3), (36, 'E', 4), (36, 'E', 5), + +(37, 'A', 1), (37, 'A', 2), (37, 'A', 3), (37, 'A', 4), (37, 'A', 5), +(37, 'B', 1), (37, 'B', 2), (37, 'B', 3), (37, 'B', 4), (37, 'B', 5), +(37, 'C', 1), (37, 'C', 2), (37, 'C', 3), (37, 'C', 4), (37, 'C', 5), +(37, 'D', 1), (37, 'D', 2), (37, 'D', 3), (37, 'D', 4), (37, 'D', 5), +(37, 'E', 1), (37, 'E', 2), (37, 'E', 3), (37, 'E', 4), (37, 'E', 5), + +(38, 'A', 1), (38, 'A', 2), (38, 'A', 3), (38, 'A', 4), (38, 'A', 5), +(38, 'B', 1), (38, 'B', 2), (38, 'B', 3), (38, 'B', 4), (38, 'B', 5), +(38, 'C', 1), (38, 'C', 2), (38, 'C', 3), (38, 'C', 4), (38, 'C', 5), +(38, 'D', 1), (38, 'D', 2), (38, 'D', 3), (38, 'D', 4), (38, 'D', 5), +(38, 'E', 1), (38, 'E', 2), (38, 'E', 3), (38, 'E', 4), (38, 'E', 5), + +(39, 'A', 1), (39, 'A', 2), (39, 'A', 3), (39, 'A', 4), (39, 'A', 5), +(39, 'B', 1), (39, 'B', 2), (39, 'B', 3), (39, 'B', 4), (39, 'B', 5), +(39, 'C', 1), (39, 'C', 2), (39, 'C', 3), (39, 'C', 4), (39, 'C', 5), +(39, 'D', 1), (39, 'D', 2), (39, 'D', 3), (39, 'D', 4), (39, 'D', 5), +(39, 'E', 1), (39, 'E', 2), (39, 'E', 3), (39, 'E', 4), (39, 'E', 5), + +(40, 'A', 1), (40, 'A', 2), (40, 'A', 3), (40, 'A', 4), (40, 'A', 5), +(40, 'B', 1), (40, 'B', 2), (40, 'B', 3), (40, 'B', 4), (40, 'B', 5), +(40, 'C', 1), (40, 'C', 2), (40, 'C', 3), (40, 'C', 4), (40, 'C', 5), +(40, 'D', 1), (40, 'D', 2), (40, 'D', 3), (40, 'D', 4), (40, 'D', 5), +(40, 'E', 1), (40, 'E', 2), (40, 'E', 3), (40, 'E', 4), (40, 'E', 5); + + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(41, 'A', 1), (41, 'A', 2), (41, 'A', 3), (41, 'A', 4), (41, 'A', 5), +(41, 'B', 1), (41, 'B', 2), (41, 'B', 3), (41, 'B', 4), (41, 'B', 5), +(41, 'C', 1), (41, 'C', 2), (41, 'C', 3), (41, 'C', 4), (41, 'C', 5), +(41, 'D', 1), (41, 'D', 2), (41, 'D', 3), (41, 'D', 4), (41, 'D', 5), +(41, 'E', 1), (41, 'E', 2), (41, 'E', 3), (41, 'E', 4), (41, 'E', 5), + +(42, 'A', 1), (42, 'A', 2), (42, 'A', 3), (42, 'A', 4), (42, 'A', 5), +(42, 'B', 1), (42, 'B', 2), (42, 'B', 3), (42, 'B', 4), (42, 'B', 5), +(42, 'C', 1), (42, 'C', 2), (42, 'C', 3), (42, 'C', 4), (42, 'C', 5), +(42, 'D', 1), (42, 'D', 2), (42, 'D', 3), (42, 'D', 4), (42, 'D', 5), +(42, 'E', 1), (42, 'E', 2), (42, 'E', 3), (42, 'E', 4), (42, 'E', 5), + +(43, 'A', 1), (43, 'A', 2), (43, 'A', 3), (43, 'A', 4), (43, 'A', 5), +(43, 'B', 1), (43, 'B', 2), (43, 'B', 3), (43, 'B', 4), (43, 'B', 5), +(43, 'C', 1), (43, 'C', 2), (43, 'C', 3), (43, 'C', 4), (43, 'C', 5), +(43, 'D', 1), (43, 'D', 2), (43, 'D', 3), (43, 'D', 4), (43, 'D', 5), +(43, 'E', 1), (43, 'E', 2), (43, 'E', 3), (43, 'E', 4), (43, 'E', 5), + +(44, 'A', 1), (44, 'A', 2), (44, 'A', 3), (44, 'A', 4), (44, 'A', 5), +(44, 'B', 1), (44, 'B', 2), (44, 'B', 3), (44, 'B', 4), (44, 'B', 5), +(44, 'C', 1), (44, 'C', 2), (44, 'C', 3), (44, 'C', 4), (44, 'C', 5), +(44, 'D', 1), (44, 'D', 2), (44, 'D', 3), (44, 'D', 4), (44, 'D', 5), +(44, 'E', 1), (44, 'E', 2), (44, 'E', 3), (44, 'E', 4), (44, 'E', 5), + +(45, 'A', 1), (45, 'A', 2), (45, 'A', 3), (45, 'A', 4), (45, 'A', 5), +(45, 'B', 1), (45, 'B', 2), (45, 'B', 3), (45, 'B', 4), (45, 'B', 5), +(45, 'C', 1), (45, 'C', 2), (45, 'C', 3), (45, 'C', 4), (45, 'C', 5), +(45, 'D', 1), (45, 'D', 2), (45, 'D', 3), (45, 'D', 4), (45, 'D', 5), +(45, 'E', 1), (45, 'E', 2), (45, 'E', 3), (45, 'E', 4), (45, 'E', 5); + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(46, 'A', 1), (46, 'A', 2), (46, 'A', 3), (46, 'A', 4), (46, 'A', 5), +(46, 'B', 1), (46, 'B', 2), (46, 'B', 3), (46, 'B', 4), (46, 'B', 5), +(46, 'C', 1), (46, 'C', 2), (46, 'C', 3), (46, 'C', 4), (46, 'C', 5), +(46, 'D', 1), (46, 'D', 2), (46, 'D', 3), (46, 'D', 4), (46, 'D', 5), +(46, 'E', 1), (46, 'E', 2), (46, 'E', 3), (46, 'E', 4), (46, 'E', 5), + +(47, 'A', 1), (47, 'A', 2), (47, 'A', 3), (47, 'A', 4), (47, 'A', 5), +(47, 'B', 1), (47, 'B', 2), (47, 'B', 3), (47, 'B', 4), (47, 'B', 5), +(47, 'C', 1), (47, 'C', 2), (47, 'C', 3), (47, 'C', 4), (47, 'C', 5), +(47, 'D', 1), (47, 'D', 2), (47, 'D', 3), (47, 'D', 4), (47, 'D', 5), +(47, 'E', 1), (47, 'E', 2), (47, 'E', 3), (47, 'E', 4), (47, 'E', 5), + +(48, 'A', 1), (48, 'A', 2), (48, 'A', 3), (48, 'A', 4), (48, 'A', 5), +(48, 'B', 1), (48, 'B', 2), (48, 'B', 3), (48, 'B', 4), (48, 'B', 5), +(48, 'C', 1), (48, 'C', 2), (48, 'C', 3), (48, 'C', 4), (48, 'C', 5), +(48, 'D', 1), (48, 'D', 2), (48, 'D', 3), (48, 'D', 4), (48, 'D', 5), +(48, 'E', 1), (48, 'E', 2), (48, 'E', 3), (48, 'E', 4), (48, 'E', 5), + +(49, 'A', 1), (49, 'A', 2), (49, 'A', 3), (49, 'A', 4), (49, 'A', 5), +(49, 'B', 1), (49, 'B', 2), (49, 'B', 3), (49, 'B', 4), (49, 'B', 5), +(49, 'C', 1), (49, 'C', 2), (49, 'C', 3), (49, 'C', 4), (49, 'C', 5), +(49, 'D', 1), (49, 'D', 2), (49, 'D', 3), (49, 'D', 4), (49, 'D', 5), +(49, 'E', 1), (49, 'E', 2), (49, 'E', 3), (49, 'E', 4), (49, 'E', 5), + +(50, 'A', 1), (50, 'A', 2), (50, 'A', 3), (50, 'A', 4), (50, 'A', 5), +(50, 'B', 1), (50, 'B', 2), (50, 'B', 3), (50, 'B', 4), (50, 'B', 5), +(50, 'C', 1), (50, 'C', 2), (50, 'C', 3), (50, 'C', 4), (50, 'C', 5), +(50, 'D', 1), (50, 'D', 2), (50, 'D', 3), (50, 'D', 4), (50, 'D', 5), +(50, 'E', 1), (50, 'E', 2), (50, 'E', 3), (50, 'E', 4), (50, 'E', 5); + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(51, 'A', 1), (51, 'A', 2), (51, 'A', 3), (51, 'A', 4), (51, 'A', 5), +(51, 'B', 1), (51, 'B', 2), (51, 'B', 3), (51, 'B', 4), (51, 'B', 5), +(51, 'C', 1), (51, 'C', 2), (51, 'C', 3), (51, 'C', 4), (51, 'C', 5), +(51, 'D', 1), (51, 'D', 2), (51, 'D', 3), (51, 'D', 4), (51, 'D', 5), +(51, 'E', 1), (51, 'E', 2), (51, 'E', 3), (51, 'E', 4), (51, 'E', 5), + +(52, 'A', 1), (52, 'A', 2), (52, 'A', 3), (52, 'A', 4), (52, 'A', 5), +(52, 'B', 1), (52, 'B', 2), (52, 'B', 3), (52, 'B', 4), (52, 'B', 5), +(52, 'C', 1), (52, 'C', 2), (52, 'C', 3), (52, 'C', 4), (52, 'C', 5), +(52, 'D', 1), (52, 'D', 2), (52, 'D', 3), (52, 'D', 4), (52, 'D', 5), +(52, 'E', 1), (52, 'E', 2), (52, 'E', 3), (52, 'E', 4), (52, 'E', 5), + +(53, 'A', 1), (53, 'A', 2), (53, 'A', 3), (53, 'A', 4), (53, 'A', 5), +(53, 'B', 1), (53, 'B', 2), (53, 'B', 3), (53, 'B', 4), (53, 'B', 5), +(53, 'C', 1), (53, 'C', 2), (53, 'C', 3), (53, 'C', 4), (53, 'C', 5), +(53, 'D', 1), (53, 'D', 2), (53, 'D', 3), (53, 'D', 4), (53, 'D', 5), +(53, 'E', 1), (53, 'E', 2), (53, 'E', 3), (53, 'E', 4), (53, 'E', 5), + +(54, 'A', 1), (54, 'A', 2), (54, 'A', 3), (54, 'A', 4), (54, 'A', 5), +(54, 'B', 1), (54, 'B', 2), (54, 'B', 3), (54, 'B', 4), (54, 'B', 5), +(54, 'C', 1), (54, 'C', 2), (54, 'C', 3), (54, 'C', 4), (54, 'C', 5), +(54, 'D', 1), (54, 'D', 2), (54, 'D', 3), (54, 'D', 4), (54, 'D', 5), +(54, 'E', 1), (54, 'E', 2), (54, 'E', 3), (54, 'E', 4), (54, 'E', 5), + +(55, 'A', 1), (55, 'A', 2), (55, 'A', 3), (55, 'A', 4), (55, 'A', 5), +(55, 'B', 1), (55, 'B', 2), (55, 'B', 3), (55, 'B', 4), (55, 'B', 5), +(55, 'C', 1), (55, 'C', 2), (55, 'C', 3), (55, 'C', 4), (55, 'C', 5), +(55, 'D', 1), (55, 'D', 2), (55, 'D', 3), (55, 'D', 4), (55, 'D', 5), +(55, 'E', 1), (55, 'E', 2), (55, 'E', 3), (55, 'E', 4), (55, 'E', 5), + +(56, 'A', 1), (56, 'A', 2), (56, 'A', 3), (56, 'A', 4), (56, 'A', 5), +(56, 'B', 1), (56, 'B', 2), (56, 'B', 3), (56, 'B', 4), (56, 'B', 5), +(56, 'C', 1), (56, 'C', 2), (56, 'C', 3), (56, 'C', 4), (56, 'C', 5), +(56, 'D', 1), (56, 'D', 2), (56, 'D', 3), (56, 'D', 4), (56, 'D', 5), +(56, 'E', 1), (56, 'E', 2), (56, 'E', 3), (56, 'E', 4), (56, 'E', 5), + +(57, 'A', 1), (57, 'A', 2), (57, 'A', 3), (57, 'A', 4), (57, 'A', 5), +(57, 'B', 1), (57, 'B', 2), (57, 'B', 3), (57, 'B', 4), (57, 'B', 5), +(57, 'C', 1), (57, 'C', 2), (57, 'C', 3), (57, 'C', 4), (57, 'C', 5), +(57, 'D', 1), (57, 'D', 2), (57, 'D', 3), (57, 'D', 4), (57, 'D', 5), +(57, 'E', 1), (57, 'E', 2), (57, 'E', 3), (57, 'E', 4), (57, 'E', 5), + +(58, 'A', 1), (58, 'A', 2), (58, 'A', 3), (58, 'A', 4), (58, 'A', 5), +(58, 'B', 1), (58, 'B', 2), (58, 'B', 3), (58, 'B', 4), (58, 'B', 5), +(58, 'C', 1), (58, 'C', 2), (58, 'C', 3), (58, 'C', 4), (58, 'C', 5), +(58, 'D', 1), (58, 'D', 2), (58, 'D', 3), (58, 'D', 4), (58, 'D', 5), +(58, 'E', 1), (58, 'E', 2), (58, 'E', 3), (58, 'E', 4), (58, 'E', 5), + +(59, 'A', 1), (59, 'A', 2), (59, 'A', 3), (59, 'A', 4), (59, 'A', 5), +(59, 'B', 1), (59, 'B', 2), (59, 'B', 3), (59, 'B', 4), (59, 'B', 5), +(59, 'C', 1), (59, 'C', 2), (59, 'C', 3), (59, 'C', 4), (59, 'C', 5), +(59, 'D', 1), (59, 'D', 2), (59, 'D', 3), (59, 'D', 4), (59, 'D', 5), +(59, 'E', 1), (59, 'E', 2), (59, 'E', 3), (59, 'E', 4), (59, 'E', 5), + +(60, 'A', 1), (60, 'A', 2), (60, 'A', 3), (60, 'A', 4), (60, 'A', 5), +(60, 'B', 1), (60, 'B', 2), (60, 'B', 3), (60, 'B', 4), (60, 'B', 5), +(60, 'C', 1), (60, 'C', 2), (60, 'C', 3), (60, 'C', 4), (60, 'C', 5), +(60, 'D', 1), (60, 'D', 2), (60, 'D', 3), (60, 'D', 4), (60, 'D', 5), +(60, 'E', 1), (60, 'E', 2), (60, 'E', 3), (60, 'E', 4), (60, 'E', 5); + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(61, 'A', 1), (61, 'A', 2), (61, 'A', 3), (61, 'A', 4), (61, 'A', 5), +(61, 'B', 1), (61, 'B', 2), (61, 'B', 3), (61, 'B', 4), (61, 'B', 5), +(61, 'C', 1), (61, 'C', 2), (61, 'C', 3), (61, 'C', 4), (61, 'C', 5), +(61, 'D', 1), (61, 'D', 2), (61, 'D', 3), (61, 'D', 4), (61, 'D', 5), +(61, 'E', 1), (61, 'E', 2), (61, 'E', 3), (61, 'E', 4), (61, 'E', 5), + +(62, 'A', 1), (62, 'A', 2), (62, 'A', 3), (62, 'A', 4), (62, 'A', 5), +(62, 'B', 1), (62, 'B', 2), (62, 'B', 3), (62, 'B', 4), (62, 'B', 5), +(62, 'C', 1), (62, 'C', 2), (62, 'C', 3), (62, 'C', 4), (62, 'C', 5), +(62, 'D', 1), (62, 'D', 2), (62, 'D', 3), (62, 'D', 4), (62, 'D', 5), +(62, 'E', 1), (62, 'E', 2), (62, 'E', 3), (62, 'E', 4), (62, 'E', 5), + +(63, 'A', 1), (63, 'A', 2), (63, 'A', 3), (63, 'A', 4), (63, 'A', 5), +(63, 'B', 1), (63, 'B', 2), (63, 'B', 3), (63, 'B', 4), (63, 'B', 5), +(63, 'C', 1), (63, 'C', 2), (63, 'C', 3), (63, 'C', 4), (63, 'C', 5), +(63, 'D', 1), (63, 'D', 2), (63, 'D', 3), (63, 'D', 4), (63, 'D', 5), +(63, 'E', 1), (63, 'E', 2), (63, 'E', 3), (63, 'E', 4), (63, 'E', 5), + +(64, 'A', 1), (64, 'A', 2), (64, 'A', 3), (64, 'A', 4), (64, 'A', 5), +(64, 'B', 1), (64, 'B', 2), (64, 'B', 3), (64, 'B', 4), (64, 'B', 5), +(64, 'C', 1), (64, 'C', 2), (64, 'C', 3), (64, 'C', 4), (64, 'C', 5), +(64, 'D', 1), (64, 'D', 2), (64, 'D', 3), (64, 'D', 4), (64, 'D', 5), +(64, 'E', 1), (64, 'E', 2), (64, 'E', 3), (64, 'E', 4), (64, 'E', 5), + +(65, 'A', 1), (65, 'A', 2), (65, 'A', 3), (65, 'A', 4), (65, 'A', 5), +(65, 'B', 1), (65, 'B', 2), (65, 'B', 3), (65, 'B', 4), (65, 'B', 5), +(65, 'C', 1), (65, 'C', 2), (65, 'C', 3), (65, 'C', 4), (65, 'C', 5), +(65, 'D', 1), (65, 'D', 2), (65, 'D', 3), (65, 'D', 4), (65, 'D', 5), +(65, 'E', 1), (65, 'E', 2), (65, 'E', 3), (65, 'E', 4), (65, 'E', 5), + +(66, 'A', 1), (66, 'A', 2), (66, 'A', 3), (66, 'A', 4), (66, 'A', 5), +(66, 'B', 1), (66, 'B', 2), (66, 'B', 3), (66, 'B', 4), (66, 'B', 5), +(66, 'C', 1), (66, 'C', 2), (66, 'C', 3), (66, 'C', 4), (66, 'C', 5), +(66, 'D', 1), (66, 'D', 2), (66, 'D', 3), (66, 'D', 4), (66, 'D', 5), +(66, 'E', 1), (66, 'E', 2), (66, 'E', 3), (66, 'E', 4), (66, 'E', 5), + +(67, 'A', 1), (67, 'A', 2), (67, 'A', 3), (67, 'A', 4), (67, 'A', 5), +(67, 'B', 1), (67, 'B', 2), (67, 'B', 3), (67, 'B', 4), (67, 'B', 5), +(67, 'C', 1), (67, 'C', 2), (67, 'C', 3), (67, 'C', 4), (67, 'C', 5), +(67, 'D', 1), (67, 'D', 2), (67, 'D', 3), (67, 'D', 4), (67, 'D', 5), +(67, 'E', 1), (67, 'E', 2), (67, 'E', 3), (67, 'E', 4), (67, 'E', 5), + +(68, 'A', 1), (68, 'A', 2), (68, 'A', 3), (68, 'A', 4), (68, 'A', 5), +(68, 'B', 1), (68, 'B', 2), (68, 'B', 3), (68, 'B', 4), (68, 'B', 5), +(68, 'C', 1), (68, 'C', 2), (68, 'C', 3), (68, 'C', 4), (68, 'C', 5), +(68, 'D', 1), (68, 'D', 2), (68, 'D', 3), (68, 'D', 4), (68, 'D', 5), +(68, 'E', 1), (68, 'E', 2), (68, 'E', 3), (68, 'E', 4), (68, 'E', 5), + +(69, 'A', 1), (69, 'A', 2), (69, 'A', 3), (69, 'A', 4), (69, 'A', 5), +(69, 'B', 1), (69, 'B', 2), (69, 'B', 3), (69, 'B', 4), (69, 'B', 5), +(69, 'C', 1), (69, 'C', 2), (69, 'C', 3), (69, 'C', 4), (69, 'C', 5), +(69, 'D', 1), (69, 'D', 2), (69, 'D', 3), (69, 'D', 4), (69, 'D', 5), +(69, 'E', 1), (69, 'E', 2), (69, 'E', 3), (69, 'E', 4), (69, 'E', 5), + +(70, 'A', 1), (70, 'A', 2), (70, 'A', 3), (70, 'A', 4), (70, 'A', 5), +(70, 'B', 1), (70, 'B', 2), (70, 'B', 3), (70, 'B', 4), (70, 'B', 5), +(70, 'C', 1), (70, 'C', 2), (70, 'C', 3), (70, 'C', 4), (70, 'C', 5), +(70, 'D', 1), (70, 'D', 2), (70, 'D', 3), (70, 'D', 4), (70, 'D', 5), +(70, 'E', 1), (70, 'E', 2), (70, 'E', 3), (70, 'E', 4), (70, 'E', 5); + +INSERT INTO seat (theater_id, seat_row, seat_column) VALUES +(71, 'A', 1), (71, 'A', 2), (71, 'A', 3), (71, 'A', 4), (71, 'A', 5), +(71, 'B', 1), (71, 'B', 2), (71, 'B', 3), (71, 'B', 4), (71, 'B', 5), +(71, 'C', 1), (71, 'C', 2), (71, 'C', 3), (71, 'C', 4), (71, 'C', 5), +(71, 'D', 1), (71, 'D', 2), (71, 'D', 3), (71, 'D', 4), (71, 'D', 5), +(71, 'E', 1), (71, 'E', 2), (71, 'E', 3), (71, 'E', 4), (71, 'E', 5), + +(72, 'A', 1), (72, 'A', 2), (72, 'A', 3), (72, 'A', 4), (72, 'A', 5), +(72, 'B', 1), (72, 'B', 2), (72, 'B', 3), (72, 'B', 4), (72, 'B', 5), +(72, 'C', 1), (72, 'C', 2), (72, 'C', 3), (72, 'C', 4), (72, 'C', 5), +(72, 'D', 1), (72, 'D', 2), (72, 'D', 3), (72, 'D', 4), (72, 'D', 5), +(72, 'E', 1), (72, 'E', 2), (72, 'E', 3), (72, 'E', 4), (72, 'E', 5), + +(73, 'A', 1), (73, 'A', 2), (73, 'A', 3), (73, 'A', 4), (73, 'A', 5), +(73, 'B', 1), (73, 'B', 2), (73, 'B', 3), (73, 'B', 4), (73, 'B', 5), +(73, 'C', 1), (73, 'C', 2), (73, 'C', 3), (73, 'C', 4), (73, 'C', 5), +(73, 'D', 1), (73, 'D', 2), (73, 'D', 3), (73, 'D', 4), (73, 'D', 5), +(73, 'E', 1), (73, 'E', 2), (73, 'E', 3), (73, 'E', 4), (73, 'E', 5), + +(74, 'A', 1), (74, 'A', 2), (74, 'A', 3), (74, 'A', 4), (74, 'A', 5), +(74, 'B', 1), (74, 'B', 2), (74, 'B', 3), (74, 'B', 4), (74, 'B', 5), +(74, 'C', 1), (74, 'C', 2), (74, 'C', 3), (74, 'C', 4), (74, 'C', 5), +(74, 'D', 1), (74, 'D', 2), (74, 'D', 3), (74, 'D', 4), (74, 'D', 5), +(74, 'E', 1), (74, 'E', 2), (74, 'E', 3), (74, 'E', 4), (74, 'E', 5), + +(75, 'A', 1), (75, 'A', 2), (75, 'A', 3), (75, 'A', 4), (75, 'A', 5), +(75, 'B', 1), (75, 'B', 2), (75, 'B', 3), (75, 'B', 4), (75, 'B', 5), +(75, 'C', 1), (75, 'C', 2), (75, 'C', 3), (75, 'C', 4), (75, 'C', 5), +(75, 'D', 1), (75, 'D', 2), (75, 'D', 3), (75, 'D', 4), (75, 'D', 5), +(75, 'E', 1), (75, 'E', 2), (75, 'E', 3), (75, 'E', 4), (75, 'E', 5), + +(76, 'A', 1), (76, 'A', 2), (76, 'A', 3), (76, 'A', 4), (76, 'A', 5), +(76, 'B', 1), (76, 'B', 2), (76, 'B', 3), (76, 'B', 4), (76, 'B', 5), +(76, 'C', 1), (76, 'C', 2), (76, 'C', 3), (76, 'C', 4), (76, 'C', 5), +(76, 'D', 1), (76, 'D', 2), (76, 'D', 3), (76, 'D', 4), (76, 'D', 5), +(76, 'E', 1), (76, 'E', 2), (76, 'E', 3), (76, 'E', 4), (76, 'E', 5), + +(77, 'A', 1), (77, 'A', 2), (77, 'A', 3), (77, 'A', 4), (77, 'A', 5), +(77, 'B', 1), (77, 'B', 2), (77, 'B', 3), (77, 'B', 4), (77, 'B', 5), +(77, 'C', 1), (77, 'C', 2), (77, 'C', 3), (77, 'C', 4), (77, 'C', 5), +(77, 'D', 1), (77, 'D', 2), (77, 'D', 3), (77, 'D', 4), (77, 'D', 5), +(77, 'E', 1), (77, 'E', 2), (77, 'E', 3), (77, 'E', 4), (77, 'E', 5), + +(78, 'A', 1), (78, 'A', 2), (78, 'A', 3), (78, 'A', 4), (78, 'A', 5), +(78, 'B', 1), (78, 'B', 2), (78, 'B', 3), (78, 'B', 4), (78, 'B', 5), +(78, 'C', 1), (78, 'C', 2), (78, 'C', 3), (78, 'C', 4), (78, 'C', 5), +(78, 'D', 1), (78, 'D', 2), (78, 'D', 3), (78, 'D', 4), (78, 'D', 5), +(78, 'E', 1), (78, 'E', 2), (78, 'E', 3), (78, 'E', 4), (78, 'E', 5), + +(79, 'A', 1), (79, 'A', 2), (79, 'A', 3), (79, 'A', 4), (79, 'A', 5), +(79, 'B', 1), (79, 'B', 2), (79, 'B', 3), (79, 'B', 4), (79, 'B', 5), +(79, 'C', 1), (79, 'C', 2), (79, 'C', 3), (79, 'C', 4), (79, 'C', 5), +(79, 'D', 1), (79, 'D', 2), (79, 'D', 3), (79, 'D', 4), (79, 'D', 5), +(79, 'E', 1), (79, 'E', 2), (79, 'E', 3), (79, 'E', 4), (79, 'E', 5), + +(80, 'A', 1), (80, 'A', 2), (80, 'A', 3), (80, 'A', 4), (80, 'A', 5), +(80, 'B', 1), (80, 'B', 2), (80, 'B', 3), (80, 'B', 4), (80, 'B', 5), +(80, 'C', 1), (80, 'C', 2), (80, 'C', 3), (80, 'C', 4), (80, 'C', 5), +(80, 'D', 1), (80, 'D', 2), (80, 'D', 3), (80, 'D', 4), (80, 'D', 5), +(80, 'E', 1), (80, 'E', 2), (80, 'E', 3), (80, 'E', 4), (80, 'E', 5); \ No newline at end of file diff --git a/module-api/build.gradle b/module-api/build.gradle new file mode 100644 index 000000000..67e533895 --- /dev/null +++ b/module-api/build.gradle @@ -0,0 +1,9 @@ +dependencies { + // 모듈 의존성 + implementation project(':module-common') + implementation project(':module-screening') + + implementation 'org.springframework.boot:spring-boot-starter-web' + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' +} \ No newline at end of file diff --git a/module-api/src/main/java/hellojpa/Main.java b/module-api/src/main/java/hellojpa/Main.java new file mode 100644 index 000000000..46fee13ce --- /dev/null +++ b/module-api/src/main/java/hellojpa/Main.java @@ -0,0 +1,23 @@ +package hellojpa; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.data.domain.AuditorAware; +import org.springframework.data.jpa.repository.config.EnableJpaAuditing; + +import java.util.Optional; +import java.util.UUID; + +@EnableJpaAuditing +@SpringBootApplication +public class Main { + public static void main(String[] args) { + SpringApplication.run(Main.class, args); + } + + @Bean + public AuditorAware auditorProvider() { + return () -> Optional.of(UUID.randomUUID().toString()); + } +} \ No newline at end of file diff --git a/module-api/src/main/java/hellojpa/controller/ScreeningController.java b/module-api/src/main/java/hellojpa/controller/ScreeningController.java new file mode 100644 index 000000000..6255bc38a --- /dev/null +++ b/module-api/src/main/java/hellojpa/controller/ScreeningController.java @@ -0,0 +1,21 @@ +package hellojpa.controller; + +import hellojpa.dto.ScreeningDto; +import hellojpa.service.ScreeningService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@RequiredArgsConstructor +public class ScreeningController { + + private final ScreeningService screeningService; + + @GetMapping("/screening/movies") + public List getCurrentScreenings() { + return screeningService.findCurrentScreenings(); + } +} \ No newline at end of file diff --git a/module-api/src/main/resources/application.yml b/module-api/src/main/resources/application.yml new file mode 100644 index 000000000..756738de7 --- /dev/null +++ b/module-api/src/main/resources/application.yml @@ -0,0 +1,13 @@ +spring: + datasource: + url: jdbc:mysql://localhost:3307/redisdb + username: user + password: user1234 + driver-class-name: com.mysql.cj.jdbc.Driver + + jpa: + hibernate: + ddl-auto: update + properties: + show_sql: true + format_sql: true \ No newline at end of file diff --git a/module-api/src/test/resources/http/api-test.http b/module-api/src/test/resources/http/api-test.http new file mode 100644 index 000000000..d06a61685 --- /dev/null +++ b/module-api/src/test/resources/http/api-test.http @@ -0,0 +1 @@ +GET http://localhost:8080/screening/movies \ No newline at end of file diff --git a/module-common/build.gradle b/module-common/build.gradle new file mode 100644 index 000000000..b32841417 --- /dev/null +++ b/module-common/build.gradle @@ -0,0 +1,10 @@ +bootJar.enabled = false +jar.enabled = true + +dependencies { + api 'org.springframework.boot:spring-boot-starter-data-jpa' + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' + api 'org.springframework.boot:spring-boot-devtools' + api 'com.mysql:mysql-connector-j' +} \ No newline at end of file diff --git a/module-common/src/main/java/hellojpa/BaseEntity.java b/module-common/src/main/java/hellojpa/BaseEntity.java new file mode 100644 index 000000000..2a87b9f05 --- /dev/null +++ b/module-common/src/main/java/hellojpa/BaseEntity.java @@ -0,0 +1,33 @@ +package hellojpa; + +import jakarta.persistence.Column; +import jakarta.persistence.EntityListeners; +import jakarta.persistence.MappedSuperclass; +import lombok.Getter; +import org.springframework.data.annotation.CreatedBy; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedBy; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import java.time.LocalDateTime; + +@EntityListeners(AuditingEntityListener.class) +@MappedSuperclass +@Getter +public class BaseEntity { + + @CreatedDate + @Column(updatable = false) + private LocalDateTime createdDate; + + @LastModifiedDate + private LocalDateTime lastModifiedDate; + + @CreatedBy + @Column(updatable = false) + private String createdBy; + + @LastModifiedBy + private String lastModifiedBy; +} diff --git a/module-common/src/main/java/hellojpa/Main.java b/module-common/src/main/java/hellojpa/Main.java new file mode 100644 index 000000000..f31610dc8 --- /dev/null +++ b/module-common/src/main/java/hellojpa/Main.java @@ -0,0 +1,7 @@ +package hellojpa; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/module-movie/build.gradle b/module-movie/build.gradle new file mode 100644 index 000000000..ae69d13e9 --- /dev/null +++ b/module-movie/build.gradle @@ -0,0 +1,10 @@ +bootJar.enabled = false +jar.enabled = true + +dependencies { + // 모듈 의존성 + implementation project(':module-common') + + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' +} \ No newline at end of file diff --git a/module-movie/src/main/java/hellojpa/Main.java b/module-movie/src/main/java/hellojpa/Main.java new file mode 100644 index 000000000..f31610dc8 --- /dev/null +++ b/module-movie/src/main/java/hellojpa/Main.java @@ -0,0 +1,7 @@ +package hellojpa; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/module-movie/src/main/java/hellojpa/domain/Genre.java b/module-movie/src/main/java/hellojpa/domain/Genre.java new file mode 100644 index 000000000..14c0141e9 --- /dev/null +++ b/module-movie/src/main/java/hellojpa/domain/Genre.java @@ -0,0 +1,10 @@ +package hellojpa.domain; + +public enum Genre { + ACTION, + COMEDY, + DRAMA, + HORROR, + ROMANCE, + THRILLER +} diff --git a/module-movie/src/main/java/hellojpa/domain/Movie.java b/module-movie/src/main/java/hellojpa/domain/Movie.java new file mode 100644 index 000000000..1265d908d --- /dev/null +++ b/module-movie/src/main/java/hellojpa/domain/Movie.java @@ -0,0 +1,40 @@ +package hellojpa.domain; + +import hellojpa.BaseEntity; +import jakarta.persistence.*; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; + +@Entity +@Getter +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class Movie extends BaseEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "movie_id") + private Long id; + + @Column(nullable = false, length = 50) + private String title; // 영화 제목 + + @Enumerated(EnumType.STRING) + @Column(nullable = false) + private VideoRating rating; // 영상물 등급 + + @Column(nullable = false) + private LocalDate releaseDate; // 영화 개봉일 + + @Column(nullable = false) + private String thumbnail; // 영화 썸네일 + + @Column(nullable = false) + private int runningTime; // 영화 러닝타임 + + @Enumerated(EnumType.STRING) + @JoinColumn(nullable = false) + private Genre genre; // 영화 장르 +} diff --git a/module-movie/src/main/java/hellojpa/domain/VideoRating.java b/module-movie/src/main/java/hellojpa/domain/VideoRating.java new file mode 100644 index 000000000..a9b1c5aa1 --- /dev/null +++ b/module-movie/src/main/java/hellojpa/domain/VideoRating.java @@ -0,0 +1,16 @@ +package hellojpa.domain; + +public enum VideoRating { + + ALL("전체관람가"), + AGE_12("12세이상관람가"), + AGE_15("15세이상관람가"), + AGE_19("청소년관람불가"), + RESTRICTED("제한관람가"); + + private final String description; + + VideoRating(String description) { + this.description = description; + } +} diff --git a/module-screening/build.gradle b/module-screening/build.gradle new file mode 100644 index 000000000..802214e8b --- /dev/null +++ b/module-screening/build.gradle @@ -0,0 +1,12 @@ +bootJar.enabled = false +jar.enabled = true + +dependencies { + // 공통 모듈 의존성 + implementation project(':module-common') + implementation project(':module-movie') + implementation project(':module-theater') + + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' +} \ No newline at end of file diff --git a/module-screening/src/main/java/hellojpa/Main.java b/module-screening/src/main/java/hellojpa/Main.java new file mode 100644 index 000000000..f31610dc8 --- /dev/null +++ b/module-screening/src/main/java/hellojpa/Main.java @@ -0,0 +1,7 @@ +package hellojpa; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/module-screening/src/main/java/hellojpa/domain/Screening.java b/module-screening/src/main/java/hellojpa/domain/Screening.java new file mode 100644 index 000000000..6dc1c95e5 --- /dev/null +++ b/module-screening/src/main/java/hellojpa/domain/Screening.java @@ -0,0 +1,28 @@ +package hellojpa.domain; + +import hellojpa.BaseEntity; +import jakarta.persistence.*; +import lombok.Getter; + +import java.time.LocalTime; + +@Entity +@Getter +public class Screening extends BaseEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "screening_id") + private Long id; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "movie_id", nullable = false) + private Movie movie; // 상영하는 영화 + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "theater_id", nullable = false) + private Theater theater; // 상영관 + + @Column(nullable = false) + private LocalTime startTime; //시작 시간 +} diff --git a/module-screening/src/main/java/hellojpa/dto/ScreeningDto.java b/module-screening/src/main/java/hellojpa/dto/ScreeningDto.java new file mode 100644 index 000000000..6c4f1697a --- /dev/null +++ b/module-screening/src/main/java/hellojpa/dto/ScreeningDto.java @@ -0,0 +1,38 @@ +package hellojpa.dto; + +import hellojpa.domain.Movie; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; +import java.util.List; + +@Getter +@NoArgsConstructor +@AllArgsConstructor +public class ScreeningDto { + + private String title; + private String videoRating; + private LocalDate releaseDate; + private String thumbnail; + private int runningTime; + private String genreName; + private List theaterSheduleDtoList; + + public static ScreeningDto of(Movie movie, List theaterSchedule){ + String title = movie.getTitle(); + String videoRating = movie.getRating().toString(); + LocalDate releaseDate = movie.getReleaseDate(); + String thumbnail = movie.getThumbnail(); + int runningTime = movie.getRunningTime(); + String genreName = movie.getGenre().toString(); + + return new ScreeningDto( + title, videoRating, releaseDate, thumbnail, + runningTime, genreName, theaterSchedule + ); + } +} diff --git a/module-screening/src/main/java/hellojpa/dto/TheaterScheduleDto.java b/module-screening/src/main/java/hellojpa/dto/TheaterScheduleDto.java new file mode 100644 index 000000000..6375a7d79 --- /dev/null +++ b/module-screening/src/main/java/hellojpa/dto/TheaterScheduleDto.java @@ -0,0 +1,27 @@ +package hellojpa.dto; + +import hellojpa.domain.Screening; +import hellojpa.domain.Theater; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalTime; +import java.util.List; + +@Getter +@NoArgsConstructor +@AllArgsConstructor +public class TheaterScheduleDto { + + private String theaterName; + private List timeScheduleDtoList; + + public static TheaterScheduleDto of(Theater theater, List timeSchedule){ + String theaterName = theater.getName(); + + return new TheaterScheduleDto( + theaterName, timeSchedule + ); + } +} diff --git a/module-screening/src/main/java/hellojpa/dto/TimeScheduleDto.java b/module-screening/src/main/java/hellojpa/dto/TimeScheduleDto.java new file mode 100644 index 000000000..aa71b561e --- /dev/null +++ b/module-screening/src/main/java/hellojpa/dto/TimeScheduleDto.java @@ -0,0 +1,25 @@ +package hellojpa.dto; + +import hellojpa.domain.Movie; +import hellojpa.domain.Screening; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalTime; + +@Getter +@NoArgsConstructor +@AllArgsConstructor +public class TimeScheduleDto { + + private LocalTime startTime; + private LocalTime endTime; + + public static TimeScheduleDto of(Screening screening) { + LocalTime startTime = screening.getStartTime(); + LocalTime endTime = startTime.plusMinutes(screening.getMovie().getRunningTime()); + + return new TimeScheduleDto(startTime, endTime); + } +} \ No newline at end of file diff --git a/module-screening/src/main/java/hellojpa/repository/ScreeningRepository.java b/module-screening/src/main/java/hellojpa/repository/ScreeningRepository.java new file mode 100644 index 000000000..49b77f4fd --- /dev/null +++ b/module-screening/src/main/java/hellojpa/repository/ScreeningRepository.java @@ -0,0 +1,7 @@ +package hellojpa.repository; + +import hellojpa.domain.Screening; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface ScreeningRepository extends JpaRepository, ScreeningRepositoryCustom { +} diff --git a/module-screening/src/main/java/hellojpa/repository/ScreeningRepositoryCustom.java b/module-screening/src/main/java/hellojpa/repository/ScreeningRepositoryCustom.java new file mode 100644 index 000000000..3a38f26fc --- /dev/null +++ b/module-screening/src/main/java/hellojpa/repository/ScreeningRepositoryCustom.java @@ -0,0 +1,11 @@ +package hellojpa.repository; + +import hellojpa.domain.Screening; + +import java.time.LocalDate; +import java.util.List; + +public interface ScreeningRepositoryCustom { + + List findCurrentScreenings(LocalDate todayDate); +} diff --git a/module-screening/src/main/java/hellojpa/repository/ScreeningRepositoryImpl.java b/module-screening/src/main/java/hellojpa/repository/ScreeningRepositoryImpl.java new file mode 100644 index 000000000..253f07b66 --- /dev/null +++ b/module-screening/src/main/java/hellojpa/repository/ScreeningRepositoryImpl.java @@ -0,0 +1,27 @@ +package hellojpa.repository; + +import hellojpa.domain.Screening; +import jakarta.persistence.EntityManager; +import lombok.RequiredArgsConstructor; + +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.List; + +@RequiredArgsConstructor +public class ScreeningRepositoryImpl implements ScreeningRepositoryCustom{ + + private final EntityManager em; + + @Override + public List findCurrentScreenings(LocalDate todayDate) { + return em.createQuery("select s from Screening s " + + "join fetch s.movie m " + + "join fetch s.theater t " + + "where m.releaseDate <= : todayDate " + + "order by m.releaseDate desc, " + + "s.startTime asc") + .setParameter("todayDate", todayDate) + .getResultList(); + } +} diff --git a/module-screening/src/main/java/hellojpa/service/ScreeningService.java b/module-screening/src/main/java/hellojpa/service/ScreeningService.java new file mode 100644 index 000000000..8cc713863 --- /dev/null +++ b/module-screening/src/main/java/hellojpa/service/ScreeningService.java @@ -0,0 +1,61 @@ +package hellojpa.service; + +import hellojpa.domain.Movie; +import hellojpa.domain.Screening; +import hellojpa.dto.ScreeningDto; +import hellojpa.dto.TheaterScheduleDto; +import hellojpa.dto.TimeScheduleDto; +import hellojpa.repository.ScreeningRepository; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.util.*; +import java.util.stream.Collectors; + +@Service +@RequiredArgsConstructor +public class ScreeningService { + + private final ScreeningRepository screeningRepository; + + public List findCurrentScreenings() { + + LocalDate todayDate = LocalDate.now(); + List currentScreenings = screeningRepository.findCurrentScreenings(todayDate); // 오늘 날짜 기준 상영되는 영화 정보 + + return currentScreenings.stream() + .collect(Collectors.groupingBy(Screening::getMovie)) // 영화별 그룹화 + .entrySet().stream() + .map(entry -> { + Movie movie = entry.getKey(); + List theaterScheduleDtos = extractTheaterScheduleDto(entry.getValue()); + + return ScreeningDto.of(movie, theaterScheduleDtos); + }) + .sorted(Comparator.comparing(ScreeningDto::getReleaseDate).reversed()) // 최근 개봉일 순 정렬 + .collect(Collectors.toList()); + } + + // screening -> TheaterScheduleDto + private List extractTheaterScheduleDto(List screenings) { + return screenings.stream() + .collect(Collectors.groupingBy(Screening::getTheater)) + .entrySet().stream() + .map(entry -> { + List timeScheduleDtos = extractTimeScheduleDto(entry.getValue()); + + return TheaterScheduleDto.of(entry.getKey(), timeScheduleDtos); + }) + .collect(Collectors.toList()); + } + + // screening -> TimeScheduleDto + private List extractTimeScheduleDto(List screenings) { + return screenings.stream() + .sorted(Comparator.comparing(Screening::getStartTime)) // 상영 시간 오름차순 정렬 + .map(screening -> TimeScheduleDto.of(screening)) + .collect(Collectors.toList()); + } + +} \ No newline at end of file diff --git a/module-theater/build.gradle b/module-theater/build.gradle new file mode 100644 index 000000000..7543f9581 --- /dev/null +++ b/module-theater/build.gradle @@ -0,0 +1,10 @@ +bootJar.enabled = false +jar.enabled = true + +dependencies { + // 공통 모듈 의존성 + implementation project(':module-common') + + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' +} \ No newline at end of file diff --git a/module-theater/src/main/java/hellojpa/Main.java b/module-theater/src/main/java/hellojpa/Main.java new file mode 100644 index 000000000..f31610dc8 --- /dev/null +++ b/module-theater/src/main/java/hellojpa/Main.java @@ -0,0 +1,7 @@ +package hellojpa; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/module-theater/src/main/java/hellojpa/domain/Seat.java b/module-theater/src/main/java/hellojpa/domain/Seat.java new file mode 100644 index 000000000..44a297ad1 --- /dev/null +++ b/module-theater/src/main/java/hellojpa/domain/Seat.java @@ -0,0 +1,26 @@ +package hellojpa.domain; + +import hellojpa.BaseEntity; +import jakarta.persistence.*; +import lombok.Getter; + +@Entity +@Getter +public class Seat extends BaseEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "seat_id") + private Long id; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "theater_id", nullable = false) + private Theater theater; // 상영관 + + @Column(name = "seat_row", nullable = false) + private String seatRow; // 상영관 행(ex. A, B...) + + @Column(name = "seat_column", nullable = false) + private int seatColumn; // 상영관 열(ex. 1, 2...) + +} diff --git a/module-theater/src/main/java/hellojpa/domain/Theater.java b/module-theater/src/main/java/hellojpa/domain/Theater.java new file mode 100644 index 000000000..fd72e27cd --- /dev/null +++ b/module-theater/src/main/java/hellojpa/domain/Theater.java @@ -0,0 +1,25 @@ +package hellojpa.domain; + +import hellojpa.BaseEntity; +import jakarta.persistence.*; +import lombok.Getter; + +import java.util.ArrayList; +import java.util.List; + +@Entity +@Getter +public class Theater extends BaseEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "theater_id") + private Long id; + + @Column(nullable = false, length = 20) + private String name; // 상영관 이름 + + @OneToMany(mappedBy = "theater", cascade = CascadeType.ALL, orphanRemoval = true) + @Column(nullable = false) + private List seats = new ArrayList<>(); // 좌석 +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..4fa9445c5 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,7 @@ +rootProject.name = 'cinema_week1' +include 'module-movie' +include 'module-theater' +include 'module-screening' +include 'module-common' +include 'module-api' +