123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- -ifndef(NSM_ACCOUNTS).
- -define(NSM_ACCOUNTS, true).
- -type currency() :: kakaush | quota | game_point | money.
- -type game_event_type() :: round_start | round_end | game_start | game_end | tour_start.
- -type tournament_type() :: standalone | elimination | pointing | lucky.
- -type game_name() :: okey | tavla.
- -type game_mode() :: standard | evenodd | color | countdown | feellucky |
- esli | kakara.
- -type account_id() :: {string(), currency()}.
- -type transaction_id() :: string().
- -define(SYSTEM_ACCOUNT_ID, system).
- -record(account, {id :: account_id(),
- debet :: integer(),
- credit :: integer(),
- last_change :: integer()
-
-
- }).
- -define(ACC_ID(Account, Currency), {Account, Currency}).
- -record(pointing_rule,
- {
- id,
- game,
- game_type,
- rounds,
- kakush_winner,
- kakush_other,
-
- quota,
- game_points
-
- }).
- -record(ti_game_event,
- {
- id :: integer(),
- type :: game_event_type(),
- game_name :: game_name(),
- game_mode :: game_mode(),
- double_points :: integer(),
- tournament_type = standalone :: tournament_type()
- }).
- -record(ti_payment,
- {
- id :: integer()
- }).
- -record(ti_admin_change,
- {
- reason :: binary()
- }).
- -record(ti_default_assignment,
- {
- }).
- -type transaction_info() :: #ti_game_event{} | #ti_payment{} | #ti_admin_change{}|#ti_default_assignment{}.
- -record(user_transaction, {user,top}).
- -record(transaction,
- {
- id :: transaction_id(),
- commit_time :: erlang:now(),
- amount :: integer(),
- remitter :: account_id(),
- acceptor :: account_id(),
- currency :: currency(),
- info :: transaction_info(),
- next,
- prev
- }).
- -define(CURRENCY_KAKUSH, kakush).
- -define(CURRENCY_KAKUSH_CURRENCY, kakush_currency).
- -define(CURRENCY_MONEY, money).
- -define(CURRENCY_GAME_POINTS, game_point).
- -define(CURRENCY_QUOTA, quota).
- -endif.
|