WebSphere Commerce database table: CPWALLET

This table contains the coupons that the user has accepted. This table is being deprecated and this implementation will be replaced by px_promotion related tables since 6.0.

Column Descriptions
Column Name Column Type Description
CPWALLET_ID BIGINT NOT NULL Primary Key.
CPPMN_ID INTEGER NOT NULL Foreign key to CPPMN table. This is the promotion ID.
USERS_ID BIGINT NOT NULL Foreign key to USERS table. This is the customer ID.
NUMUSE INTEGER NOT NULL Number of times this coupon has been used.
STATE CHAR(4) NOT NULL This is the current state of the coupon. Possible values include:
U=Usable
D=Deleted
N=Not Usable
E=Expired
ACCEPTFROMTYPE CHAR(4) NOT NULL Indicates from where the coupon was accepted. Possible values include:
B = banner advertisement.
E = e-mail
O = offerlist
TIMEACCEPT TIMESTAMP Time when the table entry was made.
FIELD1 VARCHAR(64) Customizable.
OPTCOUNTER SMALLINT Reserved for IBM internal use.

Indexes
Index Name Indexed Column Names Index Type
SQL060903235148360 CPWALLET_ID Primary Key
I0000283 USERS_ID+STATE Non-Unique Index
I0000284 CPPMN_ID+USERS_ID Non-Unique Index

Constraints
Constraint Name Column Names Foreign Table Name Foreign Column Names Constraint Type
F_277 CPPMN_ID CPPMN CPPMN_ID Cascade
F_276 USERS_ID USERS USERS_ID Cascade

Constraint Name Referenced Column Name Foreign Table Name Foreign Column Names Constraint Type
F_974 CPWALLET_ID CPEMAILMAP CPWALLET_ID Cascade
F_262 CPWALLET_ID CPITMAP CPWALLET_ID Cascade
F_484 CPWALLET_ID ORCPMAP CPWALLET_ID Cascade
F_828 CPWALLET_ID TCPITMAP CPWALLET_ID Cascade
F_862 CPWALLET_ID TORCPMAP CPWALLET_ID Cascade
Related reference