Commit db383a6e by Bogdan Andjelkovic

first commit

parents
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
This diff is collapsed. Click to expand it.
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. 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,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% ^
%JVM_CONFIG_MAVEN_PROPS% ^
%MAVEN_OPTS% ^
%MAVEN_DEBUG_OPTS% ^
-classpath %WRAPPER_JAR% ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%"=="on" pause
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
cmd /C exit /B %ERROR_CODE%
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>SkuciSe</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>SkuciSe</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.example.SkuciSe;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SkuciSeApplication {
public static void main(String[] args) {
SpringApplication.run(SkuciSeApplication.class, args);
}
}
package com.example.SkuciSe;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class SkuciSeApplicationTests {
@Test
void contextLoads() {
}
}
<mxfile host="app.diagrams.net" modified="2022-08-30T17:08:06.055Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" etag="3AjXH1ijBU5ttlcpIA-6" version="20.2.7" type="device"><diagram id="SR8CX8bQ1y-Rk_SPL-8X" name="Page-1">7V1dd6JIEP01OWfmITkINOCjMWoym8QczcdMXvYQRWWXSAYxMfvrFwQEqtqo0NCMah4iDTRQdetWdXU1nkjN10XH0d8mN/bQsE5EYbg4kS5ORLEmEdn757d8Bi0qUYKGsWMOw4Pihr75nxE2CmHr3Bwas9SBrm1brvmWbhzY06kxcFNtuuPYH+nDRraVvuqbPjZQQ3+gW7j1yRy6k6BVlKR6vOPSMMeT8NKSJIR3/qpHR4cNs4k+tD8STVLrRGo6tu0G314XTcPypRcJJjivvWbv6s4cY+puc4KjGrowGD6O7szpvHN92mm2+6da0Mu7bs3DJ77s3rS8Tq6v+vfhfbufkTQcez4dGn5/wol0/jExXaP/pg/8vR+e/r22iftqeVs17+vMdex/V1LzW0amZTVty3aWvUkj4v/57fbUTbQHn1UPiT3K8uPtwc8eiuPdcFxjkWgKZdEx7FfDdT69Q6K9SqiXEJlipLiPWM9a2DRJaFgO2/QQWeNVz7HsvS+h+HdQRQT5hC6uu52r26K1MDKUwaBoaUti1aQtImkjQRvTYcPnEG9rYOmzmTlIyzatCGNhuj/DPf73X377GQm3LhaJwy4+o42p9yw/kxuJs/zN+LTlVnQe1moG7c3suTMwvpBRSA6u7owNdwvkGsMUmWIwJJRNKMqO2hzD0l3zPU3BNASEV7izTe/RVlgjEGt1AKLgwcOzkowJO1JBRxCNgWRQR0tArh47B0ZlhNFeq+MRc6u3F6Qga0C+Gm9SIF8IXOg/NJutfr9o0WsDo3jRK3LVRK8w52Oe3LqZM+VKcaYM8SBm5EyVpDuSlO0401Os/pk47M0/YLb9DUdxd4zBoEe2hKweg4ZNQUME7M0WQCplAUQCFkCyRg2wIxh+FBw1RJaLxxGK5Yns/MXxvo39b/vk0FAswXuAsXoErlxRks1XawAgC2uwsKspI1BBr7izM2Nu7Dhi/Xb93Ws41DSOzDuQFXEgG2jkrtdtX123ytLGeqmv0xMDbcA0D39tHCO2jewdccjGiC2CdkVoHuZ5VumavHkesiXNsyJxCUdsAWXcdH9cef+6netG/2qviQN6WqJwJg4Jh28pnTw3Lu9bj4elFO5s7j3YobN5RbgXhthyvX6m1oT4I2ejYgS5Df0Wzcw4A58XcJXOSkaeqCooA0k+knUgR2qgI5jcKSgrSbQSspLSujHgMm7Yaw8FpzH4hw3rRn+HEC9oQtW0cRz9VYTJCUjTENX369nIHBk9pa+i4wJcN3UEFhdgqSgJkB1YiL84AKuOgHXX6DBJGtK0mz+5y8BtAHOWsdOoiRQAwSQNM68R3UBCB+1u74afDqJiHPaypjjokmWN0yyNh/tLfrKOJivZy5qSPClZ1iKSdRCb3nYfV2lGFpLnXlgGI4SVk+AViMrME1e7YDxrnLBWExvzCBHUKhIkKNCxa0DRW+cRQHUT2bK2Y9c8ArxhVS4hj0Cw39v/DAKcsZR4j1kJ+7qR4zAh1mHe+kaEF0gljBgA3rDEOJOozduX543R3/NG52n0o/3cni7uKKuBDm0esq7wixyoKqGMB3vdx1avEemjUbQ+Sinfg0Nv7nKnrMbKS8PHDE8m6oYZHlWqn5Fs5I1Qhrtil9+hw6oSVaFHWHnq0ZjBCjmN8mGFh/b7s3YUWm2Za5Xo0saj+YpW2L9oRCZfDuWzh0b81cC+OOPIpUxctFhn5qIpXRXNpbic4girSrjoHLBC5FU+rNZVhhzKSg205LjEFVp0jRyrQypi6LA6RKzVz2Q1m6UjmFH6KtrU1+XRDsXUazUYEHCPFXEe7WjrXGy9JkADrWc3dgw0SmcFWztlvXVg7VfPN63b/ZpYh9G5QinWKdWuC1hlfbRRUYXVmlnnyxFeyNbmueuEGbxn71IAXfkmzHp3Dw/zJ+O2o93/07okv21n3D8tLJsbe5JfCR/D26sAeG6sDaHKTOSJbBFWgrCaB1YKes8NvGEt/ZbHYmAtrvFof0Q5CPJmFJhuXQ6ilThIpaoCp5qj9SR/NZ794OK+1bvhmOgfqvUXQWAjfLj4j7vwDyzBvJneedE2XG6qeYN6omVjboQySl/shgxUXP3RC/ZymTgasJU5gqDqAqdlVwU2xeph27qaXPKGeW/u4j6wnGt1KRVOrvhDM0aTK5SuCibUA1uOV11UoexeDlhhX1E6rr6ovuTkHEBFRy7nAKdKuMfb1KLLoKZm9qZPUxJXfs/9X044HwSy8ethnfHLN7983ru4EP//vhRWdHhUmZMKuIJLeLccXCU4oqw4LOsMTS7Vw8Qcf9UfWGFkdSkcFvMsx0fZGByhDHdVMIEf2s88VBdWcI5/iQUxG66Q46L0VTSwSlzRmW9SIEbZ6qyNaz63SfQn3yv5VfC0cUJA4sp2sHY762u/NfCKKRW+q4rV0lCYvlKEL+8LviUTHL/rBIK3Gf9kVXB4/MtfUut/</diagram></mxfile>
\ No newline at end of file
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 30, 2022 at 05:51 PM
-- Server version: 10.4.24-MariaDB
-- PHP Version: 8.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `skucise`
--
-- --------------------------------------------------------
--
-- Table structure for table `korisnik`
--
CREATE TABLE `korisnik` (
`KorisnikId` int(11) NOT NULL,
`Ime` varchar(64) DEFAULT NULL,
`Prezime` varchar(64) DEFAULT NULL,
`Email` varchar(64) DEFAULT NULL,
`Sifra` varchar(256) DEFAULT NULL,
`Telefon` varchar(64) DEFAULT NULL,
`TipID` int(11) DEFAULT NULL,
`Slika` varchar(256) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `lokacija`
--
CREATE TABLE `lokacija` (
`LokacijaID` int(11) NOT NULL,
`Naziv` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `lokacija`
--
INSERT INTO `lokacija` (`LokacijaID`, `Naziv`) VALUES
(1, 'Beograd'),
(2, 'Novi Sad'),
(3, 'Niš'),
(4, 'Kragujevac'),
(5, 'Subotica'),
(6, 'Čačak'),
(7, 'Kraljevo'),
(8, 'Kruševac'),
(9, 'Smederevo'),
(10, 'Leskovac'),
(11, 'Jagodina'),
(12, 'Sombor');
-- --------------------------------------------------------
--
-- Table structure for table `oglas`
--
CREATE TABLE `oglas` (
`OglasID` int(11) NOT NULL,
`KorisnikID` int(11) NOT NULL,
`Naslov` varchar(64) DEFAULT NULL,
`Opis` varchar(1000) DEFAULT NULL,
`LokacijaID` int(11) NOT NULL,
`Cena` double DEFAULT NULL,
`VrstaOglasaID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `termin`
--
CREATE TABLE `termin` (
`TerminID` int(11) NOT NULL,
`KorisnikID` int(11) NOT NULL,
`OglasID` int(11) NOT NULL,
`Datum` datetime DEFAULT NULL,
`Status` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `tipkorisnika`
--
CREATE TABLE `tipkorisnika` (
`TipID` int(11) NOT NULL,
`Naziv` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `tipkorisnika`
--
INSERT INTO `tipkorisnika` (`TipID`, `Naziv`) VALUES
(1, 'member'),
(2, 'admin');
-- --------------------------------------------------------
--
-- Table structure for table `vrstaoglasa`
--
CREATE TABLE `vrstaoglasa` (
`VrstaOglasaID` int(11) NOT NULL,
`Naziv` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `vrstaoglasa`
--
INSERT INTO `vrstaoglasa` (`VrstaOglasaID`, `Naziv`) VALUES
(1, 'prodaja'),
(2, 'izdavanje');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `korisnik`
--
ALTER TABLE `korisnik`
ADD PRIMARY KEY (`KorisnikId`),
ADD KEY `TipID` (`TipID`);
--
-- Indexes for table `lokacija`
--
ALTER TABLE `lokacija`
ADD PRIMARY KEY (`LokacijaID`);
--
-- Indexes for table `oglas`
--
ALTER TABLE `oglas`
ADD PRIMARY KEY (`OglasID`),
ADD KEY `KorisnikID` (`KorisnikID`),
ADD KEY `LokacijaID` (`LokacijaID`),
ADD KEY `VrstaOglasaID` (`VrstaOglasaID`);
--
-- Indexes for table `termin`
--
ALTER TABLE `termin`
ADD PRIMARY KEY (`TerminID`),
ADD KEY `KorisnikID` (`KorisnikID`),
ADD KEY `OglasID` (`OglasID`);
--
-- Indexes for table `tipkorisnika`
--
ALTER TABLE `tipkorisnika`
ADD PRIMARY KEY (`TipID`);
--
-- Indexes for table `vrstaoglasa`
--
ALTER TABLE `vrstaoglasa`
ADD PRIMARY KEY (`VrstaOglasaID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `korisnik`
--
ALTER TABLE `korisnik`
MODIFY `KorisnikId` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `lokacija`
--
ALTER TABLE `lokacija`
MODIFY `LokacijaID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `oglas`
--
ALTER TABLE `oglas`
MODIFY `OglasID` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `termin`
--
ALTER TABLE `termin`
MODIFY `TerminID` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `tipkorisnika`
--
ALTER TABLE `tipkorisnika`
MODIFY `TipID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `vrstaoglasa`
--
ALTER TABLE `vrstaoglasa`
MODIFY `VrstaOglasaID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `korisnik`
--
ALTER TABLE `korisnik`
ADD CONSTRAINT `korisnik_ibfk_1` FOREIGN KEY (`TipID`) REFERENCES `tipkorisnika` (`TipID`);
--
-- Constraints for table `oglas`
--
ALTER TABLE `oglas`
ADD CONSTRAINT `oglas_ibfk_1` FOREIGN KEY (`KorisnikID`) REFERENCES `korisnik` (`KorisnikId`),
ADD CONSTRAINT `oglas_ibfk_2` FOREIGN KEY (`LokacijaID`) REFERENCES `lokacija` (`LokacijaID`),
ADD CONSTRAINT `oglas_ibfk_3` FOREIGN KEY (`VrstaOglasaID`) REFERENCES `vrstaoglasa` (`VrstaOglasaID`);
--
-- Constraints for table `termin`
--
ALTER TABLE `termin`
ADD CONSTRAINT `termin_ibfk_1` FOREIGN KEY (`KorisnikID`) REFERENCES `korisnik` (`KorisnikId`),
ADD CONSTRAINT `termin_ibfk_2` FOREIGN KEY (`OglasID`) REFERENCES `oglas` (`OglasID`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment