**
Bootstrap along with its templates and snippets were used in the making of the included web pages and can be found
at https://startbootstrap.com/themes/stylish-portfolio/, https://startbootstrap.com/snippets/pricing-table/ and
https://startbootstrap.com/snippets/sign-in-split/. In addition, FontAwesome was used in the making of the included
web pages and can be found at https://fontawesome.com.
**

This web application was made with the following assumptions:

> The automatic generation of number plates that were partially random in able to reflect an application concept that
meant that a user could bid on a batch of number plates with the intention of using them for a company or business or
similar, and hence the privatizing of it's motor vehicle assets.

> The grouping of number plates was done so on the basis of pre-determined, partially random registration numbers that
reflected a particular industry.

>The permission of users was done so for the sole purpose of demonstrating how a user would navigate the system,
bid on and view batches, and how the application facilitates the personalising of the users experience. The permission
of users can be further demonstrated by accessing a drop down menu in the navigation section of the web-page where the
application can be demoed through the perception of two different users of this system. The authentication and
registration of users was not assumed.
As a consequence, the user references has been hardcoded for both users and so it is imperative that:
    1. The appropriate table insertions are made (located below).
    2. The insertions are to be the first two insertions such that their ids are 1 and 2.

>The valuation of number plates was not done on generation due to the nature of the batches and how every number plate
already mimics a perceivable word or phrase. However, the application facilitates the demonstration of how this
valuation would be made and can be found in the web-page.

>The discarding of number plates due to offensive phrases being perceived to be included has been fully implemented.
However, due to the nature of the batches and their plates and the unlikely occurrence of such a number plate in such
few batches the application facilitates the demonstration of how this is implemented.

>The valuation of number plates is done by its calculated likeness to a list of names found in the project structure
with the filename 'names.txt'.

>The discarding of number plates due to offensive phrases is done so by its calculated likeliness to a list of phrases
THAT IS LEFT TO THE EXAMINER TO COMPILE and can be found and modified in the project structure with the filename
'cussFile.txt'. Due to the size of standard number plates THE WORDS AND PHRASES ADDED MUST BE OF 7 CHARACTERS OR LESS
AND MUST FOLLOW THE PREVIOUS WITH A NEW LINE.

>The demonstrations of the valuation and offense checking of number plates is done so for words and phrases that are of
7 characters or less and contain letters a-Z and or 0-9.

>The generation of auction times was done so to demonstrate auctions that have passed, that are in progress and that
are yet to have started. Dummy bid data is to be inserted into the the database upon creation to demonstrate
declarations made for bids of previous auctions (sql below).

>The declaration of winning users will be done so in the 'Your Bids' section and is private to the winning user
although other users that have bid and have lost will be notified.

>The application contains unit tests for the generation of number plates along with cucumber tests for the automation-
testing of the API service. Appropriate software for running these tests on any machine is assumed. (Generator class
methods were made public for testing purposes as no workaround was identified)

Please use the following SQL to create the database and the appropriate insertions:

CREATE SEQUENCE public.auction_id_seq;
CREATE SEQUENCE public.batch_id_seq;
CREATE SEQUENCE public.bid_id_seq;
CREATE SEQUENCE public.bidder_id_seq;
CREATE SEQUENCE public.reg_id_seq;

CREATE TABLE public.bidder
(
    bidder_id integer NOT NULL DEFAULT nextval('bidder_id_seq'::regclass),
    bidder_name text COLLATE pg_catalog."default" NOT NULL,
    bidder_email text COLLATE pg_catalog."default" NOT NULL,
    bidder_password text COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT bidder_pkey PRIMARY KEY (bidder_id)
)
WITH (
    OIDS = FALSE
)
INSERT INTO public.bidder(
	bidder_name, bidder_email, bidder_password)
	VALUES (user1, user1@email.com, user1);
INSERT INTO public.bidder(
	bidder_name, bidder_email, bidder_password)
	VALUES (user2, user2@email.com, user2);

CREATE TABLE public.reg
(
    reg_id integer NOT NULL DEFAULT nextval('reg_id_seq'::regclass),
    reg_no text COLLATE pg_catalog."default" NOT NULL,
    batch integer NOT NULL,
    CONSTRAINT reg_pkey PRIMARY KEY (reg_id),
    CONSTRAINT batch_fk FOREIGN KEY (batch)
        REFERENCES public.batch (batch_id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)
WITH (
    OIDS = FALSE
)
CREATE TABLE public.batch
(
    batch_id integer NOT NULL DEFAULT nextval('batch_id_seq'::regclass),
    buy_now_price double precision,
    winning_bid double precision,
    winning_bidder integer,
    auction integer NOT NULL,
    batch_name text COLLATE pg_catalog."default",
    CONSTRAINT batch_pkey PRIMARY KEY (batch_id),
    CONSTRAINT auction_fk FOREIGN KEY (auction)
        REFERENCES public.auction (auction_id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT winning_bidder_fk FOREIGN KEY (winning_bidder)
        REFERENCES public.bidder (bidder_id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)
WITH (
    OIDS = FALSE
)
CREATE TABLE public.auction
(
    auction_id integer NOT NULL DEFAULT nextval('auction_id_seq'::regclass),
    start_time date NOT NULL,
    stop_time date NOT NULL,
    CONSTRAINT auction_pkey PRIMARY KEY (auction_id)
)
WITH (
    OIDS = FALSE
)
CREATE TABLE public.bid
(
    bid_id integer NOT NULL DEFAULT nextval('bid_id_seq'::regclass),
    bid_amount integer NOT NULL,
    batch integer NOT NULL,
    bidder integer NOT NULL,
    CONSTRAINT bid_pkey PRIMARY KEY (bid_id),
    CONSTRAINT batch_fk FOREIGN KEY (batch)
        REFERENCES public.batch (batch_id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT bidder_fk FOREIGN KEY (bidder)
        REFERENCES public.bidder (bidder_id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)
WITH (
    OIDS = FALSE
)
INSERT INTO public.bid(
	bid_amount, batch, bidder)
	VALUES (30, 4, 1),
	(50, 4, 1),
	(40, 4, 2);