Skip to content

Commit 019bfe5

Browse files
committed
chore: update title and desc
1 parent bfd038e commit 019bfe5

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
3+
namespace Appwrite\Enums;
4+
5+
use JsonSerializable;
6+
7+
class ColumnStatus implements JsonSerializable
8+
{
9+
private static ColumnStatus $AVAILABLE;
10+
private static ColumnStatus $PROCESSING;
11+
private static ColumnStatus $DELETING;
12+
private static ColumnStatus $STUCK;
13+
private static ColumnStatus $FAILED;
14+
15+
private string $value;
16+
17+
private function __construct(string $value)
18+
{
19+
$this->value = $value;
20+
}
21+
22+
public function __toString(): string
23+
{
24+
return $this->value;
25+
}
26+
27+
public function jsonSerialize(): string
28+
{
29+
return $this->value;
30+
}
31+
32+
public static function AVAILABLE(): ColumnStatus
33+
{
34+
if (!isset(self::$AVAILABLE)) {
35+
self::$AVAILABLE = new ColumnStatus('available');
36+
}
37+
return self::$AVAILABLE;
38+
}
39+
public static function PROCESSING(): ColumnStatus
40+
{
41+
if (!isset(self::$PROCESSING)) {
42+
self::$PROCESSING = new ColumnStatus('processing');
43+
}
44+
return self::$PROCESSING;
45+
}
46+
public static function DELETING(): ColumnStatus
47+
{
48+
if (!isset(self::$DELETING)) {
49+
self::$DELETING = new ColumnStatus('deleting');
50+
}
51+
return self::$DELETING;
52+
}
53+
public static function STUCK(): ColumnStatus
54+
{
55+
if (!isset(self::$STUCK)) {
56+
self::$STUCK = new ColumnStatus('stuck');
57+
}
58+
return self::$STUCK;
59+
}
60+
public static function FAILED(): ColumnStatus
61+
{
62+
if (!isset(self::$FAILED)) {
63+
self::$FAILED = new ColumnStatus('failed');
64+
}
65+
return self::$FAILED;
66+
}
67+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
namespace Appwrite\Enums;
4+
5+
use JsonSerializable;
6+
7+
class DatabaseType implements JsonSerializable
8+
{
9+
private static DatabaseType $LEGACY;
10+
private static DatabaseType $TABLESDB;
11+
12+
private string $value;
13+
14+
private function __construct(string $value)
15+
{
16+
$this->value = $value;
17+
}
18+
19+
public function __toString(): string
20+
{
21+
return $this->value;
22+
}
23+
24+
public function jsonSerialize(): string
25+
{
26+
return $this->value;
27+
}
28+
29+
public static function LEGACY(): DatabaseType
30+
{
31+
if (!isset(self::$LEGACY)) {
32+
self::$LEGACY = new DatabaseType('legacy');
33+
}
34+
return self::$LEGACY;
35+
}
36+
public static function TABLESDB(): DatabaseType
37+
{
38+
if (!isset(self::$TABLESDB)) {
39+
self::$TABLESDB = new DatabaseType('tablesdb');
40+
}
41+
return self::$TABLESDB;
42+
}
43+
}

0 commit comments

Comments
 (0)