add repository for center

This commit is contained in:
Julien Fastré 2018-10-19 14:27:46 +02:00
parent 25f5503030
commit 62ee90f671
4 changed files with 37 additions and 1 deletions

View File

@ -20,5 +20,5 @@ Master branch
- layout of page "list exports"
- create function "SIMILARITY" (see [posgtgresql documentation](https://www.postgresql.org/docs/9.6/static/pgtrgm.html))
- create function "OVERLAPSI", which will detect period of date overlapping, replacing NULL date by infinity or -infinity (see [postgresql page for date time function and operators](https://www.postgresql.org/docs/9.6/static/functions-datetime.html))
- add repository for Center class

View File

@ -0,0 +1,27 @@
<?php
/*
* Copyright (C) 2018 Champs-Libres <info@champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\MainBundle\Repository;
/**
*
*
*/
class CenterRepository extends \Doctrine\ORM\EntityRepository
{
}

View File

@ -1,6 +1,7 @@
Chill\MainBundle\Entity\Center:
type: entity
table: centers
repositoryClass: Chill\MainBundle\Repository\CenterRepository
id:
id:
type: integer

View File

@ -24,4 +24,12 @@ services:
- "Chill\\MainBundle\\Entity\\PostalCode"
Chill\MainBundle\Repository\PostalCodeRepository: '@chill.main.postalcode_repository'
chill.main.center_repository:
class: Doctrine\ORM\EntityRepository
factory: ["@doctrine.orm.entity_manager", getRepository]
arguments:
- "Chill\\MainBundle\\Entity\\Center"
Chill\MainBundle\Repository\CenterRepository: '@chill.main.center_repository'