model

package
v0.0.0-...-a330f29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ID         uint64    `json:"id" xorm:"not null pk autoincr BIGINT(20) id"`
	Amount     int       `json:"amount" xorm:"not null DECIMAL(10,2) amount"`
	Kind       string    `json:"type" xorm:"not null VARCHAR(10) kind"`
	TagId      uint64    `json:"tag_id" xorm:"not null BIGINT(20) tag_id"`
	UserId     uint64    `json:"user_id" xorm:"not null BIGINT(20) user_id"`
	HappenedAt time.Time `json:"happened_at" xorm:"not null DATETIME happened_at"`
	CreatedAt  time.Time `json:"-" xorm:"created TIMESTAMP created_at"`
	UpdatedAt  time.Time `json:"-" xorm:"updated TIMESTAMP updated_at"`
}

func (*Item) TableName

func (i *Item) TableName() string

type Tag

type Tag struct {
	ID        uint64    `xorm:"not null pk autoincr BIGINT(20) id" json:"id"`
	Name      string    `xorm:"not null VARCHAR(30) name" json:"name"`
	Kind      string    `xorm:"not null VARCHAR(10) kind" json:"kind"`
	Sign      string    `xorm:"not null CHAR(1) sign" json:"sign"`
	UserId    uint64    `xorm:"not null BIGINT(20) user_id" json:"user_id"`
	CreatedAt time.Time `xorm:"created TIMESTAMP created_at" json:"created_at"`
	UpdatedAt time.Time `xorm:"updated TIMESTAMP updated_at" json:"updated_at"`
}

func (*Tag) TableName

func (t *Tag) TableName() string

type User

type User struct {
	ID        uint64    `xorm:"not null pk autoincr BIGINT(20) id"`
	CreatedAt time.Time `xorm:"created TIMESTAMP created_at"`
	UpdatedAt time.Time `xorm:"updated TIMESTAMP updated_at"`
	Email     string    `xorm:"not null VARCHAR(100) unique index email"`
}

func (User) TableName

func (u User) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL