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

syntax = "proto3";

package controller.storage.iam.store.v1;

import "controller/storage/timestamp/v1/timestamp.proto";

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

message RoleGrant {
  // create_time from the RDBMS
  // @inject_tag: `gorm:"default:current_timestamp"`
  timestamp.v1.Timestamp create_time = 1;

  // role_id is the ID of the role this is a part of
  // @inject_tag: `gorm:"primary_key"`
  string role_id = 2;

  // raw_grant is the string grant value as provided by the user
  // @inject_tag: `gorm:"default:null"`
  string raw_grant = 3;

  // canonical_grant is the canonical string representation of the grant value.
  // We use this as the unique constraint.
  // @inject_tag: `gorm:"primary_key"`
  string canonical_grant = 4;
}
