Skip to content

Instantly share code, notes, and snippets.

@viniciusss
Created August 28, 2012 16:34
Show Gist options
  • Save viniciusss/3500123 to your computer and use it in GitHub Desktop.
Save viniciusss/3500123 to your computer and use it in GitHub Desktop.
Mapeamento tabela chat
<?php
namespace MDN\Domain\Entity\Customer\Access;
/**
*
* @Table(name="chat")
* @Entity(repositoryClass="MDN\Domain\Entity\Customer\Access\ChatRepository")
* @author Vinicius de Sa [[email protected]]
*/
class Chat {
/**
* @Id
* @Column(name="chat_id")
* @var integer
* @GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
*
* @OneToOne(targetEntity="MDN\Domain\Entity\Customer\Access\User")
* @JoinColumn(name="from", referencedColumnName="id")
*/
protected $from;
/**
*
* @OneToOne(targetEntity="MDN\Domain\Entity\Customer\Access\User")
* @JoinColumn(name="to", referencedColumnName="id")
*/
protected $to;
/**
*
* @Column(name="message", type="text")
*/
protected $message;
/**
* @Column(name="sent_at", type="datetime")
* @var DateTime
*/
protected $sentAt;
/**
* @Column(name="recd", type="integer")
* @var int
*/
protected $recd;
public function getId() {
return $this->id;
}
public function setId($id) {
$this->id = $id;
}
public function getFrom() {
return $this->from;
}
public function setFrom($from) {
$this->from = $from;
}
public function getTo() {
return $this->to;
}
public function setTo($to) {
$this->to = $to;
}
public function getMessage() {
return $this->message;
}
public function setMessage($message) {
$this->message = $message;
}
public function getSentAt() {
return $this->sentAt;
}
public function setSentAt($sentAt) {
$this->sentAt = $sentAt;
}
public function getRecd() {
return $this->recd;
}
public function setRecd($recd) {
$this->recd = $recd;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment