PHP Classes

File: db.sql

Recommend this page to a friend!
  Classes of Mateo   PHP Banking System API   db.sql   Download  
File: db.sql
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Banking System API
API to implement banking transactions
Author: By
Last change:
Date: 6 months ago
Size: 1,045 bytes
 

Contents

Class file image Download
-- Usuarios CREATE TABLE `users` ( `id` varchar(50) NOT NULL, `nombre` varchar(20) NOT NULL, `pin` int(11) NOT NULL COMMENT 'AMT pin code', `saldo` float DEFAULT 0 COMMENT 'Saldo del usuario', `created_at` datetime NOT NULL DEFAULT current_timestamp(), PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci; -- Transacciones entre usuarios CREATE TABLE `transactions` ( `id` varchar(50) NOT NULL, `mount` float NOT NULL COMMENT 'Monto a depositar', `created_at` datetime NOT NULL DEFAULT current_timestamp(), `user_id` varchar(50) NOT NULL COMMENT 'Usuario que deposita', `target_id` varchar(50) NOT NULL COMMENT 'Usuario a depositar', PRIMARY KEY (`id`), KEY `fk_user_transactions_1` (`user_id`), CONSTRAINT `fk_user_transactions_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;