You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

point_account.go 1.0 kB

1234567891011121314151617181920212223242526272829303132
  1. package models
  2. import "code.gitea.io/gitea/modules/timeutil"
  3. type PointAccountStatus int
  4. // Possible PointAccountStatus types.
  5. const (
  6. PointAccountNormal PointAccountStatus = iota + 1 // 1
  7. PointAccountFreeze // 2
  8. PointAccountDeleted // 3
  9. )
  10. type PointAccount struct {
  11. ID int64 `xorm:"pk autoincr"`
  12. Balance int64 `xorm:"NOT NULL DEFAULT 0"`
  13. TotalEarned int64 `xorm:"NOT NULL DEFAULT 0"`
  14. TotalConsumed int64 `xorm:"NOT NULL DEFAULT 0"`
  15. UserId int64 `xorm:"INDEX NOT NULL"`
  16. Status string `xorm:"NOT NULL"`
  17. Version int64 `xorm:"NOT NULL"`
  18. CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
  19. UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
  20. }
  21. func (account *PointAccount) Increase(amount int64) error {
  22. return nil
  23. }
  24. func (account *PointAccount) Decrease(amount int64) error {
  25. return nil
  26. }