This is a sample Pizzeria application (backend and frontend).
To import this module:
- Create a module named
Pizzeria
- Set the settings as:
{
"type": "git",
"origin": {
"uri": "https://github.com/simplicitesoftware/module-pizzeria.git"
}
}
- Click on the Import module button
In order to have the frontend working the password for the
webservices-only user pizzeria
must be simplicite
.
This can be acheived by importing the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<simplicite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.simplicite.fr/base" xsi:schemaLocation="http://www.simplicite.fr/base https://www.simplicite.io/resources/schemas/base.xsd">
<object>
<name>UserPwd</name>
<action>update</action>
<data>
<usr_login_read>pizzeria</usr_login_read>
<usr_password>simplicite</usr_password>
</data>
</object>
</simplicite>
Sample data is provided as a module's dataset.
Open this dataset and click on the Apply button after having imported the module and made a full clear cache.
This module can be analysed by the SonarQube quality analysis tool with the follwing command:
sonar-scanner -Dsonar.exclusions="**.min.js,**.min.css,ObjectExternal/pizzeria-resources/STYLES.less"`
Note: this module is implemented using the Rhino scripting language on server-side.
Pizza order history business object, tracks changes on:
- Date
- Status
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
row_ref_id link to PzaOrder |
id | yes* | Record row ID | ||
row_idx |
int(11) | yes* | yes | History record index | |
created_by_hist |
char(100) | yes* | Created by | ||
created_dt_hist |
datetime | yes* | Created date | ||
pzaOrdDate |
datetime | yes* | Order date | ||
pzaOrdStatus |
enum(20) using PZA_ORD_STATUS list |
yes | yes | Status |
PZA_ORD_STATUS
PND
PendingVAL
ValidatedDEL
DeliveredCNC
Cancelled
Pizza order business object
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
pzaOrdDate |
datetime | yes* | Order date | ||
pzaOrdName |
char(100) | yes | yes | yes | Order name |
pzaOrdPhone |
phone(20) | yes | yes | Ordering person's phone number | |
pzaOrdEmail |
email(100) | yes | yes | Ordering person's email address | |
pzaOrdAddress |
char(100) | yes | yes | yes | Address |
pzaOrdCoordinates |
geocoords | yes | Coordinates | ||
pzaOrdComments |
text(1000000) | yes | Order comments | ||
pzaOrdStatus |
enum(20) using PZA_ORD_STATUS list |
yes | yes | Status | |
pzaOrdPizId link to PzaPizza |
id | yes | yes | Order pizza | |
Ref. pzaOrdPizId.pzaPizName |
regexp(100) | Pizza name | |||
Ref. pzaOrdPizId.pzaPizPicture |
image | Pizza picture | |||
Ref. pzaOrdPizId.pzaPizPrice |
float(10, 2) | Pizza price |
PZA_ORD_STATUS
PND
PendingVAL
ValidatedDEL
DeliveredCNC
Cancelled
Pizza business object
Name | Type | Required | Updatable | Personal | Description |
---|---|---|---|---|---|
pzaPizName |
regexp(100) | yes* | yes | Pizza name | |
pzaPizPrice |
float(10, 2) | yes | yes | Pizza price | |
pzaPizType |
enum(10) using APP_PIZ_TYPE list |
yes | yes | Pizza type | |
pzaPizDiameter |
int(3) | yes | Pizza diameter | ||
pzaPizPicture |
image | yes | Pizza picture | ||
pzaPizDesc |
html(10000) | yes | Pizza description | ||
pzaPizVideo |
url(1024) | yes | Pizza presentation video |
APP_PIZ_TYPE
THIN
ThinPAN
Pan
Pizzeria web frontend using simple Mustache templating