Skip to content

Commit

Permalink
Last update of landing
Browse files Browse the repository at this point in the history
  • Loading branch information
alban-okoby committed Feb 19, 2024
1 parent 7da186a commit 9254ec4
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.digitalsouag.conventer;

import org.springframework.stereotype.Component;

@Component
public class GRepositoryConventer {
private final
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.digitalsouag.dto;

import com.digitalsouag.model.User;
import lombok.Data;


@Data
public class GRepositoryDTO {
private Long id;
private String repositoryName;
private String repositoryDescription;
private boolean visibility;
private User user;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
import com.digitalsouag.util.GeneralUtils;

public class LocalUser extends User implements OAuth2User, OidcUser {

/**
*
*/
private static final long serialVersionUID = -2845160792248762779L;
private final OidcIdToken idToken;
private final OidcUserInfo userInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
@Setter
@MappedSuperclass
public abstract class AbstractToken implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;

private static final int EXPIRATION = 60 * 24;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.digitalsouag.model;

import lombok.Data;

import javax.persistence.*;

@Entity
@Data
@Table(name = "REPOSITORY")
public class GRepository {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "repo_id")
private Long id;
private String repositoryName;
private String repositoryDescription;
private boolean visibility;

@ManyToOne()
@JoinColumn(nullable = false, name = "user_id")
private User user;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@
import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonIgnore;

Expand All @@ -30,10 +21,6 @@
@Getter
@Setter
public class User implements Serializable {

/**
*
*/
private static final long serialVersionUID = 65981149772133526L;

@Id
Expand Down Expand Up @@ -73,4 +60,7 @@ public class User implements Serializable {
@ManyToMany
@JoinTable(name = "user_role", joinColumns = {@JoinColumn(name = "USER_ID")}, inverseJoinColumns = {@JoinColumn(name = "ROLE_ID")})
private Set<Role> roles;

@OneToMany(mappedBy = "user_id")
private Set<GRepository> repositories;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NotEmpty=This field is required.
Size.userDto.password=Try one with at least 6 characters.
message.mail.verification=Thank you for creating an account. Please click the link below to activate your account. This link will expire in 24 hours.
message.mail.verification=Thank you for creating an account. Please click the link below to activate your account. This link will expire in 24 hours.

0 comments on commit 9254ec4

Please sign in to comment.