adrema/app/Mailman/Data/MailingList.php

34 lines
846 B
PHP
Raw Permalink Normal View History

2022-10-20 11:11:52 +02:00
<?php
namespace App\Mailman\Data;
use Spatie\LaravelData\Attributes\MapName;
2022-10-20 12:01:57 +02:00
use Spatie\LaravelData\Attributes\MapOutputName;
2022-10-20 11:11:52 +02:00
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Mappers\SnakeCaseMapper;
2023-06-13 21:21:30 +02:00
use Tests\RequestFactories\MailinglistFactory;
2022-10-20 11:11:52 +02:00
#[MapName(SnakeCaseMapper::class)]
class MailingList extends Data
{
public function __construct(
public string $description,
public string $displayName,
2022-10-20 12:01:57 +02:00
#[MapOutputName('name')]
2022-10-20 11:11:52 +02:00
public string $fqdnListname,
2022-10-20 12:01:57 +02:00
#[MapOutputName('id')]
2022-10-20 11:11:52 +02:00
public string $listId,
public string $listName,
public string $mailHost,
public int $memberCount,
public string $selfLink,
public int $volume,
) {
}
2023-06-13 21:21:30 +02:00
public static function factory(): MailinglistFactory
{
return MailinglistFactory::new();
}
2022-10-20 11:11:52 +02:00
}