# frozen_string_literal: true

# == Schema Information
#
# Table name: content_posts
#
#  id                  :bigint(8)        not null, primary key
#  title               :string
#  permalink           :string
#  body                :text
#  visibility          :integer          default("draft")
#  account_id          :bigint(8)
#  content_category_id :bigint(8)
#  created_at          :datetime         not null
#  updated_at          :datetime         not null
#  summary             :string
#

FactoryBot.define do
  factory :content_post, class: Content::Post do
    sequence(:title) { |n| "PostTitle #{n}" }
    body 'PostBody'
    summary 'PostSummary'
    author
    category

    factory :published_post do
      visibility 'published'
    end
  end

  trait :as_draft do
    visibility 'draft'
  end

  trait :as_published do
    visibility 'published'
  end
end
