package models import "code.gitea.io/gitea/modules/timeutil" type PointAccountStatus int // Possible PointAccountStatus types. const ( PointAccountNormal PointAccountStatus = iota + 1 // 1 PointAccountFreeze // 2 PointAccountDeleted // 3 ) type PointAccount struct { ID int64 `xorm:"pk autoincr"` Balance int64 `xorm:"NOT NULL DEFAULT 0"` TotalEarned int64 `xorm:"NOT NULL DEFAULT 0"` TotalConsumed int64 `xorm:"NOT NULL DEFAULT 0"` UserId int64 `xorm:"INDEX NOT NULL"` Status string `xorm:"NOT NULL"` Version int64 `xorm:"NOT NULL"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` } func (account *PointAccount) Increase(amount int64) error { return nil } func (account *PointAccount) Decrease(amount int64) error { return nil }