Adding MaritalStatus in db

This commit is contained in:
Marc Ducobu
2015-08-12 15:52:17 +02:00
parent 31e734f2c7
commit 3f9f58030c
7 changed files with 272 additions and 16 deletions

82
Entity/MaritalStatus.php Normal file
View File

@@ -0,0 +1,82 @@
<?php
/*
*
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, <http://www.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\PersonBundle\Entity;
/**
* MaritalStatus
*/
class MaritalStatus
{
/**
* @var string
*/
private $id;
/**
* @var string array
*/
private $name;
/**
* Get id
*
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* Set id
*
* @param string $id
* @return MaritalStatus
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Set name
*
* @param string array $name
* @return MaritalStatus
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string array
*/
public function getName()
{
return $this->name;
}
}

View File

@@ -46,10 +46,10 @@ class Person implements HasCenterInterface {
/** @var string The person's place of birth */
private $placeOfBirth = '';
/** @var \CL\Chill\MainBundle\Entity\Country The person's country of birth */
/** @var \Chill\MainBundle\Entity\Country The person's country of birth */
private $countryOfBirth;
/** @var \CL\Chill\MainBundle\Entity\Country The person's nationality */
/** @var \Chill\MainBundle\Entity\Country The person's nationality */
private $nationality;
/** @var string The person's gender */
@@ -58,7 +58,8 @@ class Person implements HasCenterInterface {
const MALE_GENDER = 'man';
const FEMALE_GENDER = 'woman';
//TO-ADD : maritalStatus
/** @var \Chill\PersonBundle\Entity\MaritalStatus The marital status of the person */
private $maritalStatus;
//TO-ADD : address
@@ -395,6 +396,29 @@ class Person implements HasCenterInterface {
return $this->memo;
}
/**
* Set maritalStatus
*
* @param \Chill\PersonBundle\Entity\MaritalStatus $maritalStatus
* @return Person
*/
public function setMaritalStatus($maritalStatus)
{
$this->maritalStatus = $maritalStatus;
return $this;
}
/**
* Get maritalStatus
*
* @return \Chill\PersonBundle\Entity\MaritalStatus
*/
public function getMaritalStatus()
{
return $this->maritalStatus;
}
/**
* Set email
*