-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathService.java
More file actions
97 lines (71 loc) · 2.12 KB
/
Service.java
File metadata and controls
97 lines (71 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package org.eclipse.opensmartclide.dbapi.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.TextIndexed;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.DocumentReference;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Document(collection = "services")
@Data
public class Service {
@Id
private String id;
@NotNull
@TextIndexed
private String name;
@NotNull
private String user_id;
//@DBRef(lazy = true)
//private User user;
//@NotNull
private String registry_id;
private String workspace_id;
//@DocumentReference
//private ServiceRegistry serviceRegistry;
private String git_credentials_id;
//@DocumentReference
//private GitCredentials gitCredentials;
private String url;
//@NotNull
@TextIndexed
private String description;
@NotNull
@Field(value = "is_public")
@JsonProperty(value = "is_public")
private Boolean isPublic;
private String licence;
@Field
private String framework = "None";
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
@CreatedDate
private Date created;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private Date updated;
//@CreatedDate
//@Field("test_date")
//@JsonProperty("test_date")
//private Date testDate;
@NotNull
private Boolean deployable;
@Field
private List<String> keywords = new ArrayList<>();
//@NotNull
//private String source;
@Field
private int stars = 0;
@Field
private int forks = 0;
@Field
private int watchers = 0;
}