Schema::create('chat', static function (Blueprint $table) {
14
$table->bigInteger('id')->primary()->comment('Unique user or chat identifier');
15
$table->enum('type', ['private', 'group', 'supergroup', 'channel'])->comment('Chat type, either private, group, supergroup or channel');
16
$table->char('title')->nullable()->default('')->comment('Chat (group) title, is null if chat type is private');
17
$table->char('username')->nullable()->comment('Username, for private chats, supergroups and channels if available');
18
$table->boolean('all_members_are_administrators')->nullable()->default(0)->comment('True if a all members of this group are admins');
19
$table->timestamps();
20
$table->bigInteger('old_id')->nullable()->index('old_id')->comment('Unique chat identifier, this is filled when a group is converted to a supergroup');