entity

package
v0.0.0-...-6f9dc6e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	gorm.BigIdField
	Name      string `json:"name" gorm:"column:name"`
	Phone     string `json:"phone" gorm:"column:phone"`
	IsDefault uint32 `json:"is_default" gorm:"column:is_default"`
	PostCode  string `json:"post_code" gorm:"column:post_code"`
	Province  string `json:"province" gorm:"column:province"`
	City      string `json:"city" gorm:"column:city"`
	Region    string `json:"region" gorm:"column:region"`
	Detail    string `json:"detail" gorm:"column:detail"`
	MemberId  uint64 `json:"member_id" gorm:"column:member_id"`
	gorm.CreatedAtField
	gorm.UpdatedAtFiled
	gorm.SoftDeleteField
}

func (Address) TableName

func (a Address) TableName() string

type Gender

type Gender int8
const (
	GenderUnknown Gender = iota
	GenderMan
	GenderWoman
)

func (Gender) String

func (g Gender) String() string

type LoginType

type LoginType int8
const (
	LoginTypePc LoginType = iota + 1
	LoginTypeAndroid
	LoginTypeIos
	LoginTypeMinProgram
)

func (LoginType) String

func (l LoginType) String() string

type Member

type Member struct {
	gorm.BigIdField
	MemberLevelId         uint64       `json:"member_level_id" gorm:"column:member_level_id"`
	Username              string       `json:"username" gorm:"column:username;uniqueIndex:uk_username"`
	Password              string       `json:"password" gorm:"column:password"`
	Phone                 string       `json:"phone" gorm:"column:phone"`
	Status                MemberStatus `json:"status" gorm:"column:status;default:1"`
	Icon                  string       `json:"icon" gorm:"column:icon"`
	Gender                Gender       `json:"gender" gorm:"column:gender"`
	Birthday              *time.Time   `json:"birthday" gorm:"column:birthday;default:null"`
	City                  string       `json:"city" gorm:"column:city"`
	Job                   string       `json:"job" gorm:"column:job"`
	PersonalizedSignature string       `json:"signature" gorm:"column:signature"`
	SourceType            SourceType   `json:"source_type" gorm:"column:source_type"`
	Integration           int          `json:"integration" gorm:"column:integration"`
	Growth                int32        `json:"growth" gorm:"column:growth"`
	LuckyCount            int          `json:"lucky_count" gorm:"column:lucky_count"`
	HistoryIntegration    int          `json:"history_integration" gorm:"column:history_integration"`
	gorm.CreatedAtField
	gorm.UpdatedAtFiled
	gorm.SoftDeleteField
}

func (Member) TableName

func (m Member) TableName() string

type MemberLevel

type MemberLevel struct {
	gorm.BigIdField
	Name                 string `json:"name" gorm:"column:username;uniqueIndex:uk_username"`
	GrowthPoint          int    `json:"growth_point" gorm:"column:growth_point"`
	IsDefault            int8   `json:"is_default" gorm:"column:is_default"`
	CommentGrowthPoint   int8   `json:"comment_growth_point" gorm:"column:comment_growth_point"`
	PrivilegeFreeFreight int8   `json:"privilege_free_freight" gorm:"column:privilege_free_freight"`
	PrivilegeSignIn      int8   `json:"privilege_sign_in" gorm:"column:privilege_sign_in"`
	PrivilegeComment     int8   `json:"privilege_comment" gorm:"column:privilege_comment"`
	PrivilegePromotion   int8   `json:"privilege_promotion" gorm:"column:privilege_promotion"`
	PrivilegeMemberPrice int8   `json:"privilege_member_price" gorm:"column:privilege_member_price"`
	PrivilegeBirthday    int8   `json:"privilege_birthday" gorm:"column:privilege_birthday"`
	gorm.CreatedAtField
	gorm.UpdatedAtFiled
	gorm.SoftDeleteField
}

func (MemberLevel) TableName

func (l MemberLevel) TableName() string

type MemberLoginLog

type MemberLoginLog struct {
	gorm.BigIdField
	LoginType string `json:"login_type" gorm:"column:login_type"`
	Ip        string `json:"ip" gorm:"column:ip"`
	Province  string `json:"province" gorm:"column:province"`
	City      string `json:"city" gorm:"column:city"`
	MemberId  uint64 `json:"member_id" gorm:"column:member_id"`
	gorm.CreatedAtField
	gorm.UpdatedAtFiled
	gorm.SoftDeleteField
}

func (MemberLoginLog) TableName

func (l MemberLoginLog) TableName() string

type MemberStatus

type MemberStatus int8
const (
	StatusDisable MemberStatus = iota
	StatusEnable
)

func (MemberStatus) String

func (m MemberStatus) String() string

type SourceType

type SourceType int8

func (SourceType) String

func (s SourceType) String() string

Jump to

Keyboard shortcuts

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