diff --git a/src/main/kotlin/dev/fyloz/trial/colorrecipesexplorer/model/AccountModel.kt b/src/main/kotlin/dev/fyloz/trial/colorrecipesexplorer/model/AccountModel.kt index d00cd6b..9d47a49 100644 --- a/src/main/kotlin/dev/fyloz/trial/colorrecipesexplorer/model/AccountModel.kt +++ b/src/main/kotlin/dev/fyloz/trial/colorrecipesexplorer/model/AccountModel.kt @@ -56,7 +56,7 @@ data class Employee( @CollectionTable(name = "employee_permission", joinColumns = [JoinColumn(name = "employee_id")]) @Column(name = "permission") @Fetch(FetchMode.SUBSELECT) - @get:JsonIgnore + @get:JsonProperty("explicitPermissions") val permissions: MutableSet = mutableSetOf(), @Column(name = "last_login_time") @@ -147,7 +147,7 @@ data class EmployeeGroup( val employees: MutableSet = mutableSetOf() ) : NamedModel { @JsonProperty("employeeCount") - fun getEmployeeCount() = employees.size + fun getEmployeeCount() = employees.size - 1 // Remove the default employee override fun equals(other: Any?): Boolean = other is EmployeeGroup && id == other.id && name == other.name override fun hashCode(): Int = Objects.hash(id, name)