Skip to content
This repository has been archived by the owner on Aug 29, 2021. It is now read-only.

Commit

Permalink
noop(infra) toSQL() needed by future seek subcmd
Browse files Browse the repository at this point in the history
  • Loading branch information
jzacsh committed Jun 1, 2017
1 parent e93fb36 commit 17f5b5c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/punch/schema.go
Expand Up @@ -117,6 +117,20 @@ func (raw *CardSchemaSQL) toCard() *CardSchema {
}
}

func (card *CardSchema) toSQL() *CardSchemaSQL {
var statusNum int
if card.IsStart {
statusNum = 1
}

return &CardSchemaSQL{
Punch: int(card.Punch.Unix()),
Status: statusNum,
Project: card.Project,
Note: toNullString(strings.TrimSpace(card.Note)),
}
}

type Session struct {
StartAt time.Time
StopAt time.Time
Expand Down

0 comments on commit 17f5b5c

Please sign in to comment.