keios / oc-trait-financial
为OctoberCMS的模型提供的金融特性。
v1.0.1
2023-10-13 18:01 UTC
Requires
- php: >=5.4.0
- keios/moneyright: >=1.0.1
This package is not auto-updated.
Last update: 2024-09-28 16:32:33 UTC
README
为OctoberCMS模型提供Keios/MoneyRight值对象集成的特性。
安装
通过Composer
$ composer require keios/oc-trait-financial
用法
class Account extends Model { // example model extending October's October\Rain\Database\Model use \Keios\Financial\Financial; protected $financial = [ 'balance' => [ // $model->balance instanceof \Keios\MoneyRight\Money // true 'balance' => 'amount', // amount : decimal(12,4) field in database 'currency' => 'currency' // currency : varchar(3) field in database ] ]; }
安全
如果您发现任何安全问题,请通过电子邮件lukasz@c-call.eu联系,而不是使用问题跟踪器。
致谢
许可
MIT许可证(MIT)。有关更多信息,请参阅许可文件。