162 lines
5.8 KiB
JSON
162 lines
5.8 KiB
JSON
{
|
|
"1": {
|
|
"method": "createTable",
|
|
"params": [
|
|
{
|
|
"name": "nexus_billing_agreements",
|
|
"columns": {
|
|
"ba_id": {
|
|
"name": "ba_id",
|
|
"type": "BIGINT",
|
|
"length": 20,
|
|
"decimals": null,
|
|
"values": null,
|
|
"allow_null": false,
|
|
"default": null,
|
|
"comment": "ID Number",
|
|
"unsigned": true,
|
|
"zerofill": false,
|
|
"auto_increment": true,
|
|
"binary": false
|
|
},
|
|
"ba_gw_id": {
|
|
"name": "ba_gw_id",
|
|
"type": "VARCHAR",
|
|
"length": 255,
|
|
"decimals": null,
|
|
"values": null,
|
|
"allow_null": true,
|
|
"default": null,
|
|
"comment": "The ID assigned by the gateway",
|
|
"unsigned": false,
|
|
"zerofill": false,
|
|
"auto_increment": false,
|
|
"binary": false
|
|
},
|
|
"ba_method": {
|
|
"name": "ba_method",
|
|
"type": "INT",
|
|
"length": 5,
|
|
"decimals": null,
|
|
"values": null,
|
|
"allow_null": false,
|
|
"default": null,
|
|
"comment": "Payment method ID",
|
|
"unsigned": true,
|
|
"zerofill": false,
|
|
"auto_increment": false,
|
|
"binary": false
|
|
},
|
|
"ba_member": {
|
|
"name": "ba_member",
|
|
"type": "MEDIUMINT",
|
|
"length": 8,
|
|
"decimals": null,
|
|
"values": null,
|
|
"allow_null": true,
|
|
"default": null,
|
|
"comment": "Customer ID",
|
|
"unsigned": true,
|
|
"zerofill": false,
|
|
"auto_increment": false,
|
|
"binary": false
|
|
},
|
|
"ba_started": {
|
|
"name": "ba_started",
|
|
"type": "INT",
|
|
"length": 10,
|
|
"decimals": null,
|
|
"values": null,
|
|
"allow_null": false,
|
|
"default": null,
|
|
"comment": "Unix timestamp of when billing agreement was created",
|
|
"unsigned": false,
|
|
"zerofill": false,
|
|
"auto_increment": false,
|
|
"binary": false
|
|
},
|
|
"ba_next_cycle": {
|
|
"name": "ba_next_cycle",
|
|
"type": "INT",
|
|
"length": 10,
|
|
"decimals": null,
|
|
"values": null,
|
|
"allow_null": true,
|
|
"default": null,
|
|
"comment": "Timestamp of when the next payment will be made or NULL if there was an error last time",
|
|
"unsigned": false,
|
|
"zerofill": false,
|
|
"auto_increment": false,
|
|
"binary": false
|
|
},
|
|
"ba_canceled": {
|
|
"name": "ba_canceled",
|
|
"type": "TINYINT",
|
|
"length": 1,
|
|
"decimals": null,
|
|
"values": null,
|
|
"allow_null": false,
|
|
"default": "0",
|
|
"comment": "If the agreement has been canceled",
|
|
"unsigned": true,
|
|
"zerofill": false,
|
|
"auto_increment": false,
|
|
"binary": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"PRIMARY": {
|
|
"type": "primary",
|
|
"name": "PRIMARY",
|
|
"columns": [
|
|
"ba_id"
|
|
],
|
|
"length": [
|
|
null
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"2": {
|
|
"method": "addColumn",
|
|
"params": [
|
|
"nexus_transactions",
|
|
{
|
|
"name": "t_billing_agreement",
|
|
"type": "BIGINT",
|
|
"length": 20,
|
|
"decimals": null,
|
|
"values": null,
|
|
"allow_null": true,
|
|
"default": null,
|
|
"comment": "If the transaction is part of a billing agreement, its ID",
|
|
"unsigned": true,
|
|
"zerofill": false,
|
|
"auto_increment": false,
|
|
"binary": false
|
|
}
|
|
]
|
|
},
|
|
"3": {
|
|
"method": "addColumn",
|
|
"params": [
|
|
"nexus_purchases",
|
|
{
|
|
"name": "ps_billing_agreement",
|
|
"type": "BIGINT",
|
|
"length": 20,
|
|
"decimals": null,
|
|
"values": null,
|
|
"allow_null": true,
|
|
"default": null,
|
|
"comment": "If paid by a billing agreement, its ID",
|
|
"unsigned": true,
|
|
"zerofill": false,
|
|
"auto_increment": false,
|
|
"binary": false
|
|
}
|
|
]
|
|
}
|
|
} |