kodalto/propel-real-enum-behavior 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kodalto/propel-real-enum-behavior

最新稳定版本:2.0.0

Composer 安装命令:

composer require kodalto/propel-real-enum-behavior

包简介

Propel 2 behavior to manage the ENUM type more closely to what enums should be

README 文档

README

Latest Stable Version Total Downloads License

Requirements

This Behavior was developed for Propel 2.
It was also only tested for MySQL databases, if you wish to test it or adjust it for another database type, feel free to open an issue.

Installation

composer require Kodalto/propel-real-enum-behavior

schema.xml

Add the behavior either to the root of your database or on the target table.
Here is an example :

<database ...>
    <!-- This will add the real-enum behavior for all enums in the database -->
    <behavior name="real-enum"/>
    <table name="my_table">        
        <column name="my_enum" type="ENUM" valueSet="FIRST,SECOND,THIRD" />
    </table>
</database>

Usage

This behavior does 2 things to make usage of ENUMS easier :

  • You will now see the ENUM value from the valueSet in the database instead of a number.
  • Model classes will now have constants to easily access the enum values. Using the example above we could get a value from the value set like this : MyTable::MY_ENUM_SECOND

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固