ui-awesome/model

UIAwesome 模型用于 PHP。

0.1.0 2024-03-18 21:49 UTC

This package is auto-updated.

Last update: 2024-09-18 22:57:19 UTC


README

UIAwesome 模型用于 PHP。


PHPUnit Codecov Infection Psalm Psalm Coverage Style ci

UIAwesome 模型包为 PHP 应用程序中的数据模型管理提供了一套强大的工具。

<?php

declare(strict_types=1);

namespace App\Model;

use UIAwesome\Model\{AbstractModel, Attribute\DoNotCollect, Attribute\Timestamp};

final class User extends AbstractModel
{
    private int $age;
    private string $name;
    #[DoNotCollect] // attribute for do not collect
    private int $flag = 0;
    private bool $isActive;
    #[Timestamp] // attribute for timestamp
    private int $updatedAt = 0;
}

安装

建议通过 Composer 安装此扩展。

运行以下命令之一

composer require --prefer-dist ui-awesome/model:"^0.1"

或添加

"ui-awesome/model": "^0.1"

使用方法

查看文档以了解使用方法

测试

查看文档以了解测试方法

支持版本

PHP81

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件

我们的社交媒体

Twitter