Payment History
The PaymentHistory table is designed to store payment history information. It includes columns for the payment ID, payment history type, user ID, amount, status, notes, and flags to indicate the user who created or last modified the payment history, along with the corresponding date and time.
Table Structure
[ID](bigint,auto-incrementing,primary key): Represents the unique identifier for each payment history record.[Payment_ID](bigint,not null): Foreign key referencing the[ID]column of thePaymenttable.[Payment_History_Type](smallint,not null): Represents the type of payment history.[User_ID](bigint,not null): Represents the user ID associated with the payment history.[Amount](float,not null): Represents the amount of the payment.[Status](smallint,not null): Represents the status of the payment.[Notes](nvarchar(max),nullable): Represents additional notes for the payment history.[Modified_By](bigint,nullable): Represents the user who last modified the payment history.[Modified_Date](datetime,not null): Represents the date and time when the payment history was last modified.[Created_By](bigint,nullable): Represents the user who created the payment history.[Created_Date](datetime,not null): Represents the date and time when the payment history was created.
Constraints
[PK_PaymentHistory]: Primary key constraint on the[ID]column.[DF_PaymentHistory_ModifiedDate]: Default constraint to set[Modified_Date]to the current UTC date and time.[DF_PaymentHistory_CreatedDate]: Default constraint to set[Created_Date]to the current UTC date and time.[FK_PaymentHistory]: Foreign key constraint on the[Payment_ID]column referencing the[ID]column of the[JFW].[Payment] table.
Example Data
1
1
1
100.00
1
The payment was successful - Stripe ID: ch_1J3Q3X2eZvKYlo2C5
2
1
2
100.00
2
The payment was refunded - Stripe ID: ch_1B2C3D4eZvKYlo2C5
3
1
3
100.00
3
The payment was failed - Stripe ID: ch_1F2G3H4eZvKYlo2C5
Last updated