nicolachoquet06250/php-lib-orm

module d'orm de la bibliothèque nicolachoquet06250/php-lib

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/nicolachoquet06250/php-lib-orm

1.1.1 2021-05-31 14:39 UTC

This package is auto-updated.

Last update: 2025-11-29 03:04:42 UTC


README

module d'orm de la bibliothèque nicolachoquet06250/php-lib

DOCUMENTATION

  • Créer un Model :
<?php

use PhpLib\ORM\Model;
use PhpLib\ORM\decorators\{
    Entity, Column, AutoIncrement, 
    PrimaryKey, DefaultValue,
    types\Integer, types\DateTime, 
    types\NotNull
};

#[Entity('table-name')]
class MaTable extends Model {
    #[
        Column('id'),
        Integer(11),
        AutoIncrement(),
        PrimaryKey()
    ]
    public int $id; 
    
    #[
        Column(),
        DateTime(),
        DefaultValue('NOW()'),
        NotNull()
    ]
    public string $created_at;
}