man kann hunde anlegen yay
All checks were successful
Build and push / Pulling repo on server (push) Successful in 18s

This commit is contained in:
2023-10-22 23:05:24 +02:00
parent 890905b435
commit f7a7c3457b
19 changed files with 314 additions and 83 deletions

17
web/models/Dog.model.php Normal file
View 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]
);
}

View File

@ -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'];