<commit_before>unit UCoreObjects;

{ Copyright (c) 2018 by PascalCoin Project

  Contains common types for Core module.

  Distributed under the MIT software license, see the accompanying file LICENSE
  or visit http://www.opensource.org/licenses/mit-license.php.

  Acknowledgements:
    <NAME> <<EMAIL>>: unit creator
}

{$mode delphi}

interface

uses
  Classes, SysUtils, UCrypto, UAccounts, UBlockChain, UCommon,
  Generics.Collections, Generics.Defaults;

type

  { TKeySummary }

  TKeySummary = record
    Key : TAccountKey;
    TotalPASC : UInt64;
    TotalPASA : Cardinal;
    Accounts : TArray<TAccount>;  // TODO: change to PAccount later (optimized)
  end;

  { TUserSummary }

  TUserSummary = record
    Keys : TArray<TAccountKey>;
    Accounts : TArray<TAccount>;
    TotalPASC : UInt64;
    TotalPASA : Cardinal;
    Items : TArray<TKeySummary>;
  end;
  PUserSummary = ^TUserSummary;


const
  CT_KeySummary_Nil : TKeySummary = (
    Key : (EC_OpenSSL_NID:0;x:'';y:'');
    TotalPASC : 0;
    TotalPASA : 0;
    Accounts : nil;
  );

  CT_UserSummary_Nil : TUserSummary = (
    Keys : nil;
    Accounts : nil;
    TotalPASC : 0;
    TotalPASA : 0;
    Items : nil;
  );

implementation
end.
<commit_msg>Models: simplify balance summary<commit_after>unit UCoreObjects;

{ Copyright (c) 2018 by PascalCoin Project

  Contains common types for Core module.

  Distributed under the MIT software license, see the accompanying file LICENSE
  or visit http://www.opensource.org/licenses/mit-license.php.

  Acknowledgements:
    <NAME> <<EMAIL>>: unit creator
}

{$mode delphi}

interface

uses
  Classes, SysUtils, UCrypto, UAccounts, UBlockChain, UCommon,
  Generics.Collections, Generics.Defaults;

type

  { TBalanceSummary }

  TBalanceSummary = record
    TotalPASC : UInt64;
    TotalPASA : Cardinal;
  end;


const
  CT_BalanceSummary_Nil : TBalanceSummary = (
    TotalPASC : 0;
    TotalPASA : 0;
  );

implementation
end.

{'fraction_non_alphanumeric': 0.09408740359897172, 'fraction_numerical': 0.010796915167095116, 'mean_word_length': 3.51508120649652, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1187329', 'n_tokens_mistral': 699, 'n_tokens_neox': 648, 'n_words': 171}