Skip to content

Pizzeria sample module for Simplicité

Notifications You must be signed in to change notification settings

simplicitesoftware/module-pizzeria

Repository files navigation


Pizzeria module definition

Quality Gate Status

Introduction

This is a sample Pizzeria application (backend and frontend).

Import

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

Configure

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>

Load data

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.

Quality

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.

PzaOrderHistoric business object definition

Pizza order history business object, tracks changes on:

  • Date
  • Status

Fields

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

Lists

  • PZA_ORD_STATUS
    • PND Pending
    • VAL Validated
    • DEL Delivered
    • CNC Cancelled

PzaOrder business object definition

Pizza order business object

Fields

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

Lists

  • PZA_ORD_STATUS
    • PND Pending
    • VAL Validated
    • DEL Delivered
    • CNC Cancelled

PzaPizza business object definition

Pizza business object

Fields

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

Lists

  • APP_PIZ_TYPE
    • THIN Thin
    • PAN Pan

pizzeria external object definition

Pizzeria web frontend using simple Mustache templating

Releases

No releases published

Packages

No packages published