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

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

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

gepur-it/datetime_6_doctrine_type

Composer 安装命令:

composer require gepur-it/datetime_6_doctrine_type

包简介

Gepur ERP datetime(6) doctrine type

README 文档

README

How to write doctrine type "datetime(6)"

to your Symfony project

Add datetime(6): GepurIt\TinyintType\Datetime6DoctrineType to types of dbal in doctrine. See example:

# Doctrine Configuration
doctrine:
    dbal:
        default_connection: default
        connections:
            default:     .gitignore.gitignore
            some_other:
                
        datetime(6):
            class: GepurIt\Datetime6Type\Datetime6DoctrineType
            commented: false

SQL type = 'DATETIME(6)'.

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")
  */
class EntityWithDatetime6Field
{
    /**
     * @var integer
     *
     * @ORM\Column(name="created_at", type="datetime(6)", nullable=false)
     */
    protected $createdAt = 0;

    /**
     * @return \DateTime
     */
    public function getDirection(): \DateTime
    {
        return $this->createdAt;
    }

    /**
     * @param \DateTime $createdAt
     */
    public function setDirection(\DateTime $createdAt): \DateTime
    {
        $this->createdAt = $createdAt;
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固