承接 gepur-it/tiny_int_type 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

gepur-it/tiny_int_type

Composer 安装命令:

composer require gepur-it/tiny_int_type

包简介

Gepur ERP Tinyint doctrine type

README 文档

README

How to write doctrine type "tinyint"

to your Symfony project

Add tinyint: GepurIt\TinyintType\TynyintDoctrineType to types of dbal in doctrine. See example:

# Doctrine Configuration
doctrine:
    dbal:
        default_connection: default
        connections:
            default:     
            some_other:
                
        types:
            email:  GepurIt\TinyintType\TynyintDoctrineType

SQL type = 'TINYINT(1)'.

Example of entity:

namespace YourBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\Validator\Constraints as Assert;

/** Class EntityWithEmailField
  * @package YourBundle\Entity
  *
  * @ORM\Table(
  *     name="your_table_name",
  *     options={"collate"="utf8mb4_unicode_ci", "charset"="utf8mb4"}
  * )
  * @ORM\Entity(repositoryClass="YourBundle\Repository\EntityWithTynyintFieldRepository")
  * @ORM\HasLifecycleCallbacks()
  * @codeCoverageIgnore
  */
class EntityWithTynyintField
{
    /**
     * @var integer
     *
     * @ORM\Column(name="direction", type="tinyint", nullable=false)
     */
    protected $direction = 0;

    /**
     * @return int
     */
    public function getDirection(): int
    {
        return $this->direction;
    }

    /**
     * @param int $direction
     */
    public function setDirection(int $direction): void
    {
        $this->direction = $direction;
    }
}

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-11-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固