diff --git a/lib/NGCP/Schema/Result/contract_balances.pm b/lib/NGCP/Schema/Result/contract_balances.pm index 248c7054..d040e264 100644 --- a/lib/NGCP/Schema/Result/contract_balances.pm +++ b/lib/NGCP/Schema/Result/contract_balances.pm @@ -29,16 +29,20 @@ __PACKAGE__->add_columns( }, "cash_balance", { data_type => "double precision", is_nullable => 1 }, + "initial_cash_balance", + { data_type => "double precision", is_nullable => 1 }, "cash_balance_interval", { data_type => "double precision", default_value => 0, is_nullable => 0 }, "free_time_balance", { data_type => "integer", is_nullable => 1 }, + "initial_free_time_balance", + { data_type => "integer", is_nullable => 1 }, "free_time_balance_interval", { data_type => "integer", default_value => 0, is_nullable => 0 }, "topup_count", - { data_type => "integer", default_value => 0, is_nullable => 0 }, + { data_type => "integer", default_value => 0, is_nullable => 0 }, "timely_topup_count", - { data_type => "integer", default_value => 0, is_nullable => 0 }, + { data_type => "integer", default_value => 0, is_nullable => 0 }, "start", { data_type => "datetime", @@ -63,13 +67,13 @@ __PACKAGE__->add_columns( data_type => "datetime", datetime_undef_if_invalid => 1, is_nullable => 1, - }, + }, "underrun_lock", { data_type => "datetime", datetime_undef_if_invalid => 1, is_nullable => 1, - }, + }, ); __PACKAGE__->set_primary_key("id"); diff --git a/lib/NGCP/Schema/Result/topup_logs.pm b/lib/NGCP/Schema/Result/topup_logs.pm index 2b3c634c..df8d4c08 100644 --- a/lib/NGCP/Schema/Result/topup_logs.pm +++ b/lib/NGCP/Schema/Result/topup_logs.pm @@ -20,16 +20,16 @@ __PACKAGE__->add_columns( { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "username", - { data_type => "varchar", is_nullable => 1, size => 127 }, + { data_type => "varchar", is_nullable => 1, size => 127 }, "timestamp", { data_type => "decimal", is_nullable => 0, size => [13, 3], inflate_datetime => 'epoch_milli' }, "type", { data_type => "enum", - extra => { list => ["cash", "voucher"] }, + extra => { list => ["cash", "voucher", "set_balance"] }, is_nullable => 0, - }, + }, "outcome", { data_type => "enum", @@ -101,9 +101,9 @@ __PACKAGE__->add_columns( }, "lock_level_before", - { data_type => "tinyint", extra => { unsigned => 1 }, is_nullable => 1 }, + { data_type => "tinyint", extra => { unsigned => 1 }, is_nullable => 1 }, "lock_level_after", - { data_type => "tinyint", extra => { unsigned => 1 }, is_nullable => 1 }, + { data_type => "tinyint", extra => { unsigned => 1 }, is_nullable => 1 }, "contract_balance_before_id", { @@ -118,7 +118,7 @@ __PACKAGE__->add_columns( extra => { unsigned => 1 }, is_foreign_key => 1, is_nullable => 1, - }, + }, "request_token", { data_type => "varchar", is_nullable => 1, size => 255 },