diff --git a/db/seeds/development/staff_members.rb b/db/seeds/development/staff_members.rb index c93a276..acfa41f 100644 --- a/db/seeds/development/staff_members.rb +++ b/db/seeds/development/staff_members.rb @@ -18,3 +18,37 @@ suspended: true, start_date: Date.today, ) + +family_names = %w( + 佐藤:サトウ:sato + 鈴木:スズキ:suzuki + 高橋:タカハシ:takahashi + 田中:タナカ:tanaka + てすと:テスト:test +) + +given_names = %w( + 次郎:ジロウ:jiro + 三郎:サブロウ:saburo + 松子:マツコ:matsuko + 竹子:タケコ:takeko + 梅子:ウメコ:umeko + 太郎:タロウ:taro +) + +20.times do |n| + fn = family_names[n % 4 ].split(':') + gn = given_names[ n % 5 ].split(':') + + StaffMember.create!( + email: "#{fn[2]},#{gn[2]}@example.com", + family_name: fn[0], + given_name: gn[0], + family_name_kana: fn[1], + given_name_kana: gn[2], + password: 'password', + start_date: (1000 - n).days.ago.to_date, + end_date: n == 0 ? Date.today : nil, + suspended: n == 1, + ) +end