Sha256: c4454f4bf365d95ffb60d7a38e3e9d42868e5b33195e05cb12c06830b0b1125f

Contents?: true

Size: 781 Bytes

Versions: 5

Compression:

Stored size: 781 Bytes

Contents

# frozen_string_literal: true

module Meibo
  class JapanProfile < ::Meibo::Profile
    class Role < ::Meibo::Role
      # NOTE: roleは固定
      #   - 児童生徒の場合student
      #   - 教職員の場合teacher
      #   - 保護者の場合guardian
      # MEMO: enrollments.csvの方ではadministratorとguardianも許可されているがズレてないか
      ROLES = {
        teacher: "teacher",
        student: "student",
        guardian: "guardian"
      }.freeze

      DataModel.define(
        self,
        attribute_name_to_header_field_map: superclass.attribute_name_to_header_field_map,
        converters: superclass.converters.merge(
          enum: superclass.converters[:enum].merge(role: ROLES.values).freeze
        )
      )
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
meibo-0.21.0 lib/meibo/japan_profile/role.rb
meibo-0.20.0 lib/meibo/japan_profile/role.rb
meibo-0.19.0 lib/meibo/japan_profile/role.rb
meibo-0.18.0 lib/meibo/japan_profile/role.rb
meibo-0.17.0 lib/meibo/japan_profile/role.rb