Пример #1
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('key')->string(255)->index()->primary();
     $table->column('value')->longtext();
     parent::__construct($table);
 }
Пример #2
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('id')->integer()->primary()->increment();
     $table->column('name')->string(255);
     parent::__construct();
 }
Пример #3
0
 public function __construct()
 {
     $table = new DBTable('source_cloudflare');
     $table->column('id')->bigint()->primary()->increment();
     $table->column('source_id')->integer()->index();
     $table->column('cloudflare_identifier')->string(36)->index();
     parent::__construct($table);
 }
Пример #4
0
 public function __construct()
 {
     // Defines the table we are using
     $table = new DBTable();
     $table->column('id')->integer()->primary()->increment();
     $table->column('name')->string(255);
     $table->column('date')->datetime()->index();
     parent::__construct($table);
     // If we want any default values that is not required for the users to set we add them here.
     // We can always overwrite them later by doing $company->date = [NEW-VALUE]
     $this->date = \Pecee\Date::ToDateTime();
     $this->metadata = new ModelCompanyData();
 }
Пример #5
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('id')->bigint()->primary()->increment();
     $table->column('organisation_id')->bigint()->index();
     $table->column('amount')->float()->index();
     $table->column('currency')->string(40)->nullable();
     $table->column('transaction_id')->string()->nullable()->index();
     $table->column('period_start')->date()->index();
     $table->column('period_end')->date()->index();
     $table->column('payment_date')->datetime()->index();
     parent::__construct($table);
     $this->amount = 0;
     $this->payment_date = Date::toDateTime();
 }
Пример #6
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('name')->string(255)->primary();
     $table->column('path')->string(40)->index();
     $table->column('host')->string(50)->index();
     $table->column('capacity_free_gb')->integer();
     $table->column('capacity_max_gb')->integer();
     $table->column('capacity_limit')->integer();
     $table->column('active')->bool()->index();
     parent::__construct($table);
     $this->active = true;
 }
Пример #7
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('id')->bigint()->primary()->increment();
     $table->column('user_id')->bigint()->index();
     $table->column('email')->string(255)->index();
     $table->column('organisation_id')->bigint()->index();
     $table->column('role')->string(255);
     $table->column('created')->datetime()->index();
     parent::__construct($table);
     $this->created = Date::toDateTime();
 }
Пример #8
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('id')->integer()->primary()->increment();
     $table->column('source_id')->bigint()->index();
     $table->column('key')->string()->index();
     $table->column('value')->text()->nullable();
     parent::__construct($table);
 }
Пример #9
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('id')->integer()->primary()->increment();
     $table->column('user_id')->bigint()->index();
     $table->column('organisation_id')->bigint()->index();
     $table->column('role')->string(255)->index();
     parent::__construct($table);
 }
Пример #10
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('id')->bigint()->primary()->increment();
     $table->column('user_id')->bigint()->index();
     $table->column('organisation_id')->bigint()->index();
     $table->column('invoice_id')->integer()->index();
     $table->column('path')->string(300);
     $table->column('due_date')->date()->index();
     $table->column('amount_total')->integer()->index();
     $table->column('payed')->bool()->index();
     $table->column('created')->datetime()->index();
     parent::__construct($table);
     if (ModelUser::current()->isLoggedIn()) {
         $this->user_id = ModelUser::current()->id;
     }
     $this->created = Date::toDateTime();
 }
Пример #11
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('id')->bigint()->primary()->increment();
     $table->column('name')->string(255)->index();
     $table->column('api_token')->string(40)->index();
     $table->column('stripe_identifier_id')->string(40)->nullable();
     $table->column('discount_percentage')->float()->nullable();
     $table->column('free_amount')->float()->nullable();
     $table->column('fixed_plan_amount')->float()->nullable();
     $table->column('included_master_images')->integer()->nullable();
     $table->column('included_bandwidth_mb')->integer()->nullable();
     $table->column('disabled')->bool()->index();
     $table->column('deleted')->bool()->index();
     parent::__construct($table);
     $this->api_token = Guid::create();
     $this->free_amount = 10;
     $this->disabled = false;
     $this->deleted = false;
 }
Пример #12
0
 public function __construct()
 {
     $table = new DBTable();
     $table->column('id')->bigint()->increment()->primary();
     $table->column('source_id')->bigint()->index();
     $table->column('cdn')->string(255)->index();
     $table->column('name')->string(300)->index();
     $table->column('original_name')->string(300)->index();
     $table->column('path')->string(500)->index();
     $table->column('mime')->string(255)->index();
     $table->column('size')->integer()->index();
     $table->column('identifier')->string(32)->index();
     $table->column('last_activity')->datetime()->nullable()->index();
     $table->column('created')->datetime()->index();
     parent::__construct($table);
     $this->created = Date::toDateTime();
 }
Пример #13
0
 public function __construct()
 {
     $table = new DBTable('source');
     $table->column('id')->bigint()->primary()->increment();
     $table->column('organisation_id')->integer()->index();
     $table->column('name')->string(255);
     $table->column('type')->string(255)->index();
     $table->column('subdomain')->string(255)->index();
     $table->column('require_ssl')->bool();
     $table->column('error_image_url')->string(400);
     $table->column('error_image_parameters')->text();
     $table->column('missing_image_url')->string(400);
     $table->column('missing_image_parameters')->text();
     $table->column('default_parameters')->text();
     $table->column('last_activity')->datetime()->index();
     parent::__construct($table);
     $this->cloudflareIds = array();
     $this->last_activity = Date::toDateTime();
 }
Пример #14
0
 public function __construct()
 {
     $table = new DBTable('activity');
     $table->column('id')->bigint()->increment()->primary();
     $table->column('source_id')->bigint()->index();
     $table->column('thumbnail_id')->bigint()->nullable()->index();
     $table->column('path')->string(400);
     $table->column('method')->string(30);
     $table->column('agent')->string()->nullable();
     $table->column('referer')->string()->nullable();
     $table->column('ip')->string()->index();
     /**
      * NOTE: identifier is the file's unique id - based on the "path" column.
      * It is used as a faster way to determinate if a path has been accessed multiple times,
      * when calculating statistics - and might speed up things when inserting instead of
      * creating an index to the path column.
      **/
     $table->column('identifier')->string(36)->index();
     $table->column('filesize')->integer()->nullable()->index();
     $table->column('master')->bool()->index();
     $table->column('created')->datetime()->index();
     parent::__construct($table);
     $this->created = Date::toDateTime();
 }