Sha256: 18a8cb093616563b626a410d6fdf904c24e8d4487b0e47e20b80725c7e006aad

Contents?: true

Size: 763 Bytes

Versions: 1

Compression:

Stored size: 763 Bytes

Contents

# frozen_string_literal: true

module Meibo
  module JapanProfile
    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

1 entries across 1 versions & 1 rubygems

Version Path
meibo-0.1.0 lib/meibo/japan_profile/role.rb