Skip to content

Instantly share code, notes, and snippets.

@rkueny
Created October 1, 2019 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkueny/71f8b9193d9a14b121a815a458700963 to your computer and use it in GitHub Desktop.
Save rkueny/71f8b9193d9a14b121a815a458700963 to your computer and use it in GitHub Desktop.
<?php
namespace AppBundle\Entity;
class Issue
{
/**
* @var string
*
* @ORM\Id
* @ORM\Column(type="string")
*/
private $id;
/**
* @var string
*
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank()
*/
private $title;
/**
* @var string
*
* @ORM\Column(type="string", nullable=true)
*/
private $content;
/**
* @var string
*
* @ORM\Column(type="string", length=255)
*/
private $state;
/**
* @var \DateTime
*
* @ORM\Column(type="datetime")
* @Assert\DateTime()
*/
private $createdAt;
// ...
}
framework:
workflows:
issue:
marking_store:
type: single_state
arguments:
- state
supports: AppBundle\Entity\Issue
initial_place: opened
places:
- opened # créée
- affected # affectée à un utilisateur
- in_progress # en cours de traitement
- completed # terminée
- closed # clôturée
transitions:
affect:
from: opened
to: affected
treat:
from: affected
to: in_progress
complete:
from: in_progress
to: completed
close:
from: completed
to: closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment