man kann hunde anlegen yay
All checks were successful
Build and push / Pulling repo on server (push) Successful in 18s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 18s
This commit is contained in:
17
web/models/Dog.model.php
Normal file
17
web/models/Dog.model.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
class Dog extends Model {
|
||||
protected $dbTable = "dogs";
|
||||
protected $dbFields = Array (
|
||||
'uuid' => ['type'=>'text','required','unique','autoValMethod'=>'gen_ulid'],
|
||||
'registered' => ['type'=>'datetime','required','unique','autoValMethod'=>'getDateTime'],
|
||||
'name' => ['type'=>'text'],
|
||||
'kennel_name' => ['type'=>'text'],
|
||||
'breed' => ['type'=>'text'],
|
||||
'size' => ['type'=>'text'], //in cm
|
||||
'birthday' => ['type'=>'int'], //unix timestamp
|
||||
'agility_size' => ['type'=>'int'], //S,M,I,L
|
||||
'active' => ['type'=>'int','default'=>1]
|
||||
);
|
||||
|
||||
}
|
@ -12,6 +12,7 @@ class User extends Model {
|
||||
'last_login' => ['type'=>'datetime','required','unique','autoValMethod'=>'getDateTime'],
|
||||
'token' => ['type'=>'text','required','unique','autoValMethod'=>'uuid4'],
|
||||
'timezone' => ['type'=>'int'],
|
||||
'dogs' => ['type'=> 'array','default'=>[]],
|
||||
'active' => ['type'=>'int','default'=>0]
|
||||
);
|
||||
protected $hidden = ['password','token'];
|
||||
|
Reference in New Issue
Block a user