This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
dogstats/web/models/Dog.model.php

17 lines
630 B
PHP
Raw Normal View History

2023-10-22 23:05:24 +02:00
<?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]
);
}