Add Amazon revenue accounting
This commit is contained in:
@@ -30,6 +30,7 @@ CREATE TABLE IF NOT EXISTS books (
|
||||
printing_costs DECIMAL(10,2) NOT NULL DEFAULT 0.00,
|
||||
selling_price DECIMAL(10,2) NOT NULL DEFAULT 0.00,
|
||||
ebook_price DECIMAL(10,2) NOT NULL DEFAULT 0.00,
|
||||
amazon_gross DECIMAL(10,2) NOT NULL DEFAULT 0.00,
|
||||
isbn_print VARCHAR(20) NULL,
|
||||
isbn_ebook VARCHAR(20) NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
@@ -55,6 +56,7 @@ CREATE TABLE IF NOT EXISTS book_sales (
|
||||
wholesale_quantity INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
bookseller_quantity INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
direct_quantity INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
amazon_quantity INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (book_id),
|
||||
CONSTRAINT fk_book_sales_book FOREIGN KEY (book_id) REFERENCES books (id) ON DELETE CASCADE
|
||||
|
||||
Reference in New Issue
Block a user