parent
d7485f796f
commit
3cbc6d31f8
@ -0,0 +1,26 @@ |
||||
package org.example.models; |
||||
|
||||
|
||||
import lombok.*; |
||||
import lombok.experimental.FieldDefaults; |
||||
import org.neo4j.ogm.annotation.EndNode; |
||||
import org.neo4j.ogm.annotation.RelationshipEntity; |
||||
import org.neo4j.ogm.annotation.StartNode; |
||||
|
||||
@Data |
||||
@Builder |
||||
@AllArgsConstructor |
||||
@NoArgsConstructor |
||||
@FieldDefaults(level = AccessLevel.PRIVATE) |
||||
@RelationshipEntity(type = "LIKE") |
||||
public class Like { |
||||
Long userId; |
||||
Long postId; |
||||
String status; |
||||
|
||||
@StartNode |
||||
private User user; |
||||
|
||||
@EndNode |
||||
private Post post; |
||||
} |
@ -0,0 +1,18 @@ |
||||
package org.example.objects; |
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude; |
||||
import lombok.*; |
||||
import lombok.experimental.FieldDefaults; |
||||
|
||||
@Data |
||||
@AllArgsConstructor |
||||
@NoArgsConstructor |
||||
@Builder |
||||
@FieldDefaults(level = AccessLevel.PRIVATE) |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public class ApiResponse<T>{ |
||||
int code = 1000; |
||||
String message; |
||||
T result; |
||||
} |
@ -0,0 +1,15 @@ |
||||
package org.example.requests; |
||||
|
||||
|
||||
import lombok.*; |
||||
import lombok.experimental.FieldDefaults; |
||||
|
||||
@Data |
||||
@Builder |
||||
@AllArgsConstructor |
||||
@NoArgsConstructor |
||||
@FieldDefaults(level = AccessLevel.PRIVATE) |
||||
public class CreateLikeRequest { |
||||
Long userId; |
||||
Long postId; |
||||
} |
Loading…
Reference in new issue