Examples¶
Student Management¶
app StudentManagement {
model {
enum Gender {MALE, FEMALE}
entity Person {
gender : Gender
firstname : string required
lastname : string required
city: string
email: string email
address : Address
}
entity Address {
city : string required
address : string required
country : string
}
entity Student extends Person {
studentId : number
photo : image
enrolmentDate : date
}
}
view {
@Root
@Alignment(Align.Horizontal)
master-detail Application {
entity Student
master StudentCollection
detail StudentComposite
}
collection StudentCollection {
entity Student
field name : firstname
field lastname : lastname
}
form AddressDetails {
entity Address
field city : city
field address : address
}
composite StudentPersonDetails {
entity Student
parts StudentDetails, PersonDetails
}
form StudentDetails {
entity Student
field StudentId : studentId
field Photo : photo
field Enrolment : enrolmentDate
}
form PersonDetails {
entity Person
field Gender : gender
field FirstName : firstname
field LastName : lastname
field Email : email
}
tab-composite StudentComposite {
entity Student
parts
StudentPersonDetails,
AddressDetails value address
}
}
}
All Widgets¶
app AllWidgets {
model {
enum Selection {
One, Two, Three
}
entity Example {
prop string : string
prop number : number
prop boolean : boolean
prop date : date
prop time : time
prop color : color
prop image : image
prop selection : Selection
}
}
view {
@Root
form Widgets {
entity Example
field textfield : string
field numberTextfield : number
field checkbox : boolean
field date : date
field time : time
field color: color
field image : image
field selection : selection
}
}
}