Skip to content

Commit

Permalink
✨ : link module's creation with a user
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubuisson committed Oct 16, 2019
1 parent 833f63b commit 9dddbcf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/io/codeka/gaia/modules/bo/TerraformModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public class TerraformModule {

private String estimatedMonthlyCostDescription;

@DBRef
private User createdBy;

public String getId() {
return id;
}
Expand Down Expand Up @@ -130,4 +133,12 @@ public String getEstimatedMonthlyCostDescription() {
public void setEstimatedMonthlyCostDescription(String estimatedMonthlyCostDescription) {
this.estimatedMonthlyCostDescription = estimatedMonthlyCostDescription;
}

public User getCreatedBy() {
return createdBy;
}

public void setCreatedBy(User createdBy) {
this.createdBy = createdBy;
}
}
3 changes: 3 additions & 0 deletions src/test/resources/db/20_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ gaia.terraformModule.insert([
"gitBranch": "master",
"cliVersion": "0.11.14",
"authorizedTeams": [{"$ref": "team", "$id": "Ze Team"}],
"createdBy": {"$ref": "user", "$id": "admin"},
"estimatedMonthlyCost": 0.99,
"estimatedMonthlyCostDescription": "Kamoulox",
"variables": [
Expand All @@ -36,6 +37,7 @@ gaia.terraformModule.insert([
"gitBranch": "master",
"cliVersion": "0.11.14",
"authorizedTeams": [{"$ref": "team", "$id": "Not Ze Team"}],
"createdBy": {"$ref": "user", "$id": "admin"},
"estimatedMonthlyCost": 9.99,
"estimatedMonthlyCostDescription": "Not Ze Team! Not Ze Team!",
"variables": []
Expand All @@ -49,6 +51,7 @@ gaia.terraformModule.insert([
"gitBranch": "master",
"cliVersion": "0.11.14",
"authorizedTeams": [{"$ref": "team", "$id": "Ze Team"}],
"createdBy": {"$ref": "user", "$id": "admin"},
"estimatedMonthlyCost": 0.99,
"estimatedMonthlyCostDescription": "Kamoulox",
"variables": [
Expand Down

0 comments on commit 9dddbcf

Please sign in to comment.