Giter Site home page Giter Site logo

ctc-api's Introduction

ctc-api

Database

CREATE TABLE public.users
(
	datetime timestamp with time zone NOT NULL DEFAULT now(),
	username character varying(16) COLLATE pg_catalog."default" NOT NULL,
	password character(1024) COLLATE pg_catalog."default" NOT NULL,
	salt character(128) COLLATE pg_catalog."default" NOT NULL,
	type text COLLATE pg_catalog."default" NOT NULL DEFAULT 'student'::text,
	CONSTRAINT users_pkey PRIMARY KEY (username)
);

CREATE TABLE public.sessions
(
	datetime timestamp with time zone NOT NULL DEFAULT now(),
	username character varying(16) COLLATE pg_catalog."default" NOT NULL,
	token character(512) COLLATE pg_catalog."default" NOT NULL,
	CONSTRAINT sessions_pkey PRIMARY KEY (token),
	CONSTRAINT sessions_fkey_username FOREIGN KEY (username)
	REFERENCES public.users (username) MATCH SIMPLE
		ON UPDATE CASCADE
		ON DELETE CASCADE
);

CREATE TABLE public.caesar
(
	datetime_created timestamp with time zone NOT NULL DEFAULT now(),
	datetime_submitted timestamp with time zone,
	username character varying(16) COLLATE pg_catalog."default" NOT NULL,
	key numeric,
	message text COLLATE pg_catalog."default",
	cipher text COLLATE pg_catalog."default",
	type text COLLATE pg_catalog."default" NOT NULL,
	CONSTRAINT caesar_fkey_username FOREIGN KEY (username)
	REFERENCES public.users (username) MATCH SIMPLE
		ON UPDATE CASCADE
		ON DELETE CASCADE
);

CREATE TABLE public.rsa
(
    datetime_created timestamp with time zone NOT NULL DEFAULT now(),
    datetime_submitted timestamp with time zone,
    username character varying(16) COLLATE pg_catalog."default" NOT NULL,
    p numeric NOT NULL,
    q numeric NOT NULL,
    e numeric NOT NULL,
    d numeric NOT NULL,
    m numeric,
    c numeric,
    type text COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT rsa_fkey_username FOREIGN KEY (username)
        REFERENCES public.users (username) MATCH SIMPLE
        ON UPDATE CASCADE
        ON DELETE CASCADE
);

CREATE TABLE public.dss
(
    datetime_created timestamp with time zone NOT NULL DEFAULT now(),
    datetime_submitted timestamp with time zone,
    username character varying(16) COLLATE pg_catalog."default" NOT NULL,
    p numeric NOT NULL,
    q numeric NOT NULL,
    g numeric NOT NULL,
    h text,
    r numeric,
    s numeric,
    sk numeric,
    pk numeric,
    k numeric,
    u numeric,
    v numeric,
    w numeric,
    m numeric NOT NULL,
    type text COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT rsa_fkey_username FOREIGN KEY (username)
        REFERENCES public.users (username) MATCH SIMPLE
        ON UPDATE CASCADE
        ON DELETE CASCADE
);

ctc-api's People

Contributors

kiashakiba avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.