Sha256: 7172e36d8db1d72de0897427f1fd979cd10224f1571c6a2048f5168757295b98

Contents?: true

Size: 767 Bytes

Versions: 10

Compression:

Stored size: 767 Bytes

Contents

# frozen_string_literal: true

module Meibo
  module JapanProfile
    class RoleJpM0 < ::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

10 entries across 10 versions & 1 rubygems

Version Path
meibo-0.27.1 lib/meibo/japan_profile/role_jp_m0.rb
meibo-0.27.0 lib/meibo/japan_profile/role_jp_m0.rb
meibo-0.26.0 lib/meibo/japan_profile/role_jp_m0.rb
meibo-0.25.3 lib/meibo/japan_profile/role_jp_m0.rb
meibo-0.25.2 lib/meibo/japan_profile/role_jp_m0.rb
meibo-0.25.1 lib/meibo/japan_profile/role_jp_m0.rb
meibo-0.25.0 lib/meibo/japan_profile/role_jp_m0.rb
meibo-0.24.0 lib/meibo/japan_profile/role_jp_m0.rb
meibo-0.23.0 lib/meibo/japan_profile/role_jp_m0.rb
meibo-0.22.0 lib/meibo/japan_profile/role_jp_m0.rb