model

package
v0.0.0-...-3716ba0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseMapper

type BaseMapper[T any] struct {
}

func (BaseMapper[T]) Delete

func (m BaseMapper[T]) Delete(entity T) (err error)

func (BaseMapper[T]) Detail

func (m BaseMapper[T]) Detail(entity T) (res T, err error)

func (BaseMapper[T]) Insert

func (m BaseMapper[T]) Insert(entity T) (err error)

func (BaseMapper[T]) List

func (m BaseMapper[T]) List(entity T) (res []T, err error)

func (BaseMapper[T]) Update

func (m BaseMapper[T]) Update(entity T) (err error)

type Repository

type Repository struct {
	Id            int64      `json:"id"`
	GithubId      int64      `json:"github_id"`
	Name          string     `json:"name"`
	FullName      string     `json:"full_name"`
	Description   string     `json:"description"`
	DefaultBranch string     `json:"master_branch"`
	CreatedAt     *time.Time `json:"created_at"` // 时间可以设置为Null
	PushedAt      *time.Time `json:"pushed_at"`
	UpdatedAt     *time.Time `json:"updated_at"`
}

type UserInfo

type UserInfo struct {
	Id        int64  `json:"id" gorm:"column:id"`
	Username  string `json:"username" gorm:"column:username"`
	AvatarUrl string `json:"avatar_url" gorm:"column:avatar_url"`
	GithubId  int64  `json:"github_id" gorm:"column:github_id"` // 设置唯一索引

}

Jump to

Keyboard shortcuts

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