Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions module/VuFind/src/VuFind/Db/Entity/AccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,54 +38,71 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development:plugins:database_gateways Wiki
*
* @ORM\Table(name="access_token")
* @ORM\Table(name="access_token",
* indexes={@ORM\Index(name="user_id", columns={"user_id"})}
Comment thread
skellamp marked this conversation as resolved.
Outdated
* )
* @ORM\Entity
*/
class AccessToken implements EntityInterface
{
/**
* Unique ID.
*
* @var string
*
* @ORM\Column(name="id", type="string", length=255, nullable=false)
* @ORM\Column(type="string", length=255, nullable=false)
Comment thread
skellamp marked this conversation as resolved.
Outdated
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
Comment thread
skellamp marked this conversation as resolved.
*/
protected $id;

/**
* Token type.
*
* @var string
*
* @ORM\Column(name="type", type="string", length=128, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/
protected $type;

/**
* User id.
*
* @var \VuFind\Db\Entity\User
*
* @ORM\ManyToOne(targetEntity="VuFind\Db\Entity\User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
* @ORM\JoinColumn(name="user_id",
* referencedColumnName="id")
* })
*/
protected $user;

/**
* Creation date.
*
* @var \DateTime
*
* @ORM\Column(name="created", type="datetime", nullable=false, options={"default"="2000-01-01 00:00:00"})
* @ORM\Column(name="created",
* type="datetime",
* nullable=false,
* options={"default"="2000-01-01 00:00:00"}
* )
*/
protected $created = '2000-01-01 00:00:00';

/**
* Data.
*
* @var string|null
*
* @ORM\Column(name="data", type="text", length=16777215, nullable=true)
*/
protected $data;

/**
* Flag indicating status of the token.
*
* @var bool
*
* @ORM\Column(name="revoked", type="boolean", nullable=false)
Expand Down
32 changes: 28 additions & 4 deletions module/VuFind/src/VuFind/Db/Entity/AuthHash.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* PHP version 7
*
* Copyright (C) Villanova University 2021.
* Copyright (C) Villanova University 2023.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
Expand Down Expand Up @@ -38,52 +38,76 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development:plugins:database_gateways Wiki
*
* @ORM\Table(name="auth_hash", uniqueConstraints={@ORM\UniqueConstraint(name="hash_type", columns={"hash", "type"})}, indexes={@ORM\Index(name="created", columns={"created"}), @ORM\Index(name="session_id", columns={"session_id"})})
* @ORM\Table(name="auth_hash",
* uniqueConstraints={@ORM\UniqueConstraint(name="hash_type",
* columns={"hash", "type"})},
* indexes={@ORM\Index(name="created", columns={"created"}),
* @ORM\Index(name="session_id", columns={"session_id"})}
* )
* @ORM\Entity
*/
class AuthHash implements EntityInterface
{
/**
* Unique ID.
*
* @var int
*
* @ORM\Column(name="id", type="bigint", nullable=false, options={"unsigned"=true})
* @ORM\Id
* @ORM\Column(type="bigint",
Comment thread
skellamp marked this conversation as resolved.
Outdated
* nullable=false,
* options={"unsigned"=true}
* )
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;

/**
* Session id.
*
* @var string|null
*
* @ORM\Column(name="session_id", type="string", length=128, nullable=true)
*/
protected $sessionId;

/**
* Hash value.
*
* @var string
*
* @ORM\Column(name="hash", type="string", length=255, nullable=false)
*/
protected $hash = '';

/**
* Type of the hash.
*
* @var string|null
*
* @ORM\Column(name="type", type="string", length=50, nullable=true)
*/
protected $type;

/**
* Data.
*
* @var string|null
*
* @ORM\Column(name="data", type="text", length=16777215, nullable=true)
*/
protected $data;

/**
* Creation date.
*
* @var \DateTime
*
* @ORM\Column(name="created", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"})
* @ORM\Column(name="created",
* type="datetime",
* nullable=false,
* options={"default"="CURRENT_TIMESTAMP"}
* )
*/
protected $created = 'CURRENT_TIMESTAMP';
}
32 changes: 26 additions & 6 deletions module/VuFind/src/VuFind/Db/Entity/ChangeTracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* PHP version 7
*
* Copyright (C) Villanova University 2021.
* Copyright (C) Villanova University 2023.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
Expand Down Expand Up @@ -38,51 +38,71 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development:plugins:database_gateways Wiki
*
* @ORM\Table(name="change_tracker", indexes={@ORM\Index(name="deleted_index", columns={"deleted"})})
* @ORM\Table(name="change_tracker",
* indexes={@ORM\Index(name="deleted_index", columns={"deleted"})}
* )
* @ORM\Entity
*/
class ChangeTracker implements EntityInterface
{
/**
* Solr core containing record.
*
* @var string
*
* @ORM\Column(name="core", type="string", length=30, nullable=false)
* @ORM\Column(name="core",
* type="string",
* length=30,
* nullable=false
* )
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/
protected $core;

/**
* Id of record within core.
*
* @var string
*
* @ORM\Column(name="id", type="string", length=120, nullable=false)
* @ORM\Column(name="id",
* type="string",
* length=120,
* nullable=false
* )
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/
protected $id;

/**
* First time added to index
*
* @var \DateTime|null
*
* @ORM\Column(name="first_indexed", type="datetime", nullable=true)
*/
protected $firstIndexed;

/**
* Last time changed in index.
*
* @var \DateTime|null
*
* @ORM\Column(name="last_indexed", type="datetime", nullable=true)
*/
protected $lastIndexed;

/**
* Last time original record was edited.
*
* @var \DateTime|null
*
* @ORM\Column(name="last_record_change", type="datetime", nullable=true)
*/
protected $lastRecordChange;

/**
* Time record was removed form index.
Comment thread
skellamp marked this conversation as resolved.
Outdated
*
* @var \DateTime|null
*
* @ORM\Column(name="deleted", type="datetime", nullable=true)
Expand Down
34 changes: 28 additions & 6 deletions module/VuFind/src/VuFind/Db/Entity/Comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* PHP version 7
*
* Copyright (C) Villanova University 2021.
* Copyright (C) Villanova University 2023.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
Expand Down Expand Up @@ -38,50 +38,72 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development:plugins:database_gateways Wiki
*
* @ORM\Table(name="comments", indexes={@ORM\Index(name="resource_id", columns={"resource_id"}), @ORM\Index(name="user_id", columns={"user_id"})})
* @ORM\Table(name="comments",
* indexes={@ORM\Index(name="resource_id", columns={"resource_id"}),
* @ORM\Index(name="user_id", columns={"user_id"})}
* )
* @ORM\Entity
*/
class Comments implements EntityInterface
{
/**
* Unique ID.
*
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Column(name="id",
Comment thread
skellamp marked this conversation as resolved.
* type="integer",
* nullable=false
* )
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;

/**
* Comment.
*
* @var string
*
* @ORM\Column(name="comment", type="text", length=65535, nullable=false)
*/
protected $comment;

/**
* Creation date.
*
* @var \DateTime
*
* @ORM\Column(name="created", type="datetime", nullable=false, options={"default"="2000-01-01 00:00:00"})
* @ORM\Column(name="created",
* type="datetime",
* nullable=false,
* options={"default"="2000-01-01 00:00:00"}
* )
*/
protected $created = '2000-01-01 00:00:00';

/**
* User id.
*
* @var \VuFind\Db\Entity\User
*
* @ORM\ManyToOne(targetEntity="VuFind\Db\Entity\User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
* @ORM\JoinColumn(name="user_id",
* referencedColumnName="id")
* })
*/
protected $user;

/**
* Resource id.
*
* @var \VuFind\Db\Entity\Resource
*
* @ORM\ManyToOne(targetEntity="VuFind\Db\Entity\Resource")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="resource_id", referencedColumnName="id")
* @ORM\JoinColumn(name="resource_id",
* referencedColumnName="id")
* })
*/
protected $resource;
Expand Down
Loading