suscriptors:
  label: Suscriptores
  table: suscriptor
  listFields: [id,name, last_name, email,created_at]
  fields:
    name:
      type: text
      label: Nombre
      required: true
    last_name:
      type: text
      label: Apellidos
      required: true
    email:
      type: text
      label: Correo Electrónico
    ubigeo:
      type: reference
      label: Ubigeo
      reference:
        nameField: name
        entity: ubigeo
    birthdate:
      type: date
      label: Fecha de nacimiento
    suscriptor_localclub:
      type: many
      label: Club local
      many:
        nameField: name
        entity: localclub
        thisField: suscriptor
        thatField: localclub
    localclub_other:
      type: text
      label: Otro club local
    suscriptor_club:
      type: many
      label: Club
      many:
        nameField: name
        entity: club
        thisField: suscriptor
        thatField: club
    club_other:
      type: text
      label: Otro club
    suscriptor_league:
      type: many
      label: Liga
      many:
        nameField: name
        entity: league
        thisField: suscriptor
        thatField: league
    league_other:
      type: text
      label: Otra liga
    suscriptor_country:
      type: many
      label: País
      many:
        nameField: name
        entity: country
        thisField: suscriptor
        thatField: country
user:
  label: User
  table: user
  listFields: [id,username, email,created_at]
  fields:
    username:
      type: text
      label: Username
      required: true
    password:
      type: text
      label: Password Hash
      description: 'Set this to your desired password. Will be automatically converted to an hash value not meant to be readable.'
      required: true
    salt:
      type: text
      label: Password Salt
      description: 'Auto populated field on user creation. Used internally.'
      required: false
    email:
      type: text
      label: E-Mail
      required: true
      unique: true
role:
  label: Roles
  table: role
  fields:
    role:
      type: text
      label: Role
      required: true
userRole:
  label: User Roles
  table: user_role
  fields:
    user:
      type: reference
      label: User
      required: true
      reference:
        nameField: username
        entity: user
    role:
        type: reference
        label: Role
        reference:
          nameField: role
          entity: role
        required: true
passwordReset:
  label: Password Resets
  table: password_reset
  fields:
    user:
      type: reference
      label: User
      reference:
        nameField: username
        entity: user
      required: true
    token:
      type: text
      label: Token
      required: true
    reset:
      type: datetime
      label: Reset
localclub:
  label: Clubes locales
  table: localclub
  listFields: [id,name]
  initialSortField: id
  fields:
    name:
      type: text
      label: Nombre
      required: true
league:
  label: Ligas
  table: league
  listFields: [id,name]
  initialSortField: id
  fields:
    name:
      type: text
      label: Nombre
      required: true
club:
  label: Clubes
  table: club
  listFields: [id,name]
  initialSortField: id
  fields:
    name:
      type: text
      label: Nombre
      required: true
ubigeo:
  label: Ubigeo
  table: ubigeo_ubigeo
  listFields: [id,name]
  initialSortField: id
  fields:
    name:
      type: text
      label: Nombre
      required: true
country:
  label: Paises
  table: country
  listFields: [id,name]
  initialSortField: id
  fields:
    name:
      type: text
      label: Nombre
      required: true
