Skip to content

Commit

Permalink
Merge pull request #60 from guma2k2/cart-feature
Browse files Browse the repository at this point in the history
authorize app by role
  • Loading branch information
guma2k2 authored Sep 9, 2024
2 parents b5966b7 + 5c9bebe commit d037c7d
Showing 1 changed file with 4 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
package com.backend.elearning.domain.course;

import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Arrays;
@EqualsAndHashCode
@ToString
public record CoursePostVM(
Long id,

String title,

String headline,

@EqualsAndHashCode.Include String[] objectives,
String[] objectives,

@EqualsAndHashCode.Include String[] requirements,
String[] requirements,

@EqualsAndHashCode.Include String[] targetAudiences,
String[] targetAudiences,

String description,
String level,
Expand All @@ -27,28 +22,5 @@ public record CoursePostVM(
Integer topicId

) {
@EqualsAndHashCode.Include
private boolean arraysEqual(String[] array1, String[] array2) {
return Arrays.equals(array1, array2);
}

@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (!(obj instanceof CoursePostVM other)) return false;

return id.equals(other.id) &&
title.equals(other.title) &&
headline.equals(other.headline) &&
arraysEqual(objectives, other.objectives) &&
arraysEqual(requirements, other.requirements) &&
arraysEqual(targetAudiences, other.targetAudiences) &&
description.equals(other.description) &&
level.equals(other.level) &&
price.equals(other.price) &&
image.equals(other.image) &&
free == other.free &&
categoryId.equals(other.categoryId) &&
topicId.equals(other.topicId);
}

}

0 comments on commit d037c7d

Please sign in to comment.