mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
use integers for archived/starred status
This commit is contained in:
parent
0d3043a29c
commit
189ef6342a
3 changed files with 46 additions and 22 deletions
|
@ -59,6 +59,8 @@ class Entry
|
|||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @Exclude
|
||||
*
|
||||
* @ORM\Column(name="is_archived", type="boolean")
|
||||
*
|
||||
* @Groups({"entries_for_user", "export_all"})
|
||||
|
@ -68,6 +70,8 @@ class Entry
|
|||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @Exclude
|
||||
*
|
||||
* @ORM\Column(name="is_starred", type="boolean")
|
||||
*
|
||||
* @Groups({"entries_for_user", "export_all"})
|
||||
|
@ -271,6 +275,16 @@ class Entry
|
|||
return $this->isArchived;
|
||||
}
|
||||
|
||||
/**
|
||||
* @VirtualProperty
|
||||
* @SerializedName("is_archived")
|
||||
* @Groups({"entries_for_user", "export_all"})
|
||||
*/
|
||||
public function is_Archived()
|
||||
{
|
||||
return (int) $this->isArchived();
|
||||
}
|
||||
|
||||
public function toggleArchive()
|
||||
{
|
||||
$this->isArchived = $this->isArchived() ^ 1;
|
||||
|
@ -302,6 +316,16 @@ class Entry
|
|||
return $this->isStarred;
|
||||
}
|
||||
|
||||
/**
|
||||
* @VirtualProperty
|
||||
* @SerializedName("is_starred")
|
||||
* @Groups({"entries_for_user", "export_all"})
|
||||
*/
|
||||
public function is_Starred()
|
||||
{
|
||||
return (int) $this->isStarred();
|
||||
}
|
||||
|
||||
public function toggleStar()
|
||||
{
|
||||
$this->isStarred = $this->isStarred() ^ 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue