bottin-agenda/models/models.go
Victor Lacasse-Beaudoin 96f8dfa35e Migrate to version 2
2023-05-29 17:58:23 -04:00

19 lines
454 B
Go

package models
import "time"
var Schema = `
CREATE TABLE transactions (
id PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
membre_id VARCHAR(7),
given_at TIMESTAMP,
is_perpetual BOOLEAN
);
`
type Transaction struct {
ID string `db:"id" json:"id"`
MembreID string `db:"membre_id" json:"membre_id"`
GivenAt *time.Time `db:"given_at" json:"given_at"`
IsPerpetual bool `db:"is_perpetual" json:"is_perpetual"`
}