package models

import (
	"github.com/google/uuid"
	"github.com/uptrace/bun"
)

type UserToRole struct {
	bun.BaseModel `bun:"table:users_to_roles"`

	UserID uuid.UUID `bun:"user_id,type:uuid,pk"`
	RoleID uuid.UUID `bun:"type:uuid,pk"`

	User *User `bun:"rel:belongs-to,join:user_id=user_id"`
	Role *Role `bun:"rel:belongs-to,join:role_id=id"`
}
