Credit card information.
| Column | Type | Constraint | Description |
|---|---|---|---|
| shop | TEXT | PRIMARY KEY | Shop ID. (shop.username) |
| order_id | INTEGER | Order ID. (order.id) | |
| company | TEXT | NOT NULL | Credit card company ID. |
| number | TEXT | NOT NULL | Credit card number. |
| nominee | TEXT | NOT NULL | Credit card nominee. (English alphabets in ASCII characters) |
| expiry_month | INTEGER | NOT NULL | Expiration month. |
| expiry_year | INTEGER | NOT NULL | Expiration year. |
| pin | TEXT | NOT NULL | Credit card pin number. |
| ip | TEXT | NOT NULL |
IP address of ordered user. FIXME: This field must be moved to order. |
| billing_address_index | INTEGER |
This field may use to certify whether the billing address is same as credit card owner's address. (destination.index) FIXME: Because of destination's content can be changed, it requires another table to just store the stable billing address. FIXME?: Another table to hold just a billing address may be needed. |
CREATE TABLE credit_card( shop TEXT, order_id INTEGER, company TEXT NOT NULL, number TEXT NOT NULL, nominee TEXT NOT NULL, expiry_month INTEGER NOT NULL, expiry_year INTEGER NOT NULL, pin TEXT NOT NULL, ip TEXT NOT NULL, billing_address_index INTEGER, PRIMARY KEY(shop, order_id) );