// データを保存する
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
}
Exemple #2
0
func (m *Member) Save(tx *dbr.Tx) error {

	_, err := tx.InsertInto("member").
		Columns("number", "name", "position", "created_at").
		Record(m).
		Exec()

	return err
}
Exemple #3
0
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
}