// Copyright IBM Corp. 2020, 2026
// SPDX-License-Identifier: BUSL-1.1

syntax = "proto3";

package controller.storage.auth.store.v1;

option go_package = "github.com/hashicorp/boundary/internal/auth/store;store";

// Account is a "shared table" between the iam, authtoken, and auth
// subsystems. The auth system is responsible for creating entries.  The iam
// system is only responsible/allowed to update the iam_user_id.  The authtoken
// system is a reader of this data.
message Account {
  // auth_account_id is primary key for the user account
  // @inject_tag: gorm:"primary_key"
  string public_id = 1;

  // auth_method_id is the auth method associated with this user account.
  // @inject_tag: `gorm:"default:null"`
  string auth_method_id = 2;

  // scope_id for the user account
  // @inject_tag: `gorm:"default:null"`
  string scope_id = 4;

  // user_id is the iam.user associated with this account
  // @inject_tag: `gorm:"default:null"`
  string iam_user_id = 5;
}
