#  -----------------------------------
# test schema
#  -----------------------------------
# all fields types and combination





#  --------------------------------------------
# schema test
#  --------------------------------------------

- classname: _schema
  keyname: test
  displayname: "Test Schema"
  is_enabled: yes
  order: 910
  page: Test        
  
  _options:
      icon: fa-diamond
      keyname_mode: edit
      #keyname_mode: auto
      keyname_label: KeynameCustom
      displayname_label: DisplayNameCustom
      "strange$€": "verystrange$€é''\""
      p_admin: p_test_admin
      p_create: p_test_create
      p_read: p_test_read
      p_update: p_test_update
      p_delete: p_test_delete
  

  # FIELDS
  # -------
  
  # -- string

  mystring:
      displayname: MyString
      dataformat: string
      description: A string
      page: string
      order: 100

  mystring_default:
      displayname: MyString Default
      dataformat: string
      description: A string with default value
      default_value: hello
      page: string


  # -- text

  text_raw:
    displayname: Text RAW
    dataformat: text
    order: 120
    page: text

  text_html:
    displayname: Text HTML
    dataformat: text
    dataformat_ext: html
    page: text

  text_json:
    displayname: Text JSON
    dataformat: text
    dataformat_ext: json
    page: text

  text_yaml:
    displayname: Text YAML
    dataformat: text
    dataformat_ext: yaml
    page: text

  text_markdown:
    displayname: Text MARKDOWN
    dataformat: text
    dataformat_ext: markdown
    page: text

  # -- int

  myint:
      displayname: MyInt
      dataformat: int
      page: int
      order: 140
  
  myint_multi:
      displayname: MyIntMulti
      dataformat: int
      description: separate values with blank
      cardinal_max: 0
      cardinal_max: 0
      page: int


  myint_default:
      displayname: MyInt default
      dataformat: int
      description: single int with default value
      default_value: 11
      page: int

  myint_default_multi:
      displayname: MyInt default multi
      description: separate values with blank
      dataformat: int
      default_value: 11 22
      cardinal_max: 0
      page: int


# -- Float

  myfloat:
      displayname: MyFloat
      dataformat: float
      description: float ; use dot as decimal separator
      page: float
      order: 160

  myfloat_multi:
      displayname: MyFloatMulti
      dataformat: float
      description: use dot for decimal - separate values with blank
      cardinal_max: 0
      cardinal_max: 0
      page: float

  myfloat_default:
      displayname: MyFloat default
      dataformat: float
      description: float ; use dot as decimal separator
      default_value: 11.11
      page: float

  myfloat_default_multi:
      displayname: MyFloat default multi
      dataformat: float
      description: float ; use dot as decimal separator ; separate values with blank
      default_value: 11.11 22.22
      cardinal_max: 0
      page: float


  # -- Boolean

  myboolean:
      displayname: MyBoolean
      dataformat: boolean
      page: boolean
      order: 180

  myboolean_default_true:
      displayname: MyBoolean Default True
      dataformat: boolean
      default_value: true
      page: boolean

  myboolean_default_false:
      displayname: MyBoolean Default False
      dataformat: boolean
      default_value: false
      page: boolean


  # -- Date

  mydate:
      displayname: MyDate
      description: format YYYY-MM-DD
      dataformat: date
      page: date
      order: 200

  date_auto_pipeline:
      displayname: DateAutoPipeline
      description: YYYY-MM-DD
      dataformat: date
      page: date
  
  time_auto_pipeline:
      displayname: TimeAutoPipeline
      description: HH:MM:SS
      dataformat: time
      page: date
  
  datetime_auto_pipeline:
      displayname: DateTimeAutoPipeline
      description: YYYY-MM-DD HH:MM:SS
      dataformat: datetime
      page: date

# --- IP

  myipv4:
      displayname: MyIPV4
      dataformat: ipv4
      description: A.B.C.D or A.B.C.D/mask
      page: ip
      order: 220

# -- UUID 

  uuid_auto:
      displayname: UUID auto
      dataformat: string
      description: UUID from pipeline
      page: uuid
      order: 240

# -- user

  my_user:      
      displayname: My User
      dataformat: user
      description: Choose a user
      cardinal_min: 0
      cardinal_max: 1
      page: iam
      order: 260

  my_user_multi:
      displayname: My User Multi
      dataformat: user
      description: Choose one or more users
      cardinal_min: 0
      cardinal_max: 0
      page: iam

  # -- group

  my_group:
      displayname: MyGroup
      dataformat: group
      description: Choose a Group
      cardinal_max: 0
      cardinal_max: 1
      page: iam

  my_group_multi:
      displayname: MyGroupMulti
      dataformat: group
      description: Choose one or more Groups
      cardinal_max: 0
      cardinal_max: 0
      page: iam

# -- role

  my_role:
      displayname: MyRole
      dataformat: role
      description: Choose a Role
      cardinal_max: 0
      cardinal_max: 1
      page: iam

  my_role_multi:
      displayname: MyRoleMulti
      dataformat: role
      description: Choose one or more Roles
      cardinal_max: 0
      cardinal_max: 0
      page: iam

# -- schema

  my_schema_site:
      displayname: Schema Site
      dataformat: schema
      dataformat_ext: site
      description: Choose 0 or 1 Site Instance
      cardinal_min: 0
      cardinal_max: 1
      page: schema
      order: 280

  my_schema_site_multi:      
      displayname: Schema site Multi
      dataformat: schema
      dataformat_ext: site
      description: Choose one or more Site Instance
      cardinal_min: 0
      cardinal_max: 0
      page: schema

  my_schema_self:      
      displayname: Schema self Single
      dataformat: schema
      dataformat_ext: test
      description: Choose a TEST (self)
      cardinal_min: 0
      cardinal_max: 1
      page: schema


# -- Enumerate

  my_enumerate_abcde:      
      displayname: Enumerate ABCDE
      dataformat: enumerate
      dataformat_ext: enumerate_test
      description: Choose a value
      cardinal_min: 0
      cardinal_max: 1
      page: enumerate
      order: 300

  my_enumerate_abcde_multi:      
      displayname: Enumerate Multi ABCDE
      dataformat: enumerate
      dataformat_ext: enumerate_test
      description: Choose one or more values
      cardinal_min: 0
      cardinal_max: 0
      page: enumerate

  my_enumerate_default:
      displayname: Enumerate with default
      dataformat: enumerate
      dataformat_ext: enumerate_test
      default_value: B
      page: enumerate

  my_enumerate_subfields:
      displayname: Enumerate with subfields
      dataformat: enumerate
      dataformat_ext: enumerate_test
      page: enumerate


# -- File

  my_file:
      displayname: My File
      description: Select a single test file
      dataformat: file
      page: file
      order: 320

  # my_file_multi:
  #     displayname: My File Multi
  #     dataformat: file
  #     cardinal_max: 0


# -- Password  3.28

  my_pass1:
      displayname: Password field (Hash)
      description: Type a password
      dataformat: password
      dataformat_ext: hash
      page: password
      order: 330

  my_pass2:
      displayname: Password field (Store)
      description: Type a password
      dataformat: password
      dataformat_ext: store
      page: password
      order: 331

  my_pass3:
      displayname: Password field Complex
      description: 'Type a password (minlen:4 maxlen:8 complexity:4)'
      dataformat: password
      dataformat_ext: 'hash minlen:4 maxlen:8 complexity:4'
      page: password
      order: 331
      
# -----------------------------------------------------
# data : test
# ----------------------------------------------------


- classname: test
  keyname: test01
  displayname: test01
  mystring: "Exotic chars ÀàÈÊéèêôûäëïöüù€ç"
  myint: 11
  myint_multi: [111, 222]
  myfloat: 27.19
  myfloat_multi: [111.1, 222.2]
  myboolean: true
  mydate: "2024-11-01"
  myipv4: "10.1.2.3"
  my_enumerate_abcde: "A"
  my_enumerate_abcde_multi: A, B, C
  my_enumerate_subfields: A
  my_schema_site: testsite01
  my_schema_site_multi: 
    - testsite02
    - testsite03
  my_schema_self: test02
  my_user: testuser01
  my_user_multi: 
  - testuser01
  - testuser02
  my_notify_group: testgroup01
  my_notify_group_multi: [testgroup01, testgroup02]

- classname: test
  keyname: test02
  displayname: test02
  mystring: data for test02
  myint: 11
  myfloat: 27.19
  myboolean: true
  mydate: "2024-11-01"
  myipv4: "10.1.2.3"
  my_enumerate_abcde: "B"
  my_enumerate_abcde_multi: A, B, C
  my_enumerate_subfields: B
  my_schema_self: test03

- classname: test
  keyname: test03
  displayname: test03
  mystring: data for test03
  myint: 11
  myfloat: 27.19
  myboolean: true
  mydate: "2024-11-01"
  myipv4: "10.1.2.3"
  my_enumerate_abcde: "C"
  my_enumerate_abcde_multi: A, B, C
  my_enumerate_subfields: complex

