<commit_before>defmodule PanWeb.Persona do
  use Pan.Web, :model
  alias PanWeb.Like
  alias Pan.Repo
  alias PanWeb.Follow
  alias PanWeb.Persona
  alias PanWeb.Podcast
  alias PanWeb.Episode
  alias PanWeb.Gig
  alias PanWeb.Engagement
  alias PanWeb.User

  schema "personas" do
    field :pid, :string
    field :name, :string
    field :uri, :string
    field :email, :string
    field :description, :string
    field :long_description, :string
    field :image_url, :string
    field :image_title, :string
    field :user_id, :boolean

    belongs_to :redirect, Persona
    belongs_to :user, User
    has_many :engagements, Engagement
    has_many :gigs, Gig

    many_to_many :delegates, Persona,
                             join_through: "delegations",
                             join_keys: [persona_id: :id, delegate_id: :id]

    many_to_many :podcasts, Podcast, join_through: "engagements",
                                     on_delete: :delete_all

    many_to_many :episodes, Episode, join_through: "gigs",
                                     on_delete: :delete_all

    timestamps()
  end


  def changeset(struct, params \\ %{}) do
    struct
    |> cast(params, [:pid, :name, :uri, :email, :description, :image_url, :image_title,<commit_msg>... and should be an integer<commit_after>defmodule PanWeb.Persona do
  use Pan.Web, :model
  alias PanWeb.Like
  alias Pan.Repo
  alias PanWeb.Follow
  alias PanWeb.Persona
  alias PanWeb.Podcast
  alias PanWeb.Episode
  alias PanWeb.Gig
  alias PanWeb.Engagement
  alias PanWeb.User

  schema "personas" do
    field :pid, :string
    field :name, :string
    field :uri, :string
    field :email, :string
    field :description, :string
    field :long_description, :string
    field :image_url, :string
    field :image_title, :string
    field :user_id, :integer

    belongs_to :redirect, Persona
    belongs_to :user, User
    has_many :engagements, Engagement
    has_many :gigs, Gig

    many_to_many :delegates, Persona,
                             join_through: "delegations",
                             join_keys: [persona_id: :id, delegate_id: :id]

    many_to_many :podcasts, Podcast, join_through: "engagements",
                                     on_delete: :delete_all

    many_to_many :episodes, Episode, join_through: "gigs",
                                     on_delete: :delete_all

    timestamps()
  end


  def changeset(struct, params \\ %{}) do
    struct
    |> cast(params, [:pid, :name, :uri, :email, :description, :image_url, :image_title,
{'fraction_non_alphanumeric': 0.09169618260527351, 'fraction_numerical': 0.0, 'mean_word_length': 2.4679399727148703, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3803520', 'n_tokens_mistral': 820, 'n_tokens_neox': 803, 'n_words': 214}