This commit is contained in:
Bozhidar 2024-09-18 16:25:17 +03:00
parent dbadbdf219
commit 3dd566bb68
14 changed files with 393 additions and 0 deletions

View file

@ -0,0 +1,22 @@
<?php
namespace Modules\Email\App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Email\Database\factories\DomainDkimFactory;
class DomainDkim extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [];
protected static function newFactory(): DomainDkimFactory
{
//return DomainDkimFactory::new();
}
}

View file

@ -0,0 +1,22 @@
<?php
namespace Modules\Email\App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Email\Database\factories\DomainDkimSigningFactory;
class DomainDkimSigning extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [];
protected static function newFactory(): DomainDkimSigningFactory
{
//return DomainDkimSigningFactory::new();
}
}

View file

@ -0,0 +1,22 @@
<?php
namespace Modules\Email\App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Email\Database\factories\EmailAliasFactory;
class EmailAlias extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [];
protected static function newFactory(): EmailAliasFactory
{
//return EmailAliasFactory::new();
}
}

View file

@ -0,0 +1,22 @@
<?php
namespace Modules\Email\App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Email\Database\factories\EmailAliasDomainFactory;
class EmailAliasDomain extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [];
protected static function newFactory(): EmailAliasDomainFactory
{
//return EmailAliasDomainFactory::new();
}
}

View file

@ -0,0 +1,22 @@
<?php
namespace Modules\Email\App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Email\Database\factories\EmailBoxFactory;
class EmailBox extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [];
protected static function newFactory(): EmailBoxFactory
{
//return EmailBoxFactory::new();
}
}

View file

@ -0,0 +1,22 @@
<?php
namespace Modules\Email\App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Email\Database\factories\EmailQuotaFactory;
class EmailQuota extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [];
protected static function newFactory(): EmailQuotaFactory
{
//return EmailQuotaFactory::new();
}
}

View file

@ -0,0 +1,22 @@
<?php
namespace Modules\Email\App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Email\Database\factories\EmailQuota2Factory;
class EmailQuota2 extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [];
protected static function newFactory(): EmailQuota2Factory
{
//return EmailQuota2Factory::new();
}
}

View file

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('domain_dkim_signings', function (Blueprint $table) {
$table->id();
$table->string('author')->nullable();
$table->unsignedBigInteger('dkim_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('domain_dkim_signings');
}
};

View file

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('domain_dkims', function (Blueprint $table) {
$table->id();
$table->string('domain_name');
$table->string('description')->default('');
$table->string('selector')->default('default');
$table->text('private_key');
$table->text('public_key');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('domain_dkims');
}
};

View file

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('email_aliases', function (Blueprint $table) {
$table->id();
$table->string('address');
$table->text('goto');
$table->string('domain');
$table->tinyInteger('active')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('email_aliases');
}
};

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('email_alias_domains', function (Blueprint $table) {
$table->id();
//
$table->string('alias_domain')->nullable();
$table->string('target_domain')->nullable();
$table->boolean('active')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('email_alias_domains');
}
};

View file

@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('email_boxes', function (Blueprint $table) {
$table->id();
$table->string('username')->nullable();
$table->string('password')->nullable();
$table->string('name')->nullable();
$table->string('maildir')->nullable();
$table->bigInteger('quota')->default(0);
$table->string('local_part')->nullable();
$table->string('domain')->nullable();
$table->dateTime('created')->default('2000-01-01 00:00:00');
$table->dateTime('modified')->default('2000-01-01 00:00:00');
$table->tinyInteger('active')->default(1);
$table->string('phone')->nullable();
$table->string('email_other')->nullable();
$table->string('token')->nullable();
$table->dateTime('token_validity')->default('2000-01-01 00:00:00');
$table->dateTime('password_expiry')->default('2000-01-01 00:00:00');
$table->tinyInteger('smtp_active')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('email_boxes');
}
};

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('email_quotas', function (Blueprint $table) {
$table->id();
$table->string('username');
$table->string('path');
$table->bigInteger('current')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('email_quotas');
}
};

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('email_quota2', function (Blueprint $table) {
$table->id();
$table->string('username', 100)->nullable();
$table->bigInteger('bytes')->default(0);
$table->integer('messages')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('email_quota2');
}
};