feat: start on AI integration
This commit is contained in:
22
lib/bds/ai/chat_conversation.ex
Normal file
22
lib/bds/ai/chat_conversation.ex
Normal file
@@ -0,0 +1,22 @@
|
||||
defmodule BDS.AI.ChatConversation do
|
||||
@moduledoc false
|
||||
|
||||
use Ecto.Schema
|
||||
import Ecto.Changeset
|
||||
|
||||
@primary_key {:id, :string, autogenerate: false}
|
||||
|
||||
schema "chat_conversations" do
|
||||
field :title, :string
|
||||
field :model, :string
|
||||
field :copilot_session_id, :string
|
||||
field :created_at, :integer
|
||||
field :updated_at, :integer
|
||||
end
|
||||
|
||||
def changeset(conversation, attrs) do
|
||||
conversation
|
||||
|> cast(attrs, [:id, :title, :model, :copilot_session_id, :created_at, :updated_at], empty_values: [nil])
|
||||
|> validate_required([:id, :title, :created_at, :updated_at])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user