aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarf20 <aruizfernandez05@gmail.com>2024-03-22 21:32:37 +0100
committerarf20 <aruizfernandez05@gmail.com>2024-03-22 21:32:37 +0100
commitb33ea637696031c8408b50b20d8d0dfbe12e9076 (patch)
tree2c72e40b438e12e704e3a79e963620f0df4a0300
parentc9723ae608ad34b13371507f14b7a7d170f2ce78 (diff)
downloadarfnet2-cstims-b33ea637696031c8408b50b20d8d0dfbe12e9076.tar.gz
arfnet2-cstims-b33ea637696031c8408b50b20d8d0dfbe12e9076.zip
Invoice SQL init
-rw-r--r--README.md4
-rw-r--r--dbinit.sql11
2 files changed, 12 insertions, 3 deletions
diff --git a/README.md b/README.md
index 200f7a4..1df17ef 100644
--- a/README.md
+++ b/README.md
@@ -73,7 +73,7 @@ Tables:
orders List of user orders and management notes etc
id autoincrement, service id, instance name, client id, order date, specific billing, comments
tickets List of tickets
- id autoincrement, client id, title, body, status { open, closed, nofix }, asignee
+ id autoincrement, order id, subject, body, status { open, closed, nofix }, asignee
invoices List of invoices
- id autoincrement, client id, service id, bill amount, description, date, status { paid, unpaid }
+ id autoincrement, order id, description, date, pdf, status { paid, unpaid }
```
diff --git a/dbinit.sql b/dbinit.sql
index 9ee8f0d..a75b146 100644
--- a/dbinit.sql
+++ b/dbinit.sql
@@ -29,7 +29,6 @@ CREATE TABLE `arfnet2`.`orders` (
`billing` VARCHAR(255) NOT NULL ,
`date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
`status` ENUM('setting up','active','inactive') NOT NULL DEFAULT 'setting up' ,
- `duedate` TIMESTAMP NOT NULL DEFAULT 0 ,
`comments` TEXT NOT NULL ,
PRIMARY KEY (`id`)
);
@@ -45,3 +44,13 @@ CREATE TABLE `arfnet2`.`tickets` (
`asignee` INT NOT NULL ,
PRIMARY KEY (`id`)
);
+
+CREATE TABLE `arfnet2`.`invoices` (
+ `id` INT NOT NULL AUTO_INCREMENT ,
+ `order` INT NOT NULL ,
+ `desc` VARCHAR(255) NOT NULL ,
+ `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
+ `pdf` MEDIUMBLOB NOT NULL ,
+ `status` ENUM('paid','unpaid') NOT NULL DEFAULT 'unpaid' ,
+ PRIMARY KEY (`id`)
+);