bottin-agenda/models/models.go

20 lines
461 B
Go
Raw Normal View History

2023-05-29 17:58:23 -04:00
package models
import "time"
var Schema = `
CREATE TABLE transactions (
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
2023-05-29 17:58:23 -04:00
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"`
}