Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
haiphucnguyen committed Oct 20, 2024
1 parent fadbf7d commit 33cd949
Show file tree
Hide file tree
Showing 34 changed files with 998 additions and 20 deletions.
14 changes: 12 additions & 2 deletions server/src/main/java/io/flexwork/modules/crm/domain/Account.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
package io.flexwork.modules.crm.domain;

import io.flexwork.modules.usermanagement.domain.User;
import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
17 changes: 15 additions & 2 deletions server/src/main/java/io/flexwork/modules/crm/domain/Activity.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
package io.flexwork.modules.crm.domain;

import io.flexwork.modules.usermanagement.domain.User;
import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.Lob;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
import jakarta.persistence.NamedNativeQuery;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
14 changes: 12 additions & 2 deletions server/src/main/java/io/flexwork/modules/crm/domain/Call.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
package io.flexwork.modules.crm.domain;

import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
16 changes: 14 additions & 2 deletions server/src/main/java/io/flexwork/modules/crm/domain/Case.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
package io.flexwork.modules.crm.domain;

import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
16 changes: 14 additions & 2 deletions server/src/main/java/io/flexwork/modules/crm/domain/Comment.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
package io.flexwork.modules.crm.domain;

import io.flexwork.modules.usermanagement.domain.User;
import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
14 changes: 12 additions & 2 deletions server/src/main/java/io/flexwork/modules/crm/domain/Contact.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
package io.flexwork.modules.crm.domain;

import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
13 changes: 11 additions & 2 deletions server/src/main/java/io/flexwork/modules/crm/domain/Email.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
package io.flexwork.modules.crm.domain;

import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Lob;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
13 changes: 11 additions & 2 deletions server/src/main/java/io/flexwork/modules/crm/domain/Meeting.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
package io.flexwork.modules.crm.domain;

import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Lob;
import jakarta.persistence.Table;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
15 changes: 13 additions & 2 deletions server/src/main/java/io/flexwork/modules/crm/domain/Task.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
package io.flexwork.modules.crm.domain;

import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Lob;
import jakarta.persistence.Table;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
import jakarta.persistence.Index;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package io.flexwork.modules.teams.domain;

import io.flexwork.modules.usermanagement.domain.User;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "fw_requests")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TeamRequest {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@ManyToOne
@JoinColumn(name = "workflow_id", nullable = false)
private Workflow workflow;

@ManyToOne
@JoinColumn(name = "current_status_id", nullable = false)
private WorkflowStatus currentStatus;

@ManyToOne
@JoinColumn(name = "created_by", nullable = false)
private User createdBy;

private LocalDateTime createdAt;

@ManyToOne
@JoinColumn(name = "updated_by")
private User updatedBy;

private LocalDateTime updatedAt;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package io.flexwork.modules.teams.domain;

import io.flexwork.modules.usermanagement.domain.User;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "fw_team_request_status")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TeamRequestStatus {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@ManyToOne
@JoinColumn(name = "request_id", nullable = false)
private TeamRequest request;

@ManyToOne
@JoinColumn(name = "status_id", nullable = false)
private WorkflowStatus status;

private LocalDateTime updatedAt;

@ManyToOne
@JoinColumn(name = "updated_by", nullable = false)
private User updatedBy;

private String comments;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package io.flexwork.modules.teams.domain;

import io.flexwork.modules.usermanagement.domain.User;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "fw_workflow")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Workflow {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String name;

private String description;

@ManyToOne
@JoinColumn(name = "created_by", nullable = false)
private User createdBy;

private LocalDateTime createdAt;

@ManyToOne
@JoinColumn(name = "updated_by")
private User updatedBy;

private LocalDateTime updatedAt;

// Getters and Setters
}
Loading

0 comments on commit 33cd949

Please sign in to comment.