FactoryBot.define do
  factory :user do
    name { nil }
    inheritance_code { SecureRandom.uuid }
    role { 'guest' }
    banned_at { nil }

    trait :guest do
      role { 'guest' }
    end

    trait :member do
      role { 'member' }
    end

    trait :admin do
      role { 'admin' }
    end

    trait :banned do
      banned_at { Time.current }
    end
  end
end
