generated from lucien/api-template
add: added auth to the api
This commit is contained in:
parent
6017eb9d1f
commit
217c763abd
8 changed files with 790 additions and 279 deletions
141
back/bank.sql
Normal file
141
back/bank.sql
Normal file
|
@ -0,0 +1,141 @@
|
|||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.2.1
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: leizour.fr
|
||||
-- Generation Time: Apr 09, 2025 at 02:41 PM
|
||||
-- Server version: 10.11.3-MariaDB-1:10.11.3+maria~ubu2204
|
||||
-- PHP Version: 8.1.19
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Database: `bank`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `accounts`
|
||||
--
|
||||
|
||||
CREATE TABLE `accounts` (
|
||||
`id` int(11) NOT NULL,
|
||||
`balance` bigint(20) NOT NULL,
|
||||
`client_id` int(11) NOT NULL,
|
||||
`name` varchar(20) NOT NULL,
|
||||
`interest` float NOT NULL DEFAULT 0
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `cards`
|
||||
--
|
||||
|
||||
CREATE TABLE `cards` (
|
||||
`id` int(11) NOT NULL,
|
||||
`account_id` int(11) NOT NULL,
|
||||
`number` int(11) NOT NULL,
|
||||
`expiration` timestamp NOT NULL,
|
||||
`cvc` int(11) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `transfers`
|
||||
--
|
||||
|
||||
CREATE TABLE `transfers` (
|
||||
`id` int(11) NOT NULL,
|
||||
`account_from_id` int(11) NOT NULL,
|
||||
`account_to_id` int(11) NOT NULL,
|
||||
`name` varchar(30) NOT NULL,
|
||||
`value` int(11) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
|
||||
CREATE TABLE `users` (
|
||||
`id` int(11) NOT NULL,
|
||||
`name` varchar(20) NOT NULL,
|
||||
`lastname` varchar(20) NOT NULL,
|
||||
`password` varchar(150) NOT NULL,
|
||||
`email` varchar(100) NOT NULL,
|
||||
`numero` varchar(20) NOT NULL,
|
||||
`admin` tinyint(1) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `accounts`
|
||||
--
|
||||
ALTER TABLE `accounts`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `cards`
|
||||
--
|
||||
ALTER TABLE `cards`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `transfers`
|
||||
--
|
||||
ALTER TABLE `transfers`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `accounts`
|
||||
--
|
||||
ALTER TABLE `accounts`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `cards`
|
||||
--
|
||||
ALTER TABLE `cards`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `transfers`
|
||||
--
|
||||
ALTER TABLE `transfers`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
Loading…
Add table
Add a link
Reference in a new issue