8 – Foreign key between tables of the same module

I'm trying to figure out how to create relationships between tables created in the same modules. I create my entity with the console and declare several tables.
How can I declare shared keys in the baseFieldDefinitions of my entity and tables declared in my address_schema ()?

My way (is it the right method):

my_module / address.install> address_schema ()




 my_module / address.install> address_schema ()

    'foreign keys' => (
      'lin_id' => (
        'table' => 'coo_address',
        'columns' => (
          'lin_id' => 'lin_id',
        )
      )
    )

my_module / entity> baseFieldDefinitions

$ fields ('lin_id') = BaseFieldDefinition :: create ('integer')
      -> setLabel (t ( 'Address'))
      -> setDescription (t ('Une ligne pour l'adresse de réference.'))
      -> setSetting ('unsigned', TRUE)
      -> setDisplayOptions ('view', array (
        'label' => 'hidden',
        'weight' => 2,
      ))
      -> setDisplayOptions ('form', array (
        'type' => 'number',
        'weight' => 2,
      ))
      -> setDisplayConfigurable ('form', TRUE)
      -> setDisplayConfigurable ('view', TRUE);