19 lines
454 B
Go
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"`
|
|
}
|