`contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT '',
`suggest-cid` int unsigned COMMENT 'Suggested contact',
`knowyou` boolean NOT NULL DEFAULT '0' COMMENT '',
- `duplex` boolean NOT NULL DEFAULT '0' COMMENT '',
+ `duplex` boolean NOT NULL DEFAULT '0' COMMENT 'deprecated',
`note` text COMMENT '',
`hash` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`datetime` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '',
| contact-id | | int unsigned | NO | | 0 | |
| suggest-cid | Suggested contact | int unsigned | YES | | NULL | |
| knowyou | | boolean | NO | | 0 | |
-| duplex | | boolean | NO | | 0 | |
+| duplex | deprecated | boolean | NO | | 0 | |
| note | | text | YES | | NULL | |
| hash | | varchar(255) | NO | | | |
| datetime | | datetime | NO | | 0001-01-01 00:00:00 | |
'contact-id' => $introduction->cid,
'suggest-cid' => $introduction->sid,
'knowyou' => $introduction->knowyou ? 1 : 0,
- 'duplex' => $introduction->duplex ? 1 : 0,
'note' => $introduction->note,
'hash' => $introduction->hash,
'ignore' => $introduction->ignore ? 1 : 0,
* @property-read int $cid
* @property-read int|null $sid
* @property-read bool $knowyou
- * @property-read bool $duplex
* @property-read string $note
* @property-read string $hash
* @property-read \DateTime $datetime
protected $sid;
/** @var bool */
protected $knowyou;
- /** @var bool */
- protected $duplex;
/** @var string */
protected $note;
/** @var string */
* @param int $cid
* @param int|null $sid
* @param bool $knowyou
- * @param bool $duplex
* @param string $note
* @param string $hash
* @param \DateTime $datetime
* @param bool $ignore
* @param int|null $id
*/
- public function __construct(int $uid, int $cid, ?int $sid, bool $knowyou, bool $duplex, string $note, string $hash, \DateTime $datetime, bool $ignore, ?int $id)
+ public function __construct(int $uid, int $cid, ?int $sid, bool $knowyou, string $note, string $hash, \DateTime $datetime, bool $ignore, ?int $id)
{
$this->uid = $uid;
$this->cid = $cid;
$this->sid = $sid;
$this->knowyou = $knowyou;
- $this->duplex = $duplex;
$this->note = $note;
$this->hash = $hash;
$this->datetime = $datetime;
$row['contact-id'] ?? 0,
$row['suggest-cid'] ?? null,
!empty($row['knowyou']),
- !empty($row['duplex']),
$row['note'] ?? '',
$row['hash'] ?? '',
new \DateTime($row['datetime'] ?? 'now', new \DateTimeZone('UTC')),
int $cid,
string $note,
int $sid = null,
- bool $knowyou = false,
- bool $duplex = false
+ bool $knowyou = false
): Entity\Introduction {
return $this->createFromTableRow([
'uid' => $uid,
'suggest-cid' => $sid,
'contact-id' => $cid,
'knowyou' => $knowyou,
- 'duplex' => $duplex,
'note' => $note,
'hash' => Strings::getRandomHex(),
'datetime' => DateTimeFormat::utcNow(),
"contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => ""],
"suggest-cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Suggested contact"],
"knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "deprecated"],
"note" => ["type" => "text", "comment" => ""],
"hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
'suggest-cid' => 13,
'contact-id' => 24,
'knowyou' => 1,
- 'duplex' => 1,
'note' => 'a note',
'hash' => '12345',
'datetime' => '1970-01-01 00:00:00',
'suggest-cid' => 13,
'contact-id' => 24,
'knowyou' => true,
- 'duplex' => true,
'note' => 'a note',
'hash' => '12345',
'datetime' => new \DateTime('1970-01-01 00:00:00', new \DateTimeZone('UTC')),
'contact-id' => 0,
'suggest-cid' => null,
'knowyou' => false,
- 'duplex' => false,
'note' => '',
'ignore' => false,
'id' => null,
self::assertEquals($intro->cid, $assertion['contact-id'] ?? 0);
self::assertEquals($intro->sid, $assertion['suggest-cid'] ?? null);
self::assertEquals($intro->knowyou, $assertion['knowyou'] ?? false);
- self::assertEquals($intro->duplex, $assertion['duplex'] ?? false);
self::assertEquals($intro->note, $assertion['note'] ?? '');
if (isset($assertion['hash'])) {
self::assertEquals($intro->hash, $assertion['hash']);