asset

package
v0.0.0-...-9493ce7 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Util = &util{}
)

Functions

This section is empty.

Types

type IAsset

type IAsset interface {
	// 获取Hash Key
	GetHashKey() string
	// 获取资产Key
	GetAssetKey() string
	// 获取资产脏标志Key
	GetAssetDirtyFlagKey() string
	// 序列化
	Marshal() (s string, err error)
	// 反序列化
	Unmarshal(s string) (err error)
	// 新建对象
	New() IAsset
	// 克隆对象
	Clone() IAsset
}

资产接口

type UserAsset

type UserAsset struct {
	gorm.Model `json:"-"`
	Nickname   string `json:"nickname"`
	Avatar     string `json:"avatar"`
	Balance    int64  `json:"balance"`
}

UserAsset 用户资产

func (*UserAsset) Clone

func (object *UserAsset) Clone() IAsset

Clone 复制对象

func (*UserAsset) GetAssetDirtyFlagKey

func (object *UserAsset) GetAssetDirtyFlagKey() string

GetAssetDirtyFlagKey 资产脏标志Key

func (*UserAsset) GetAssetKey

func (object *UserAsset) GetAssetKey() string

GetAssetKey 资产Key

func (*UserAsset) GetHashKey

func (object *UserAsset) GetHashKey() string

GetHashKey Hash存储Key

func (*UserAsset) Marshal

func (object *UserAsset) Marshal() (s string, err error)

Marshal 序列化

func (*UserAsset) New

func (object *UserAsset) New() IAsset

New 新建对象

func (*UserAsset) String

func (object *UserAsset) String() string

String 字符串描述

func (*UserAsset) TableName

func (object *UserAsset) TableName() string

TableName 表名

func (*UserAsset) Unmarshal

func (object *UserAsset) Unmarshal(s string) (err error)

Unmarshal 反序列化

Jump to

Keyboard shortcuts

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