/*
 * Licensed to Jasig under one or more contributor license
 * agreements. See the NOTICE file distributed with this work
 * for additional information regarding copyright ownership.
 * Jasig licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License.  You may obtain a
 * copy of the License at the following location:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package io.cos.cas.adaptors.postgres.models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * The Open Science Framework API Oauth2 Scope.
 *
 * @author Michael Haselton
 * @author Longze Chen
 * @since 4.1.0
 */
@Entity
@Table(name = "osf_apioauth2scope")
public class OpenScienceFrameworkApiOauth2Scope {

    @Id
    @Column(name = "id", nullable = false)
    private Integer id;

    @Column(name = "name", nullable = false)
    private String name;

    @Column(name = "description", nullable = false)
    private String description;

    @Column(name = "is_active", nullable = false)
    private Boolean isActive;

    /** Default Constructor. */
    public OpenScienceFrameworkApiOauth2Scope() {}


    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public Boolean isActive() {
        return isActive;
    }

    @Override
    public String toString() {
        return String.format("OpenScienceFrameworkScope [id=%s, name=%s]", id, name);
    }
}

@@ -1085,17 +1085,17 @@
 nce 4.1.
-0
+5
 %0A */%0A@En
@@ -1262,16 +1262,89 @@
 er id;%0A%0A
+    @Column(name = %22_id%22, nullable = false)%0A    private String scopeId;%0A%0A
     @Col
@@ -1568,24 +1568,105 @@
  isActive;%0A%0A
+    @Column(name = %22is_public%22, nullable = false)%0A    private Boolean isPublic;%0A%0A
     /** Defa
@@ -1785,32 +1785,96 @@
 turn id;%0A    %7D%0A%0A
+    public String getScopeId() %7B%0A        return scopeId;%0A    %7D%0A%0A
     public Strin
@@ -2015,24 +2015,24 @@
 sActive() %7B%0A
-
         retu
@@ -2047,24 +2047,88 @@
 ive;%0A    %7D%0A%0A
+    public Boolean isPublic() %7B%0A        return isPublic;%0A    %7D%0A%0A
     @Overrid

Update the scope model: add scopeId and isPublic