class CreateJobs < ActiveRecord::Migration[7.1]
  def change
    create_table :jobs do |t|
      t.references :operator, null: true
      t.references :costumer, null: true
      t.string :operator_firstname
      t.string :operator_lastname
      t.string :costumer_firstname
      t.string :costumer_lastname
      t.boolean :printed, default: false
      t.boolean :paid, default: false
      t.datetime :printed_at
      t.datetime :status_changed_at
      t.datetime :paid_at
      t.boolean :intern, default: false
      t.string :cost_center
      t.integer :status, default: 0, index: true
      t.integer :number_of_plans_a0, default: 0
      t.integer :number_of_plans_a1, default: 0
      t.integer :number_of_plans_a2, default: 0
      t.integer :number_of_plans_a3, default: 0
      t.float :costum_qm_plan, default: 0
      t.boolean :privacy_policy_accepted, default: false

      t.timestamps
    end
  end
end
