release
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
target/
|
||||
indent.log
|
||||
@ -1,136 +0,0 @@
|
||||
\documentclass[12pt]{report}
|
||||
\usepackage{titlesec}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[latvian]{babel}
|
||||
\usepackage{enumitem}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{gensymb} % grādu simbols
|
||||
\usepackage{geometry}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{array}
|
||||
\usepackage{indentfirst}
|
||||
\usepackage{multicol}
|
||||
\usepackage{multirow}
|
||||
\usepackage{ragged2e}
|
||||
\usepackage{secdot}
|
||||
\usepackage{tabularx}
|
||||
\usepackage{tcolorbox}
|
||||
\usepackage{tikz}
|
||||
\usepackage{listings}
|
||||
\usepackage{tocloft}
|
||||
\usepackage{caption}
|
||||
\usepackage{fmtcount}
|
||||
\usepackage{ltablex}
|
||||
\usepackage{chngcntr}
|
||||
\usepackage{longtable}
|
||||
\usepackage{ifthen}
|
||||
\usepackage{needspace}
|
||||
\usepackage[framemethod=TikZ]{mdframed}
|
||||
% uncomment and comment the line above if compile time is too long for preview,
|
||||
% but it won't compile the continuation overlay in the boxes correctly (should
|
||||
% be commented for end compilation)
|
||||
% \usepackage{mdframed}
|
||||
\usetikzlibrary{positioning}
|
||||
|
||||
\hypersetup{
|
||||
colorlinks=true,
|
||||
linkcolor=black,
|
||||
urlcolor=black
|
||||
}
|
||||
|
||||
\urlstyle{rm}
|
||||
|
||||
|
||||
\titlespacing*{\section}{0pt}{2em}{2em}
|
||||
\titlespacing*{\subsection}{0pt}{2em}{2em}
|
||||
\titlespacing*{\subsubsection}{0pt}{2em}{2em}
|
||||
\titlespacing*{\paragraph}{0pt}{2em}{2em}
|
||||
\titlespacing*{\subparagraph}{0pt}{2em}{2em}
|
||||
|
||||
|
||||
|
||||
% Configure the chapter / paragraph numbering (it only works this way when I compile)
|
||||
\renewcommand{\thechapter}{\arabic{chapter}.}
|
||||
\renewcommand{\thesection}{\arabic{section}.}
|
||||
\renewcommand{\thesubsection}{\thesection\arabic{subsection}.}
|
||||
\renewcommand{\thesubsubsection}{\thesubsection\arabic{subsubsection}.}
|
||||
\renewcommand{\theparagraph}{\thesubsubsection\arabic{paragraph}.}
|
||||
\renewcommand{\thesubparagraph}{\theparagraph\arabic{subparagraph}.}
|
||||
|
||||
|
||||
\titleformat{\section}{\large\bfseries\centering\vfill\eject\MakeUppercase}{\thesection}{1em}{} % section formatting
|
||||
\titleformat{\subsection}{\bfseries}{\thesubsection}{1em}{} % subsection formatting
|
||||
\titleformat{\subsubsection}{\bfseries}{\thesubsubsection}{1em}{} % subsubsection formatting
|
||||
\titleformat{\paragraph}{\bfseries}{\theparagraph}{1em}{} % paragraph formatting
|
||||
\titleformat{\subparagraph}{\bfseries}{\thesubparagraph}{1em}{} % subparagraph formatting
|
||||
|
||||
|
||||
% Modify caption style
|
||||
\DeclareCaptionFormat{format}{\textit{#1} \textbf{#3}}
|
||||
\captionsetup{format=format}
|
||||
|
||||
\DeclareCaptionLabelFormat{image}{#2 att.}
|
||||
\captionsetup[figure]{labelformat=image, labelsep=period}
|
||||
|
||||
\counterwithin{figure}{section} % Reset figure counter within each section
|
||||
\renewcommand{\thefigure}{\thesection\arabic{figure}.} % Redefine figure numbering
|
||||
\counterwithin{table}{section} % Reset table counter within each section
|
||||
\renewcommand{\thetable}{\thesection\arabic{table}.} % Redefine table numbering
|
||||
|
||||
\captionsetup[table]{justification=raggedleft,singlelinecheck=off} % Align table caption text to the left
|
||||
\captionsetup[figure]{justification=raggedright,singlelinecheck=off} % Align figure caption text to the right
|
||||
|
||||
|
||||
|
||||
\geometry{a4paper, left=30mm, right=20mm, top=20mm, bottom=20mm}
|
||||
|
||||
\pagestyle{fancy}
|
||||
\fancyhead{}
|
||||
\fancyfoot{}
|
||||
\fancyfoot[C]{\thepage}
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\linespread{1.5}
|
||||
\setlength{\parindent}{1cm}
|
||||
\setlength{\parskip}{0pt}
|
||||
|
||||
\setcounter{secnumdepth}{5} % Numering for subsubsections
|
||||
\setcounter{tocdepth}{3} % Add subsubsections in ToC
|
||||
|
||||
|
||||
% ToC config
|
||||
% TODO: section in uppercase
|
||||
\renewcommand{\cftsecfont}{\MakeUppercase}
|
||||
\renewcommand{\cfttoctitlefont}{\hfill\large\bfseries\MakeUppercase}
|
||||
\renewcommand{\cftaftertoctitle}{\hfill}
|
||||
\cftsetindents{section}{0.5cm}{0.5cm}
|
||||
\cftsetindents{subsection}{1cm}{1cm}
|
||||
\cftsetindents{subsubsection}{1.5cm}{1.5cm}
|
||||
\renewcommand{\contentsname}{Saturs}
|
||||
% \addto\captionslatvian{
|
||||
% \renewcommand{\contentsname}{Satura rādītājs}
|
||||
% }
|
||||
|
||||
|
||||
|
||||
\newcounter{rownum}
|
||||
\renewcommand{\therownum}{\padzeroes[2]{\decimal{rownum}}}
|
||||
|
||||
\keepXColumns
|
||||
|
||||
\input{./src/utils/index.tex}
|
||||
|
||||
|
||||
\begin{document}
|
||||
\input{./src/title-page.tex}
|
||||
\input{./src/abstract.tex}
|
||||
\pagebreak
|
||||
\tableofcontents
|
||||
\input{./src/introduction/index.tex}
|
||||
\input{./src/legends.tex}
|
||||
\input{./src/description/index.tex}
|
||||
\input{./src/requirements/index.tex}
|
||||
\input{./src/design/index.tex}
|
||||
% \input{./src/test.tex}
|
||||
|
||||
\end{document}
|
||||
18
README.md
@ -1,18 +0,0 @@
|
||||
# Mafia the Game Description
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [PDF](#pdf)
|
||||
- [Compilation](#compilation)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
## [PDF](./Mafia-the-Game.pdf)
|
||||
|
||||
## Compilation
|
||||
|
||||
It is recommended to use `xelatex`.
|
||||
```sh
|
||||
mkdir target
|
||||
xelatex -shell-escape -interaction=nonstopmode -output-directory=target Mafia-the-Game.tex
|
||||
```
|
||||
@ -1,38 +1,63 @@
|
||||
\section*{Anotācija}
|
||||
\setcounter{page}{2}
|
||||
Sociālā lomu spēle ``Mafija'' ir plaši pazīstama. Tā ir pieejama vairākos
|
||||
paveidos un formātos, kā arī piedāvā neierobežotu skaitu konfigurāciju un lomu.
|
||||
#import "layout.typ": indent-par
|
||||
#pagebreak()
|
||||
#heading(
|
||||
level: 1,
|
||||
outlined: false,
|
||||
numbering: none,
|
||||
"Anotācija"
|
||||
)
|
||||
|
||||
|
||||
#indent-par([
|
||||
Sociālā lomu spēle "Mafija" ir plaši pazīstama. Tā ir pieejama vairākos
|
||||
paveidos un formātos, kā arī piedāvā neierobežotu konfigurāciju un lomu skaitu.
|
||||
Spēlētāju ērtībai tiek nodrošināts tīmekļa vietnes formāts, kas ietver
|
||||
norādījumus, informējot lietotāju par pieejamajām iespējām, un skaidrojumus,
|
||||
aprakstot spēles elementus un saskarni, ar mērķi vienkāršot tās spēlēšanu.
|
||||
aprakstot spēles elementus un saskarni, ar mērķi atvieglot tās lietošanu.
|
||||
Tirgus izpēte apliecina, ka ir pieejami vairāki, nepilnvērtīgi risinājumi.
|
||||
Programmatūras prasību specifikācija apraksta sistēmas pamatprasības ar
|
||||
Programmatūras prasību specifikācija apraksta sistēmas pamatprasības un
|
||||
papildus funkcionalitāti, tostarp lomu klāsta papildināšanu, spēles
|
||||
konfigurāciju izveidi, kā arī priviliģētu lietotāju (maksas lietotāju),
|
||||
konfigurāciju izveidi, kā arī priviliģētu lietotāju (maksas lietotāju) izveidošanu,
|
||||
pielietojot abonementa paveida maksājumu sistēmu.
|
||||
])
|
||||
|
||||
\textbf{Atslēgvārdi:}
|
||||
#par(first-line-indent: 0cm, [*Atslēgvārdi:*])
|
||||
|
||||
Mafijas spēle, sistēmas prasības, specifikācijas dokuments, programmatūras
|
||||
uzlabošana, lomu spēle, vienkāršota spēlēšana, organizatoriski risinājumi,
|
||||
programmatūras prasību specifikācija, lietotāju veidots saturs, abonements,
|
||||
maksas lietotājs, maksājumu apstrādātāja lietojumprogrammas saskarni (API).
|
||||
|
||||
\section*{Abstract}
|
||||
The social role-playing game ``Mafia'' is widely known. It is available in
|
||||
#text(
|
||||
hyphenate: auto,
|
||||
lang: "en",
|
||||
[
|
||||
|
||||
#pagebreak()
|
||||
#heading(
|
||||
level: 1,
|
||||
outlined: false,
|
||||
numbering: none,
|
||||
"Abstract"
|
||||
)
|
||||
|
||||
#indent-par([
|
||||
The social role-playing game "Mafia" is widely known. It is available in
|
||||
various versions and formats, offering an unlimited number of configurations
|
||||
and roles. For the convenience of players, the game is made as a web
|
||||
application that includes instructions, informing the user about available
|
||||
options, and explanations describing the game's elements and interface, to make
|
||||
it simpler. Market research confirms that several mediocre solutions are
|
||||
ptions, and explanations describing the game's elements and interface, to improve user experience. Market research confirms that several mediocre solutions are
|
||||
available. The software requirements specification describes the system's basic
|
||||
requirements with additional functionality, including expanding the range of
|
||||
roles, creating game configurations, and a privileged user (premium user) using
|
||||
a subscription-based payment system.
|
||||
])
|
||||
|
||||
\textbf{Keywords:}
|
||||
|
||||
#par(first-line-indent: 0cm, [*Keywords:*])
|
||||
|
||||
Mafia game, system requirements, specification document, software improvement,
|
||||
role-playing, simplified gameplay, organizational solutions, software
|
||||
requirements specification, user-generated content, subscription, premium user,
|
||||
payment processor application program interface (API).
|
||||
])
|
||||
BIN
fonts/cmu/cmunbbx.otf
Normal file
BIN
fonts/cmu/cmunbi.otf
Normal file
BIN
fonts/cmu/cmunbl.otf
Normal file
BIN
fonts/cmu/cmunbmo.otf
Normal file
BIN
fonts/cmu/cmunbmr.otf
Normal file
BIN
fonts/cmu/cmunbso.otf
Normal file
BIN
fonts/cmu/cmunbsr.otf
Normal file
BIN
fonts/cmu/cmunbtl.otf
Normal file
BIN
fonts/cmu/cmunbto.otf
Normal file
BIN
fonts/cmu/cmunbx.otf
Normal file
BIN
fonts/cmu/cmunbxo.otf
Normal file
BIN
fonts/cmu/cmunci.otf
Normal file
BIN
fonts/cmu/cmunit.otf
Normal file
BIN
fonts/cmu/cmunobi.otf
Normal file
BIN
fonts/cmu/cmunobx.otf
Normal file
BIN
fonts/cmu/cmunorm.otf
Normal file
BIN
fonts/cmu/cmunoti.otf
Normal file
BIN
fonts/cmu/cmunrb.otf
Normal file
BIN
fonts/cmu/cmunrm.otf
Normal file
BIN
fonts/cmu/cmunsi.otf
Normal file
BIN
fonts/cmu/cmunsl.otf
Normal file
BIN
fonts/cmu/cmunso.otf
Normal file
BIN
fonts/cmu/cmunss.otf
Normal file
BIN
fonts/cmu/cmunssdc.otf
Normal file
BIN
fonts/cmu/cmunst.otf
Normal file
BIN
fonts/cmu/cmunsx.otf
Normal file
BIN
fonts/cmu/cmuntb.otf
Normal file
BIN
fonts/cmu/cmunti.otf
Normal file
BIN
fonts/cmu/cmuntt.otf
Normal file
BIN
fonts/cmu/cmuntx.otf
Normal file
BIN
fonts/cmu/cmunui.otf
Normal file
BIN
fonts/cmu/cmunvi.otf
Normal file
BIN
fonts/cmu/cmunvt.otf
Normal file
7854
img/EkrānskatuPlūsmasDiagramma.svg
Normal file
|
After Width: | Height: | Size: 317 KiB |
7050
img/dpd0/0tāLīmeņaDPD.svg
Normal file
|
After Width: | Height: | Size: 404 KiB |
7145
img/dpd1/1LīmeņaDPDN1.svg
Normal file
|
After Width: | Height: | Size: 386 KiB |
8488
img/dpd1/1LīmeņaDPDN2.svg
Normal file
|
After Width: | Height: | Size: 396 KiB |
1963
img/dpd2/CenuModulis.svg
Normal file
|
After Width: | Height: | Size: 127 KiB |
3850
img/dpd2/LietotājuKontuModulis.svg
Normal file
|
After Width: | Height: | Size: 218 KiB |
4928
img/dpd2/MaksasAbonementaModulis.svg
Normal file
|
After Width: | Height: | Size: 225 KiB |
7171
img/dpd2/ReģistrācijasPieteikšanāsModulis.svg
Normal file
|
After Width: | Height: | Size: 322 KiB |
4479
img/dpd2/SpēlesGaitasModulis.svg
Normal file
|
After Width: | Height: | Size: 227 KiB |
7553
img/dpd2/SpēlesIstabasModulis.svg
Normal file
|
After Width: | Height: | Size: 341 KiB |
4662
img/dpd2/SpēlesLomuModulis.svg
Normal file
|
After Width: | Height: | Size: 250 KiB |
5841
img/dpd2/SpēlesUzstādījumuModulis.svg
Normal file
|
After Width: | Height: | Size: 284 KiB |
3639
img/dpd2/TerzēšanasModulis.svg
Normal file
|
After Width: | Height: | Size: 206 KiB |
BIN
img/erd/FiziskaisERDModelis.png
Normal file
|
After Width: | Height: | Size: 220 KiB |
9256
img/erd/KonceptualaisERModelis.svg
Normal file
|
After Width: | Height: | Size: 604 KiB |
1
img/erd/LogiskaisERDModelis.svg
Normal file
|
After Width: | Height: | Size: 147 KiB |
BIN
img/placeholder.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
img/ui/desktop/available-game-room-list.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
img/ui/desktop/desktop-register.png
Normal file
|
After Width: | Height: | Size: 722 KiB |
BIN
img/ui/desktop/game-action.png
Normal file
|
After Width: | Height: | Size: 506 KiB |
BIN
img/ui/desktop/game-event-overview.png
Normal file
|
After Width: | Height: | Size: 786 KiB |
BIN
img/ui/desktop/game-screen.png
Normal file
|
After Width: | Height: | Size: 781 KiB |
BIN
img/ui/desktop/landingpage.png
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
139
img/ui/desktop/landingpage.svg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
img/ui/desktop/register.png
Normal file
|
After Width: | Height: | Size: 726 KiB |
BIN
img/ui/mobile/lobby.png
Normal file
|
After Width: | Height: | Size: 231 KiB |
BIN
img/ui/tablet/game-phase-change.png
Normal file
|
After Width: | Height: | Size: 328 KiB |
8844
img/uml/EventCreationActivityDiagram-01.svg
Normal file
|
After Width: | Height: | Size: 376 KiB |
2701
img/uml/EventCreationActivityDiagram-02.svg
Normal file
|
After Width: | Height: | Size: 132 KiB |
5281
img/uml/GameActionSwimlaneChart.svg
Normal file
|
After Width: | Height: | Size: 250 KiB |
2123
img/uml/GameRoomStateDiagram.svg
Normal file
|
After Width: | Height: | Size: 149 KiB |
1611
img/uml/ManifiestationDiagram.svg
Normal file
|
After Width: | Height: | Size: 105 KiB |
2447
img/uml/SubscriptionFunctionSequenceDiagram.svg
Normal file
|
After Width: | Height: | Size: 160 KiB |
157
layout.typ
Normal file
@ -0,0 +1,157 @@
|
||||
#import "@preview/i-figured:0.1.0"
|
||||
#import "@preview/big-todo:0.2.0": *
|
||||
#import "@preview/tablex:0.0.6": tablex
|
||||
|
||||
|
||||
#let indent = 1cm
|
||||
#let indent-par(body) = par(h(indent) + body)
|
||||
|
||||
#let project(
|
||||
university: "",
|
||||
faculty: "",
|
||||
title: [],
|
||||
authors: (),
|
||||
advisor: "",
|
||||
date: "",
|
||||
body
|
||||
) = {
|
||||
set document(author: authors)
|
||||
|
||||
set page(
|
||||
margin: (left: 30mm, right: 20mm, top: 20mm, bottom: 20mm),
|
||||
number-align: center,
|
||||
paper: "a4"
|
||||
)
|
||||
set text(
|
||||
//font: "New Computer Modern",
|
||||
font: "CMU",
|
||||
size: 12pt,
|
||||
hyphenate: auto,
|
||||
lang: "lv",
|
||||
region: "LV"
|
||||
)
|
||||
show raw: set text(font: "New Computer Modern Mono")
|
||||
|
||||
show math.equation: set text(weight: 400)
|
||||
|
||||
|
||||
// Formatting for regular text
|
||||
set par(
|
||||
justify: true,
|
||||
leading: 1.5em,
|
||||
first-line-indent: indent,
|
||||
)
|
||||
show par: set block(spacing: 1.5em) // Set 1.5em gap between paragraphs
|
||||
show heading: set block(spacing: 1.5em)
|
||||
set terms(separator: [ -- ])
|
||||
|
||||
|
||||
// Headings
|
||||
set heading(numbering: "1.1.")
|
||||
show heading: it => {
|
||||
if it.level == 1 {
|
||||
// pagebreak(weak: true)
|
||||
text(14pt, align(center, upper(it)))
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Title page config start */
|
||||
align(
|
||||
center,
|
||||
upper(
|
||||
text(
|
||||
size: 16pt,
|
||||
[
|
||||
#university\
|
||||
#faculty
|
||||
]
|
||||
)
|
||||
))
|
||||
|
||||
v(1fr)
|
||||
|
||||
align(
|
||||
center,
|
||||
text(20pt, weight: "bold", title)
|
||||
)
|
||||
|
||||
v(1fr)
|
||||
|
||||
// Author information
|
||||
align(right, [
|
||||
#if authors.len() > 1 {
|
||||
text(weight: "bold", "Darba autori:")
|
||||
} else {
|
||||
text(weight: "bold", "Darba autors:")
|
||||
}\
|
||||
#authors.join("\n")
|
||||
|
||||
#v(2em)
|
||||
|
||||
#if advisor != "" {
|
||||
text(weight: "bold", "Darba vadītājs:\n")
|
||||
advisor
|
||||
}
|
||||
])
|
||||
|
||||
v(0.5fr)
|
||||
|
||||
align(center,
|
||||
upper(text(date))
|
||||
)
|
||||
/* Title page config end */
|
||||
|
||||
|
||||
// WARNING: removove before sending
|
||||
// todo_outline
|
||||
|
||||
|
||||
/* --- Figure/Table conf start --- */
|
||||
show heading: i-figured.reset-counters
|
||||
show figure: i-figured.show-figure.with(numbering: "1.1.")
|
||||
|
||||
show figure.where(kind: "i-figured-table"): set block(breakable: true)
|
||||
show figure.where(kind: "i-figured-table"): set figure.caption(position: top)
|
||||
|
||||
|
||||
show figure: set par(justify: false) // disable justify for figures (tables)
|
||||
|
||||
show figure.caption: it => {
|
||||
if it.kind == "i-figured-table" {
|
||||
align(end, emph(it.counter.display(it.numbering) + " tabula ") + text(weight: "bold", it.body))
|
||||
} else if it.kind == "i-figured-image" {
|
||||
align(start, emph(it.counter.display(it.numbering) + " att. ") + text(weight: "bold", it.body))
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
|
||||
set ref(supplement: it => {}) // disable default reference suppliments
|
||||
/* --- Figure/Table conf end --- */
|
||||
|
||||
set list(marker: ([•], [--], [\*], [·]))
|
||||
set enum(numbering: "1aiA)") // TODO: make the same style as LaTeX: 1. | (a) | i. | A.
|
||||
|
||||
|
||||
// Abstract
|
||||
include "abstract.typ"
|
||||
|
||||
/* ToC config start */
|
||||
// Uppercase 1st level headings in ToC
|
||||
show outline.entry.where(level: 1): it => {
|
||||
upper(it)
|
||||
}
|
||||
|
||||
pagebreak()
|
||||
outline(depth: 3, indent: 1cm, title: text(size: 14pt, "SATURS"))
|
||||
/* ToC config end */
|
||||
|
||||
// Start page numering
|
||||
set page(numbering: "1", number-align: center)
|
||||
|
||||
// Main bdy.
|
||||
body
|
||||
}
|
||||
199
sql/Mafia.sql
Normal file
@ -0,0 +1,199 @@
|
||||
CREATE TABLE "LomasDarbiba" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"nosaukums" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"apraksts" TEXT DEFAULT '' NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "Attels" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"datnes_adrese" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"pievienosanas_laiks" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "Sesija" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"markieris" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"deriguma_termins" TIMESTAMP NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "ParolesAtjaunosana" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"markieris" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"deriguma_termins" TIMESTAMP NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "EpastaApstiprinajums" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"markieris" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"deriguma_termins" TIMESTAMP NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "KontaStavoklis" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"birka" VARCHAR(255) UNIQUE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "IstabasStavoklis" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"birka" VARCHAR(255) UNIQUE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "SpeletajaStavoklis" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"birka" VARCHAR(255) UNIQUE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "Lietotajs" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"segvards" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"epasts" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"parole" VARCHAR(255) NOT NULL,
|
||||
"vards" VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
"uzvards" VARCHAR(255) DEFAULT '' NOT NULL,
|
||||
"dzimsanas_datums" DATE,
|
||||
"bio_info" TEXT DEFAULT '' NOT NULL,
|
||||
"izveidosanas_laiks" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
"ir_apstiprinats_epasts" BOOL DEFAULT FALSE NOT NULL,
|
||||
"stripe_id" VARCHAR(50) UNIQUE,
|
||||
"ir_adminstrators" BOOL DEFAULT FALSE NOT NULL,
|
||||
"konta_stavoklis" INT8 NOT NULL,
|
||||
"attels" INT8,
|
||||
"sesija" INT8 UNIQUE,
|
||||
"epasta_apstiprinajums" INT8 UNIQUE,
|
||||
"paroles_atjaunosana" INT8 UNIQUE,
|
||||
FOREIGN KEY ("konta_stavoklis") REFERENCES "KontaStavoklis" ("id"),
|
||||
FOREIGN KEY ("attels") REFERENCES "Attels" ("id"),
|
||||
FOREIGN KEY ("sesija") REFERENCES "Sesija" ("id"),
|
||||
FOREIGN KEY ("epasta_apstiprinajums") REFERENCES "EpastaApstiprinajums" ("id"),
|
||||
FOREIGN KEY ("paroles_atjaunosana") REFERENCES "ParolesAtjaunosana" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "SpelesLoma" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"nosaukums" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"apraksts" TEXT DEFAULT '' NOT NULL,
|
||||
"ir_pamata" BOOL DEFAULT FALSE NOT NULL,
|
||||
"ir_mafija" BOOL DEFAULT FALSE NOT NULL,
|
||||
"attels" INT8,
|
||||
"autors" INT8,
|
||||
FOREIGN KEY ("attels") REFERENCES "Attels" ("id"),
|
||||
FOREIGN KEY ("autors") REFERENCES "Lietotajs" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "SpelesUzstadijums" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"nosaukums" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"apraksts" TEXT DEFAULT '' NOT NULL,
|
||||
"ir_pamata" BOOL DEFAULT FALSE NOT NULL,
|
||||
"izveidosanas_laiks" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
"autors" INT8 NOT NULL,
|
||||
FOREIGN KEY ("autors") REFERENCES "Lietotajs" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "Istaba" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"nosaukums" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"speles_saksanas_laiks" TIMESTAMP,
|
||||
"speles_beigsanas_laiks" TIMESTAMP,
|
||||
"piekluves_kods" CHAR(6) UNIQUE NOT NULL,
|
||||
"izveidosanas_laiks" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
"stavoklis" INT8 NOT NULL,
|
||||
"speles_uzstadijums" INT8 NOT NULL,
|
||||
FOREIGN KEY ("stavoklis") REFERENCES "IstabasStavoklis" ("id"),
|
||||
FOREIGN KEY ("speles_uzstadijums") REFERENCES "SpelesUzstadijums" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "SpelesNotikums" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"nosaukums" VARCHAR(255) UNIQUE NOT NULL,
|
||||
"nakts_pk" INT2 DEFAULT 0 NOT NULL CHECK ("nakts_pk" >= 0),
|
||||
"veids" VARCHAR(255),
|
||||
"ir_redzams" BOOL DEFAULT FALSE NOT NULL,
|
||||
"izveidosanas_laiks" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
"taimeris" INTERVAL,
|
||||
"lomas_darbiba" INT8 NOT NULL,
|
||||
FOREIGN KEY ("lomas_darbiba") REFERENCES "LomasDarbiba" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "Speletajs" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"ir_noslepkavots" BOOL DEFAULT FALSE NOT NULL,
|
||||
"ir_izbalsots" BOOL DEFAULT FALSE NOT NULL,
|
||||
"ir_istabas_izveidotajs" BOOL DEFAULT FALSE NOT NULL,
|
||||
"stavoklis" INT8 NOT NULL,
|
||||
"istaba" INT8,
|
||||
"speles_loma" INT8,
|
||||
"lietotajs" INT8 NOT NULL,
|
||||
FOREIGN KEY ("stavoklis") REFERENCES "SpeletajaStavoklis" ("id"),
|
||||
FOREIGN KEY ("istaba") REFERENCES "Istaba" ("id"),
|
||||
FOREIGN KEY ("speles_loma") REFERENCES "SpelesLoma" ("id"),
|
||||
FOREIGN KEY ("lietotajs") REFERENCES "Lietotajs" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "Sarakste" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"teksts" TEXT NOT NULL,
|
||||
"ir_mafijas_sarakste" BOOL DEFAULT FALSE NOT NULL,
|
||||
"ir_izmainita" BOOL DEFAULT FALSE NOT NULL,
|
||||
"autors" INT8 NOT NULL,
|
||||
FOREIGN KEY ("autors") REFERENCES "Speletajs" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "NotikumsAizliedzAtlaujDarbibu" (
|
||||
"speletajs" INT8 NOT NULL,
|
||||
"lomas_darbiba" INT8 NOT NULL,
|
||||
"vai_pilda" BOOL DEFAULT TRUE NOT NULL,
|
||||
PRIMARY KEY ("speletajs", "lomas_darbiba"),
|
||||
FOREIGN KEY ("speletajs") REFERENCES "Speletajs" ("id"),
|
||||
FOREIGN KEY ("lomas_darbiba") REFERENCES "LomasDarbiba" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "SpeletajsIzraisaNotikumu" (
|
||||
"speletajs" INT8 NOT NULL,
|
||||
"speles_notikums" INT8 NOT NULL,
|
||||
PRIMARY KEY ("speletajs", "speles_notikums"),
|
||||
FOREIGN KEY ("speletajs") REFERENCES "Speletajs" ("id"),
|
||||
FOREIGN KEY ("speles_notikums") REFERENCES "SpelesNotikums" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "SpeletajsIetekmeNotikumu" (
|
||||
"speletajs" INT8 NOT NULL,
|
||||
"speles_notikums" INT8 NOT NULL,
|
||||
PRIMARY KEY ("speletajs", "speles_notikums"),
|
||||
FOREIGN KEY ("speletajs") REFERENCES "Speletajs" ("id"),
|
||||
FOREIGN KEY ("speles_notikums") REFERENCES "SpelesNotikums" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "SpelesUzstatijumuLomas" (
|
||||
"speles_uzstadijums" INT8 NOT NULL,
|
||||
"speles_loma" INT8 NOT NULL,
|
||||
"skaits" INT2 DEFAULT 1 NOT NULL CHECK ("skaits" >= 1),
|
||||
PRIMARY KEY ("speles_uzstadijums", "speles_loma"),
|
||||
FOREIGN KEY ("speles_uzstadijums") REFERENCES "SpelesUzstadijums" ("id"),
|
||||
FOREIGN KEY ("speles_loma") REFERENCES "SpelesLoma" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "SpelesLomasDarbibas" (
|
||||
"speles_loma" INT8 NOT NULL,
|
||||
"lomas_darbiba" INT8 NOT NULL,
|
||||
PRIMARY KEY ("speles_loma", "lomas_darbiba"),
|
||||
FOREIGN KEY ("speles_loma") REFERENCES "SpelesLoma" ("id"),
|
||||
FOREIGN KEY ("lomas_darbiba") REFERENCES "LomasDarbiba" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "NotikumsIetekmeSpeletaju" (
|
||||
"speletajs" INT8 NOT NULL,
|
||||
"speles_notikums" INT8 NOT NULL,
|
||||
"ir_atlauts" BOOL DEFAULT TRUE,
|
||||
PRIMARY KEY ("speletajs", "speles_notikums"),
|
||||
FOREIGN KEY ("speletajs") REFERENCES "Speletajs" ("id"),
|
||||
FOREIGN KEY ("speles_notikums") REFERENCES "SpelesNotikums" ("id")
|
||||
);
|
||||
|
||||
CREATE TABLE "Atbilde" (
|
||||
"id" SERIAL8 PRIMARY KEY NOT NULL,
|
||||
"raksta" INT8 NOT NULL,
|
||||
"atbild" INT8 NOT NULL,
|
||||
FOREIGN KEY ("raksta") REFERENCES "Sarakste" ("id"),
|
||||
FOREIGN KEY ("atbild") REFERENCES "Sarakste" ("id")
|
||||
);
|
||||
@ -1,9 +0,0 @@
|
||||
\subsection{Esošā stāvokļa apraksts}
|
||||
Tirgū pastāv vairākas sistēmas un citi programmatūras formāti, piemēram,
|
||||
lietotnes, kas piedāvā dažādas lomu spēļu variācijas, to skaitā, ``Warewolf
|
||||
online'', ``Town of Salem'', ``Mafia.gg'', ``BeyondMafia'', ``Mafia: The Game''
|
||||
un daudzi citi. Esošiem risinājumiem ir vairākas problēmas: maksas piekļuve,
|
||||
pārmērīgs iespēju skaits, kas ir pieejamas tikai par maksu, spēle ir pieejama
|
||||
tikai uz mobilā viedtālruņa. ``Mafija'' īstenos svarīgākās no esošo spēļu
|
||||
iespējām un pievienos jaunas iespējas, kas papildinās un uzlabos lietotāju
|
||||
pieredzi, kā arī samazinās maksas funkciju īpatsvaru.
|
||||
@ -1,4 +0,0 @@
|
||||
\subsection{Pasūtītājs}
|
||||
Sistēma nav izstrādāta pēc konkrēta pasūtītāja pieprasījuma, tā ir raksturota
|
||||
un projektēta ar iespēju realizēt pēc studentu grupas iniciatīvas
|
||||
programminženierijas kursa ietvaros.
|
||||
@ -1,17 +0,0 @@
|
||||
\subsection{Pieņēmumi un atkarības}
|
||||
\begin{itemize}
|
||||
\item Ierīce atbilst un spēj pilnvērtīgi izpildīt sistēmas prasības;
|
||||
|
||||
\item Ierīce uztur stabilu un atbilstoša ātruma interneta savienojumu;
|
||||
|
||||
\item Sistēmā tiks integrēta maksājumu apstrādātāja lietojumprogrammas
|
||||
saskarne, kas rediģēs noteiktas lietotāja privilēģijas, sniedzot
|
||||
iespēju iegādāties papildus funkcijas;
|
||||
|
||||
\item Lietotāja izvēlētā pārlūkprogramma atbilst un spēj pilnvērtīgi
|
||||
izpildīt sistēmas prasības;
|
||||
|
||||
\item Maksājumus apstrādās pasūtītāja izvēlēts pakalpojumu sniedzējs,
|
||||
nodrošinot tīmekļa vietnes saskarni maksājuma veikšanai un tā apstrādi
|
||||
ārpus ``MAFIJA'' sistēmas.
|
||||
\end{itemize}
|
||||
@ -1,8 +0,0 @@
|
||||
\section{Vispārējais apraksts}
|
||||
\input{./src/description/current-situation.tex}
|
||||
\input{./src/description/customer.tex}
|
||||
\input{./src/description/perspective.tex}
|
||||
\input{./src/description/requirements.tex}
|
||||
\input{./src/description/users.tex}
|
||||
\input{./src/description/restrictions.tex}
|
||||
\input{./src/description/dependencies.tex}
|
||||
@ -1,11 +0,0 @@
|
||||
\subsection{Produkta perspektīva}
|
||||
Sistēmā tiek integrēti vai izmantoti citu uzņēmumu un izstrādātāju piedāvāti
|
||||
pakalpojumi. Produkta realizācijā ir paredzēts izmantot maksājumu apstrādāšanas
|
||||
pakalpojumus, kamēr tie atbilst sistēmas pieprasītajai funkcionalitātei un
|
||||
piedāvā optimālākos, kā arī drošākos un efektīvākos risinājumus tirgū.
|
||||
|
||||
Maksājumu apstrādātājs realizēs lietotāju maksas pakalpojumu iegādi konkrētu
|
||||
papildus funkciju iegūšanai uz noteiktu laiku. Abonementa detaļas tiek glabātas
|
||||
sistēmā. Tiks izmantota pakalpojumu sniedzēja nodrošināta maksājumu apstrāde
|
||||
ārpus ``MAFIJA'' sistēmas, glabājot minimālu informāciju, tas ir, klienta
|
||||
identifikatoru.
|
||||
@ -1,18 +0,0 @@
|
||||
\subsection{Darījumprasības}
|
||||
|
||||
Sistēmā tiks realizētas sekojošās darījumprasības:
|
||||
\begin{enumerate}
|
||||
\item Lietotāju reģistrācija, autentifikācija;
|
||||
\item Lietotāju un to privilēģiju pārvalde;
|
||||
\item Lietotāju konta apstiprināšana, izmantojot e-pastu;
|
||||
\item Lietotāju profilu personalizācija un kontu rediģēšana;
|
||||
\item Lietotāju stāvokļa virtuālajās telpās uzturēšana un izmaiņa;
|
||||
\item Lietotāju informēšana, izmantojot paziņojumu sistēmu;
|
||||
\item Sinhronizēta spēles stāvokļa atjaunināšana;
|
||||
\item Spēles uzstādījumu un lomu klāsta veidošana, rediģēšana un dzēšana;
|
||||
\item Atvērto un privāto virtuālo spēles istabu pārvalde;
|
||||
\item Spēles automātiska vadība;
|
||||
\item Kopēja un ierobežota (lomu grupu atkarīga) tērzēšana;
|
||||
\item Privilēģiju izmaiņa, izmantojot bezpersonisku maksājumu sistēmu;
|
||||
\item Lietotāju moderēšana.
|
||||
\end{enumerate}
|
||||
@ -1,20 +0,0 @@
|
||||
\subsection{Vispārējie ierobežojumi}
|
||||
|
||||
\begin{enumerate}
|
||||
\item Drošības un aizsardzības apsvērumi:
|
||||
\begin{enumerate}
|
||||
\item Lietotāju paroles tiek šifrētas pirms glabāšanas, izmantojot SHA-2 algoritmu;
|
||||
\item Tiek izmantota trešās puses autentifikācijas integrācija.
|
||||
\end{enumerate}
|
||||
\item Regulējošās politikas apsvērumi:
|
||||
\begin{enumerate}
|
||||
\item Tiek pieprasīta lietotāju atļauja realizēt analītisku datu ievākšanu, izmantojot sīkdatnes.
|
||||
\end{enumerate}
|
||||
\item Izstrādes vides, tehnoloģijas un tīmekļa ierobežojumi:
|
||||
\begin{enumerate}
|
||||
\item Programmēšanas valodas, to tehniskie ierobežojumi;
|
||||
\item Responsivitāte;
|
||||
\item Sistēmas saskarne ir tīmekļa vietne;
|
||||
\item Sistēmas ietvaros mitināta vietne ir kopīga neatkarīgi no ierīces (netiek izmantots apakšdomēns mobilo tālruņu lietotājiem).
|
||||
\end{enumerate}
|
||||
\end{enumerate}
|
||||
@ -1,29 +0,0 @@
|
||||
\subsection{Sistēmas lietotāji}
|
||||
|
||||
Neautentificēts lietotājs (viesis), i.e., viesis ir jebkurš lietotājs, kas nav
|
||||
pieteicies vai reģistrējies sistēmā. Šiem lietotājiem ir pieejamas funkcijas,
|
||||
lai reģistrētos vai pieteiktos sistēmā;
|
||||
|
||||
Kad lietotājs ir pieteicies un ir autentificēts, tam ir pieejamas reģistrēta
|
||||
lietotāja grupas privilēģijas, precīzāk, darbības saistītas ar spēli, profilu
|
||||
un konta pārvaldi. Tā būs vislielākā grupa pēc lietotāju skaita. Maksas
|
||||
lietotājiem, precīzāk, reģistrētiem lietotājiem, kuriem piesaistīts aktīvs
|
||||
abonements, tiek piešķirtas papildus funkcijas - izveidot jaunas virtuālās
|
||||
istabas, izvēlēties spēles konfigurāciju savās istabās un citas. Maksas
|
||||
lietotāja grupa ir atvasināta no reģistrēta lietotāja grupas.
|
||||
|
||||
Administratoru uzdevumi ietver istabu uzturēšanu un lietotāju moderēšanu ar
|
||||
darbībām, kā bloķēšana, spēles istabas un lietotāju stāvokļa izmainīšana, konta
|
||||
informācijas izmaiņa, lomu uzstādījumu un spēles konfigurācijas rediģēšana.
|
||||
Lietotājs ``Sistēma'' izpilda noteiktas, ar spēles gaitu saistītas darbības, kas
|
||||
notiek automātiski un kas nav tiešā veidā citu lietotāju grupu kompetencēs.
|
||||
|
||||
Ar lietotājiem saistītās datu plūsmas ir attēlotas sistēmas nultā līmeņa DPD (skat. \ref{fig:dpd-0} att.).
|
||||
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{./src/img/0tāLīmeņaDPD.png}
|
||||
\caption{0. līmeņa DPD}
|
||||
\label{fig:dpd-0}
|
||||
\end{figure}
|
||||
@ -1,3 +0,0 @@
|
||||
\begin{entityTable}{KontaStavoklis}{entity-account-status}
|
||||
\entityTableRow{teksts}{varchar(255)}{unique, not null}{Konta stāvokļa apraksts}
|
||||
\end{entityTable}
|
||||
@ -1,4 +0,0 @@
|
||||
\begin{entityTable}{EpastaApstiprinajums}{entity-email-confirmation}
|
||||
\entityTableRow{markieris}{varchar(255)}{unique, not null}{Ģenerēts marķieris e-pasta lietotāja apstiprināšanai}
|
||||
\entityTableRow{deriguma\_termins}{timestamp}{not null}{Laiks, līdz kuram e-pasta apstiprināšana ir iespējama}
|
||||
\end{entityTable}
|
||||
@ -1,6 +0,0 @@
|
||||
\begin{entityTable}{SpelesNotikums}{entity-game-event}
|
||||
\entityTableRow{nosaukums}{varchar(255)}{unique, not null}{Notikuma nosaukums}
|
||||
\entityTableRow{nakts\_pk}{int2}{default 0, not null, check (\lowercase{nakts\_pk} >= 0)}{Spēles nakts pēc kārtas}
|
||||
\entityTableRow{ir\_redzams}{bool}{default false, not null}{Vai notikums ir redzams spēlētājiem procesa laikā?}
|
||||
\entityTableRow{izveidosanas\_laiks}{timestamp}{not null, default current\_timestamp}{Laiks, kad dotais spēles notikums tika izveidots/saglabāts datubāzē}
|
||||
\end{entityTable}
|
||||
@ -1,8 +0,0 @@
|
||||
\begin{entityTable}{SpelesLoma}{entity-game-role}
|
||||
\entityTableRow{nosaukums}{varchar(255)}{unique, not null}{Lomas nosaukums}
|
||||
\entityTableRow{apraksts}{text}{default '', not null}{Lomas apraksts}
|
||||
\entityTableRow{max\_speletaju\_ skaits}{int4}{default 1, not null, check (\lowercase{max\_speletaju\_ skaits} > 0)}{Maksimālais spēlētāju skaits spēlē ar doto lomu}
|
||||
\entityTableRow{ir\_pamata}{bool}{default false, not null}{Vai loma ir spēles pamatā vai lietotāju izveidots?}
|
||||
\entityTableRow{ir\_mafija}{bool}{default false, not null}{Vai loma ir mafija?}
|
||||
\entityTableRow{attels}{int8}{}{Lomas attēls, \texttt{FOREING KEY} uz \hyperref[tab:entity-image]{Attels} tabulas id kolonnu}
|
||||
\end{entityTable}
|
||||
@ -1,7 +0,0 @@
|
||||
\begin{entityTable}{SpelesKonfiguracija}{entity-game-setup}
|
||||
\entityTableRow{nosaukums}{varchar(255)}{unique, not null}{Konfigurācijas nosaukums}
|
||||
\entityTableRow{apraksts}{text}{default '', not null}{Konfigurācijas apraksts}
|
||||
\entityTableRow{ir\_pamata}{bool}{default false, not null}{Vai spēles konfigurācijas ir spēles pamatā vai lietotāju izveidots}
|
||||
\entityTableRow{izveidosanas\_laiks}{timestamp}{not null, default current\_timestamp}{Laiks, kad dotais uzstādījums tika izveidots/saglabāts datubāzē}
|
||||
\entityTableRow{autors}{int8}{not null}{Konfigurācijas autors, \texttt{FOREING KEY} uz \hyperref[tab:entity-user]{Lietotajs} tabulas id kolonnu}
|
||||
\end{entityTable}
|
||||
@ -1,4 +0,0 @@
|
||||
\begin{entityTable}{Attels}{entity-image}
|
||||
\entityTableRow{datnes\_adrese}{varchar(255)}{unique, not null}{Saglabātā attēla adrese operētājsistēmā}
|
||||
\entityTableRow{pievienosanas\_laiks}{timestamp}{default current\_timestamp, not null}{Laiks, kad tika izveidots/saglabāts dotais attēls datubāzē}
|
||||
\end{entityTable}
|
||||
@ -1,37 +0,0 @@
|
||||
\subsubsection{Datu bāzes tabulu apraksts}
|
||||
Datubāzes tabulu lauku, datu tipi, lauka atribūti - obligātums, noklusētās vērtības, primārā atslēga,
|
||||
unikalitāte - ir aprakstītas atsevišķās tabulās (skat.
|
||||
\ref{tab:entity-role-action} tab.,
|
||||
\ref{tab:entity-role-disadvantage} tab.,
|
||||
\ref{tab:entity-image} tab.,
|
||||
\ref{tab:entity-subscription-price} tab.,
|
||||
\ref{tab:entity-password-recovery} tab.,
|
||||
\ref{tab:entity-email-confirmation} tab.,
|
||||
\ref{tab:entity-game-role} tab.,
|
||||
\ref{tab:entity-account-status} tab.,
|
||||
\ref{tab:entity-room-status} tab.,
|
||||
\ref{tab:entity-user} tab.,
|
||||
\ref{tab:entity-game-setup} tab.,
|
||||
\ref{tab:entity-player} tab.,
|
||||
\ref{tab:entity-paid-subscription} tab.,
|
||||
\ref{tab:entity-message} tab.)
|
||||
|
||||
Visām tabulām, \texttt{VARCHAR} un \texttt{TEXT} laukiem tiek lietots UTF8 kodējums.
|
||||
|
||||
\input{./src/design/entities/role-action.tex}
|
||||
\input{./src/design/entities/role-disadvantage.tex}
|
||||
\input{./src/design/entities/image.tex}
|
||||
\input{./src/design/entities/subscription-price.tex}
|
||||
\input{./src/design/entities/password-recovery.tex}
|
||||
\input{./src/design/entities/email-confirmation.tex}
|
||||
\input{./src/design/entities/game-role.tex}
|
||||
\input{./src/design/entities/account-status.tex}
|
||||
\input{./src/design/entities/subscription-status.tex}
|
||||
\input{./src/design/entities/room-status.tex}
|
||||
\input{./src/design/entities/user.tex}
|
||||
\input{./src/design/entities/game-setup.tex}
|
||||
\input{./src/design/entities/room.tex}
|
||||
\input{./src/design/entities/game-event.tex}
|
||||
\input{./src/design/entities/player.tex}
|
||||
\input{./src/design/entities/paid-subscription.tex}
|
||||
\input{./src/design/entities/message.tex}
|
||||
@ -1,6 +0,0 @@
|
||||
\begin{entityTable}{Iszina}{entity-message}
|
||||
\entityTableRow{teksts}{text}{not null}{Īsziņas teksts}
|
||||
\entityTableRow{if\_mafijas\_iszina}{bool}{default false, not null}{Vai īsziņas sūtītājs ir mafija?}
|
||||
\entityTableRow{ir\_izmainita}{bool}{default false, not null}{Vai īsziņas saturs ir izmainīts?}
|
||||
\entityTableRow{autors}{int8}{not null}{Īsziņas sūtītājs, \texttt{FOREING KEY} uz \hyperref[tab:entity-user]{Lietotajs} tabulas id kolonnu}
|
||||
\end{entityTable}
|
||||
@ -1,9 +0,0 @@
|
||||
\begin{entityTable}{MaksasAbonements}{entity-paid-subscription}
|
||||
\entityTableRow{stripe\_id}{varchar(255)}{unique, not null}{Unikālais identifikators, kurš tiek iegūts no maksājuma procesora klienta - \href{https://stripe.com}{Stripe}}
|
||||
\entityTableRow{stavoklis}{int8}{not null}{Abonementa stāvoklis, \texttt{FOREING KEY} uz \hyperref[tab:entity-subscription-status]{AbonementaStavoklis} tabulas id kolonnu}
|
||||
\entityTableRow{sakuma\_laiks}{timestamp}{not null, default current\_timestamp}{Laiks, kad abonements ir aktivizēts}
|
||||
\entityTableRow{periods}{interval}{not null}{Laika periods dienās, cik ilgi abonements ir aktīvs}
|
||||
\entityTableRow{atteikums\_laiks}{timestamp}{}{Laiks, kad lietotājs atteicās no abonementa}
|
||||
\entityTableRow{lietotajs}{int8}{not null}{Abonementa lietotājs, \texttt{FOREING KEY} uz \hyperref[tab:entity-user]{Lietotajs} tabulas id kolonnu}
|
||||
\entityTableRow{abonementa\_cena}{int8}{not null}{Abonementa cena, \texttt{FOREING KEY} uz \hyperref[tab:entity-subscription-price]{AbonementaCena} tabulas id kolonnu}
|
||||
\end{entityTable}
|
||||
@ -1,4 +0,0 @@
|
||||
\begin{entityTable}{ParolesAtjaunosana}{entity-password-recovery}
|
||||
\entityTableRow{markieris}{varchar(255)}{unique, not null}{Ģenerēts marķieris e-pasta lietotāja paroles atjaunošanai}
|
||||
\entityTableRow{deriguma\_termins}{timestamp}{not null}{Laiks, līdz kurams paroles atjaunošana ir iespējama}
|
||||
\end{entityTable}
|
||||
@ -1,10 +0,0 @@
|
||||
\begin{entityTable}{Speletajs}{entity-player}
|
||||
\entityTableRow{nosaukums}{varchar(255)}{unique, not null}{Notikuma nosaukums}
|
||||
\entityTableRow{ir\_noslepkavots}{bool}{default false, not null}{Vai dotais spēlētājs ir noslepkavots?}
|
||||
\entityTableRow{ir\_izbalsots}{bool}{default false, not null}{Vai dotais spēlētājs ir izbalsots?}
|
||||
\entityTableRow{ir\_izslegts}{bool}{default false, not null}{Vai dotais spēlētājs ir izslēgts?}
|
||||
\entityTableRow{ir\_aktivs}{bool}{default true, not null}{Vai dotais spēlētājs ir aktīvs?}
|
||||
\entityTableRow{redz\_mafijas\_sakarus}{bool}{default false, not null}{Vai dotais spēlētājs ir redz mafijas sakarus?}
|
||||
\entityTableRow{istaba}{int8}{}{Istaba, kurā spēlē dotais spēlētājs, \texttt{FOREING KEY} uz \hyperref[tab:entity-room]{Istaba} tabulas id kolonnu}
|
||||
\entityTableRow{speles\_loma}{int8}{not null}{Loma, kuru spēlē dotais spēlētājs, \texttt{FOREING KEY} uz \hyperref[tab:entity-game-role]{SpelesLoma} tabulas id kolonnu}
|
||||
\end{entityTable}
|
||||
@ -1,4 +0,0 @@
|
||||
\begin{entityTable}{LomasDarbiba}{entity-role-action}
|
||||
\entityTableRow{nosaukums}{varchar(255)}{unique, not null}{Lomas darbības nosaukums}
|
||||
\entityTableRow{is\_nekavejoties}{bool}{default false, not null}{Vai lomas darbība ir tūlītēja}
|
||||
\end{entityTable}
|
||||
@ -1,4 +0,0 @@
|
||||
\begin{entityTable}{LomasTrukums}{entity-role-disadvantage}
|
||||
\entityTableRow{nosaukums}{varchar(255)}{unique, not null}{Lomas trūkuma nosaukums}
|
||||
\entityTableRow{apraksts}{text}{default '', not null}{Lomas trūkuma apraksts}
|
||||
\end{entityTable}
|
||||
@ -1,3 +0,0 @@
|
||||
\begin{entityTable}{IstabasStavoklis}{entity-room-status}
|
||||
\entityTableRow{teksts}{varchar(255)}{unique, not null}{Istabas stāvokļa apraksts}
|
||||
\end{entityTable}
|
||||
@ -1,10 +0,0 @@
|
||||
\begin{entityTable}{Istaba}{entity-room}
|
||||
\entityTableRow{nosaukums}{varchar(255)}{unique, not null}{Istabas Nosaukums}
|
||||
\entityTableRow{speles\_saksanas\_ laiks}{timestamp}{}{Laiks, kad spēle sākas}
|
||||
\entityTableRow{speles\_beigsanas\_ laiks}{timestamp}{}{Laiks, kad spēle beidzas}
|
||||
\entityTableRow{stavoklis}{int8}{not null}{Pašreizējais spēles stāvoklis, \texttt{FOREING KEY} uz \hyperref[tab:entity-room-status]{IstabasStavoklis} tabulas id kolonnu}
|
||||
\entityTableRow{piekluves\_kods}{char(6)}{unique}{Unikāls istabas piekļuves kods, 6 lielie burtcipari}
|
||||
\entityTableRow{vai\_rada\_miruso\_ lomu}{bool}{default false, not null}{Vai pēc spēlētāja nāves var atklāt viņa lomu?}
|
||||
\entityTableRow{izveidosanas\_laiks}{timestamp}{default current\_timestamp, not null}{Laiks, kad dotā spēles istaba tika izveidota/saglabāta datubāzē}
|
||||
\entityTableRow{speles\_konfiguracija}{int8}{not null}{Spēles uzstādījumi, kurus izmanto dotā istaba, \texttt{FOREING KEY} uz \hyperref[tab:entity-game-setup]{SpelesKonfiguracija} tabulas id kolonnu}
|
||||
\end{entityTable}
|
||||
@ -1,5 +0,0 @@
|
||||
\begin{entityTable}{AbonementaCena}{entity-subscription-price}
|
||||
\entityTableRow{cena}{decimal(16,2)}{default 0, not null, check (\lowercase{cena} >= 0)}{Abonementa cena, kuras garums var būt līdz 16 simboliem un tiek noapaļots līdz 2 cipariem aiz komata}
|
||||
\entityTableRow{pievienosanas\_laiks}{timestamp}{default current\_timestamp, not null}{Laiks, kad tika izveidots/saglabāts dotā cena datubāzē}
|
||||
\entityTableRow{aktivizesanas\_laiks}{timestamp}{not null, check (\lowercase{aktivizesanas\_ laiks} >= \lowercase{pievienosanas\_ laiks})}{Laiks, no kura ši cena ir aktīva}
|
||||
\end{entityTable}
|
||||