<commit_before>-module(rpgb_zone, [Id, Name :: binary(), BattlemapId :: atom(),
	Layer :: binary(), Url :: binary(), ZIndex :: integer(),
	Rotation :: binary(),
	StrokeOpactiy :: float(), StrokeColor :: binary(),
	Color :: binary(), Gappy :: boolean(), Path :: binary(),
	CreatedTime :: timestamp(), UpdatedTime :: timestamp()]).
-belongs_to(battlemap).
-compile([export_all]).

before_create() ->
	Now = erlang:now(),
	{ok, THIS:set([{created_time, Now}, {updated_time, Now}])}.

before_update() ->
	{ok, THIS:set([{updated_time, erlang:now()}])}.

json_enc_exclude() ->
	[battle].

json_dec_exclude() ->
	[created_time, updated_time, id].

json_prop_names() -><commit_msg>Fixed type and a typo.<commit_after>-module(rpgb_zone, [Id, Name :: binary(), BattlemapId :: atom(),
	Layer :: binary(), Url :: binary(), ZIndex :: integer(),
	Rotation :: binary(),
	StrokeOpacity :: float(), StrokeColor :: binary(),
	Color :: binary(), Gappy :: boolean(), Path,
	CreatedTime :: timestamp(), UpdatedTime :: timestamp()]).
-belongs_to(battlemap).
-compile([export_all]).

before_create() ->
	Now = erlang:now(),
	FixedPath = case THIS:path() of
		undefined ->
			<<>>;
		Path ->
			iolist_to_binary(mochijson2:encode(Path))
	end,
	{ok, THIS:set([{path, FixedPath}, {created_time, Now}, {updated_time, Now}])}.

before_update() ->
	FixedPath = case THIS:path() of
		undefined ->
			<<>>;
		Path ->
			iolist_to_binary(mochijson2:encode(Path))
	end,
	{ok, THIS:set([{path, FixedPath}, {updated_time, erlang:now()}])}.

json_enc_exclude() ->
	[battle].

json_dec_exclude() ->
	[created_time, updated_time, id].

json_prop_names() ->
{'fraction_non_alphanumeric': 0.21062384187770228, 'fraction_numerical': 0.0012353304508956147, 'mean_word_length': 5.377952755905512, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5355027', 'n_tokens_mistral': 589, 'n_tokens_neox': 568, 'n_words': 121}