|
|
|
|
|
by librasteve
744 days ago
|
|
personally, I prefer the style of raku Red ORM https://raku.land/zef:FCO/Red use Red:api<2>;
model User is rw {
has Int $.id is serial;
has Str $.name is column;
has Str $.email is column{ :unique };
has Str $.password is column{ :nullable } is rw;
has DateTime $.created-at is column .= now;
has DateTime $.updated-at is column .= now;
}
my $*RED-DB = database "SQLite";
User.^create-table;
|
|