constructor(modelName, opts) {
    /**
      The modelName of the associated model.

      For example, given this configuration
      
      ```js
      createServer({
        models: {
          user: Model,
          comment: Model.extend({
            user: belongsTo()
          })
        }
      })
      ```

      the association's `modelName` would be `user`.

      Note that an association's `modelName` and the `name` can be different. This is because Mirage supports multiple relationships of the same type:

      ```js
      createServer({
        models: {
          user: Model,
          comment: Model.extend({
            author: belongsTo('user'),
            reviewer: belongsTo('user')
          })
        }
      })
      ```

      For both these relationships, the `modelName` is `user`, but the first association has a `name` of `author` while the second has a `name` of `reviewer`.

      @property
      @type {String}
      @public
    */
    this.modelName = undefined; // hack to add ESDOC info. Any better way?

    if (typeof modelName === "object") {
      // Received opts only
      this.modelName = undefined;
      this.opts = modelName;
    } else {
      // The modelName of the association. (Might not be passed in - set later
      // by schema).
      this.modelName = modelName ? dasherize(modelName) : "";
      this.opts = opts || {};
    }

    /**
      The name of the association, which comes from the property name that was used to define it.

      For example, given this server definition
      
      ```js
      createServer({
        models: {
          user: Model,
          comment: Model.extend({
            author: belongsTo('user')
          })
        }
      })
      ```

      the association's `name` would be `author`.
      
      The name is used by Mirage to define foreign keys on the model (`comment.authorId` in this case), among other things.

      @property
      @type {String}
      @public
    */
    this.name = "";

    // The modelName that owns this association
    this.ownerModelName = "";
  }
Associations represent relationships between your Models.

  The `hasMany` and `belongsTo` helpers are how you actually define relationships:
  
  ```js
  import { createServer, Model, hasMany, belongsTo }

  createServer({
    models: {
      user: Model.extend({
        comments: hasMany()
      }),
      comments: Model.extend({
        user: belongsTo()
      })
    }
  })
  ```

  View [the Relationships](https://miragejs.com/docs/main-concepts/relationships/) guide to learn more about setting up relationships.

  Each usage of the helper registers an Association (either a `HasMany` association or `BelongsTo` association) with your server's `Schema`. You can access these associations using either the `schema.associationsFor()` method, or the `associations` property on individual model instances.

  You can then introspect the associations to do things like dynamically build up your JSON response in your serializers.

  @class Association
  @constructor
  @public