forked from forge/core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathposale.fsh
49 lines (49 loc) · 1.44 KB
/
posale.fsh
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
clear;
new-project;
set ACCEPT_DEFAULTS true;
scaffold setup --scaffoldType faces;
persistence setup --provider HIBERNATE --container JBOSS_AS7 ;
entity --named Customer --package ~.domain;
field string --named firstName;
field string --named lastName;
field temporal --type DATE --named birthDate;
entity --named Item;
field string --named name;
field number --named price --type java.lang.Double;
field int --named stock;
cd ..;
entity --named ProductOrder;
field manyToOne --named customer --fieldType ~.domain.Customer.java --inverseFieldName orders;
cd ../Customer.java;
entity --named Profile;
field string --named bio;
field string --named preferredName;
field string --named notes;
entity --named Address;
field string --named street;
field string --named city;
entity --named ZipCode;
field int --named code;
cd ../Address.java;
field manyToOne --named zip --fieldType ~.domain.ZipCode.java;
cd ..;
cd Customer.java;
field manyToMany --named addresses --fieldType ~.domain.Address.java;
cd ..;
cd Address.java;
cd ../Customer.java;
field oneToOne --named profile --fieldType ~.domain.Profile.java;
cd ..;
cd ProductOrder.java;
field manyToMany --named items --fieldType ~.domain.Item.java;
cd ..;
cd ProductOrder.java;
field manyToOne --named shippingAddress --fieldType ~.domain.Address.java;
cd ..;
scaffold from-entity ~.domain.* --scaffoldType faces --overwrite;
cd ~~;
rest setup;
rest endpoint-from-entity ~.domain.*;
build;
set ACCEPT_DEFAULTS true;
cd ~~;