Skip to content

Commit

Permalink
delete enum warning in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelo Manganiello committed May 18, 2020
1 parent 2e54db1 commit 45932e5
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 93 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<a name="1.1.0"></a>
<a name="1.0.2"></a>
<a name="1.0.1"></a>
<a name="1.0.0"></a>
<a name="1.0.0-beta.3"></a>
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ yarn global upgrade generator-jhipster-nodejs

For the last, in the **test-integration/samples/FOLDER_NAME-jdl** there are some examples of jdl models.

> **Please attention that SQLite does not support Enum and Instant types**
## 🛠 Steps to develop a generator feature and test it

Shell steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,75 +4,69 @@
* Use "jhipster import-jdl model-name.jdl --blueprints nodejs" to generate the entity application
* Use jhipster 6.x (example 6.8.0)
* relationship info: https://www.jhipster.tech/managing-relationships/
* model of: https://github.com/jhipster/jdl-samples/blob/master/online-shop.jh
*/


// JDL definition entity for application
// JDL definition entity for online shop application

/*

enum Gender {
MALE,
FEMALE
enum CategoryStatus {
AVAILABLE, RESTRICTED, DISABLED
}

enum UserType {
STUDENT,
TEACHER
entity Category {
description String required,
sortOrder Integer,
dateAdded LocalDate,
dateModified LocalDate,
status CategoryStatus
}
*/

entity DemetraUser {
gender String required,
address String required,
borndate LocalDate required,
cf String required unique,
usertype String required,
profileimage ImageBlob
entity Product {
title String required,
keywords String,
description String,
rating Integer,
dateAdded LocalDate,
dateModified LocalDate
}

entity SingleCourse {
title String required unique,
description String,
isnotonlyfordegree Boolean required,
cfu Integer,
courseimage Blob,
amount BigDecimal
entity Customer {
firstName String,
lastName String,
email String,
telephone String
}

entity Activity {
name UUID unique,
description String,
mynumber Double,
creationtime ZonedDateTime
entity Address {
address1 String,
address2 String,
city String,
postcode String required maxlength(10),
country String required maxlength(2)
}

entity WishList {
title String required,
restricted Boolean
}

relationship OneToOne {
Activity to SingleCourse
relationship OneToMany {
Customer{wishList(title)} to WishList{customer},
WishList{product(title)} to Product{wishList},
Customer{address} to Address{customer}
}

relationship ManyToOne {
Activity {demetrauser} to DemetraUser
Category{parent} to Category
}

relationship ManyToMany {

DemetraUser {
coursetitle(title)
}
to SingleCourse {
cfstudent(cf)
},
Category{product(title)} to Product{category}
}

relationship OneToMany {

DemetraUser {
singlecourseteacher
}
to SingleCourse {
cfteacher(cf)required
}
paginate Customer, Product, Category with pagination
paginate Address with pagination
paginate Product with infinite-scroll

}
service Category with serviceClass
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Use "jhipster import-jdl model-name.jdl --blueprints nodejs" to generate the entire application
* Use jhipster 6.x (example 6.8.0)
* relationship info: https://www.jhipster.tech/managing-relationships/
* model of: https://github.com/jhipster/jdl-samples/blob/master/online-shop.jh
*/

application {
Expand All @@ -28,65 +27,71 @@ application {
entities *
}

// JDL definition entity for online shop application
// JDL definition entity for application

enum CategoryStatus {
AVAILABLE, RESTRICTED, DISABLED
enum Gender {
MALE,
FEMALE
}

entity Category {
description String required,
sortOrder Integer,
dateAdded LocalDate,
dateModified LocalDate,
status CategoryStatus
enum UserType {
STUDENT,
TEACHER
}

entity Product {
title String required,
keywords String,
description String,
rating Integer,
dateAdded LocalDate,
dateModified LocalDate
}

entity Customer {
firstName String,
lastName String,
email String,
telephone String
entity DemetraUser {
gender Gender required,
address String required,
borndate LocalDate required,
cf String required unique,
usertype UserType required,
profileimage ImageBlob
}

entity Address {
address1 String,
address2 String,
city String,
postcode String required maxlength(10),
country String required maxlength(2)
entity SingleCourse {
title String required unique,
description String,
isnotonlyfordegree Boolean required,
cfu Integer,
courseimage Blob,
amount BigDecimal
}

entity WishList {
title String required,
restricted Boolean
entity Activity {
name UUID unique,
description String,
mynumber Double,
creationtime ZonedDateTime

}

relationship OneToMany {
Customer{wishList(title)} to WishList{customer},
WishList{product(title)} to Product{wishList},
Customer{address} to Address{customer}
relationship OneToOne {
Activity to SingleCourse
}

relationship ManyToOne {
Category{parent} to Category
Activity {demetrauser} to DemetraUser
}


relationship ManyToMany {
Category{product(title)} to Product{category}

DemetraUser {
coursetitle(title)
}
to SingleCourse {
cfstudent(cf)
},
}

paginate Customer, Product, Category with pagination
paginate Address with pagination
paginate Product with infinite-scroll
relationship OneToMany {

service Category with serviceClass
DemetraUser {
singlecourseteacher
}
to SingleCourse {
cfteacher(cf)required
}

}
2 changes: 1 addition & 1 deletion test/entity.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('Subgenerator entity of nodejs JHipster blueprint', () => {
assert.fileContent(greatEntityPath, 'name: string;');

// Gender enum field
assert.fileContent(greatEntityPath, "@Column({ type: 'enum', name: 'gender', enum: Gender })");
assert.fileContent(greatEntityPath, "@Column({ type: 'simple-enum', name: 'gender', enum: Gender })");
assert.fileContent(greatEntityPath, 'gender: Gender;');

// address String required field
Expand Down

0 comments on commit 45932e5

Please sign in to comment.