library:
  label: Library
  table: library
  childrenLabelFields:
      book: title
  filter: [isOpenOnSundays, libraryBook]
  deleteCascade: true
  pageSize: 10
  initialSortField: name
  initialSortAscending: false
  fields:
    name:
      type: text
      label: Name
      required: true
      unique: true
    type:
      type: set
      label: Type
      items: [small,medium,large]
    opening:
      type: datetime
      label: Opening
    isOpenOnSundays:
      type: boolean
      label: 'Is open on sundays'
    planet:
      type: fixed
      value: Earth
      label: 'Planet of this library'
    libraryBook:
      type: many
      label: Books
      many:
        entity: book
        nameField: title
        thisField: library
        thatField: book

book:
  label: Book
  label_de: Bücher
  table: book
  listFields: [author, title, library]
  filter: [author, title, library]
  fields:
    title:
      type: text
      label: Title
      label_de: Titel
      required: true
    author:
      type: text
      label: Author
      description: The Author of the Book
      required: true
    pages:
      type: integer
      label: Pages
      required: true
    release:
      type: date
      label: Release
    library:
      type: reference
      label: Library
      reference:
        nameField: name
        entity: library
      required: true
    secondLibrary:
      type: reference
      label: Second Library
      reference:
        entity: library
    cover:
      type: file
      path: 'tests/uploads'
      label: 'Cover Image'
      required: true
    price:
      type: float
      label: Price
      floatStep: 0.1
