// データを保存する func (p *UPoint) Save(tx *dbr.Tx) error { _, err := tx.InsertInto("u_point"). Columns("account_id", "m_point_id", "value", "created_at", "updated_at"). Record(p). Exec() return err }
func (m *Member) Save(tx *dbr.Tx) error { _, err := tx.InsertInto("member"). Columns("number", "name", "position", "created_at"). Record(m). Exec() return err }
func (s *Snippet) Save(tx *dbr.Tx) error { _, err := tx.InsertInto("snippets"). Columns("snippet_id", "snippet_title", "snippet_text", "user_id", "created_at", "updated_at"). Record(s). Exec() return err }