panel/models/user.moon

14 lines
265 B
Plaintext
Raw Normal View History

2015-01-05 22:51:12 +00:00
import Model from require "lapis.db.model"
export class Users extends Model
@timestamp: true
write_session: (r) =>
r.session.user = @id
2015-01-08 21:54:41 +00:00
r.session.name = @name
2015-01-08 21:22:26 +00:00
read_session: (r) =>
if r.session.user
return @find id: r.session.user
nil