Update actor

This commit is contained in:
Mirai Kumiko 2025-06-18 16:17:54 +02:00
parent df548a4943
commit 4cb3b702e8
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278
2 changed files with 10 additions and 19 deletions

View file

@ -25,12 +25,12 @@ defmodule Nulla.Models.Actor do
field :indexable, :boolean, default: true field :indexable, :boolean, default: true
field :published, :utc_datetime field :published, :utc_datetime
field :memorial, :boolean, default: false field :memorial, :boolean, default: false
field :publicKey, {:array, :map} field :publicKey, :map
field :tag, {:array, :map} field :tag, {:array, :map}, default: []
field :attachment, {:array, :map} field :attachment, {:array, :map}, default: []
field :endpoints, :map field :endpoints, :map
field :icon, :map field :icon, :map, default: %{}
field :image, :map field :image, :map, default: %{}
field :vcard_bday, :date field :vcard_bday, :date
field :vcard_Address, :string field :vcard_Address, :string
@ -71,7 +71,6 @@ defmodule Nulla.Models.Actor do
:vcard_Address :vcard_Address
]) ])
|> validate_required([ |> validate_required([
:id,
:domain, :domain,
:ap_id, :ap_id,
:type, :type,
@ -82,8 +81,6 @@ defmodule Nulla.Models.Actor do
:featured, :featured,
:featuredTags, :featuredTags,
:preferredUsername, :preferredUsername,
:name,
:summary,
:url, :url,
:manuallyApprovesFollowers, :manuallyApprovesFollowers,
:discoverable, :discoverable,
@ -91,13 +88,7 @@ defmodule Nulla.Models.Actor do
:published, :published,
:memorial, :memorial,
:publicKey, :publicKey,
:tag, :endpoints
:attachment,
:endpoints,
:icon,
:image,
:vcard_bday,
:vcard_Address
]) ])
end end

View file

@ -23,11 +23,11 @@ defmodule Nulla.Repo.Migrations.CreateActors do
add :published, :utc_datetime add :published, :utc_datetime
add :memorial, :boolean, default: false add :memorial, :boolean, default: false
add :publicKey, :map add :publicKey, :map
add :tag, {:array, :map} add :tag, {:array, :map}, default: []
add :attachment, {:array, :map} add :attachment, {:array, :map}, default: []
add :endpoints, :map add :endpoints, :map
add :icon, :map add :icon, :map, default: %{}
add :image, :map add :image, :map, default: %{}
add :vcard_bday, :date add :vcard_bday, :date
add :vcard_Address, :string add :vcard_Address, :string
end end