-module(prequel@ast). -compile([no_auto_import, nowarn_unused_vars]). -export_type([module_/0, relationship/0, relationship_entity/0, entity/0, attribute/0, cardinality/0, type/0, key/0, hierarchy/0, totality/0, overlapping/0]). -type module_() :: {module, list(entity()), list(relationship())}. -type relationship() :: {relationship, prequel@span:span(), binary(), relationship_entity(), non_empty_list:non_empty_list(relationship_entity()), list(attribute())}. -type relationship_entity() :: {relationship_entity, prequel@span:span(), binary(), cardinality()}. -type entity() :: {entity, prequel@span:span(), binary(), list(key()), list(attribute()), list(relationship()), gleam@option:option(hierarchy())}. -type attribute() :: {attribute, prequel@span:span(), binary(), cardinality(), type()}. -type cardinality() :: {unbounded, prequel@span:span(), integer()} | {bounded, prequel@span:span(), integer(), integer()}. -type type() :: no_type | {composed_attribute, prequel@span:span(), list(attribute())}. -type key() :: {single_key, prequel@span:span(), binary(), gleam@option:option(type())} | {composed_key, prequel@span:span(), non_empty_list:non_empty_list(binary())}. -type hierarchy() :: {hierarchy, prequel@span:span(), overlapping(), totality(), non_empty_list:non_empty_list(entity())}. -type totality() :: total | partial. -type overlapping() :: overlapped | disjoint.