public function addMappings(Fluent $builder)
 {
     $builder->bigIncrements('id');
     $builder->singleTableInheritance()->column('type');
     $builder->carbonDateTime('createdAt');
     $builder->carbonDateTime('updatedAt');
     $builder->events()->prePersist('onPrePersist')->preUpdate('onPreUpdate');
 }
 /**
  * Adds only properties
  *
  * @param Fluent $builder
  */
 public function addProperties(Fluent $builder)
 {
     $builder->bigIncrements('id');
     $builder->string('code');
     $builder->carbonDateTime('createdAt');
     $builder->carbonDateTime('updatedAt');
     $builder->events()->prePersist('onPrePersist')->preUpdate('onPreUpdate');
 }
Example #3
0
 /**
  * Adds only properties
  *
  * @param Fluent $builder
  */
 public function addProperties(Fluent $builder)
 {
     $builder->bigIncrements('id');
     $builder->string('username');
     $builder->carbonDateTime('lastLogin')->nullable();
     $builder->carbonDateTime('createdAt');
     $builder->carbonDateTime('updatedAt');
     $builder->events()->prePersist('onPrePersist')->preUpdate('onPreUpdate');
     $builder->embed(ValueObjects\Email::class)->noPrefix();
     $builder->embed(ValueObjects\Name::class)->noPrefix();
     $builder->embed(ValueObjects\Password::class)->noPrefix();
 }