### ----------------------------------------------------
### -- Red
### -- Licenses: Artistic-2.0
### -- Authors: Fernando Correa de Oliveira
### -- File: examples/blog2/Person.rakumod
### ----------------------------------------------------
use Red;

model Person is rw {
    has Int  $.id            is serial;
    has Str  $.name          is column;
    has      @.posts         is relationship( *.author-id, :model<Post>);
    method active-posts { @!posts.grep: not *.deleted }
}




