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

View file

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