@startuml usersystem_repo

!include postgres/postgres.puml

package Repo {
    interface UserSystemRepository{
        GetSystemUsers(ctx context.Context, system_code string) ([]UserSystemAggregate, error)
        AddUserToSystem(ctx context.Context, system_code string, user domain.Models.User) error
        RemoceUserFromSystem(ctx context.Context, system_code string, user domain.Models.User) error
    }

    struct UserSystemAggregate {
        System domain.Models.System
        Users []domain.Models.User
    }

    UserSystemRepository o-- UserSystemAggregate

    class UserSystemPostgresRepo

    UserSystemRepository <|-- UserSystemPostgresRepo
    PostgresRepo <|-- UserSystemPostgresRepo
}

@enduml