dataobject

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLASSES_COLUMN_ID         = "id"
	CLASSES_COLUMN_CLASS_NO   = "class_no"
	CLASSES_COLUMN_USER_ID    = "user_id"
	CLASSES_COLUMN_CREATED_AT = "created_at"
	CLASSES_COLUMN_UPDATED_AT = "updated_at"
)
View Source
const (
	USERS_COLUMN_ID         = "id"
	USERS_COLUMN_NAME       = "name"
	USERS_COLUMN_PHONE      = "phone"
	USERS_COLUMN_SEX        = "sex"
	USERS_COLUMN_EMAIL      = "email"
	USERS_COLUMN_DISABLE    = "disable"
	USERS_COLUMN_BALANCE    = "balance"
	USERS_COLUMN_SEX_NAME   = "sex_name"
	USERS_COLUMN_CREATED_AT = "created_at"
	USERS_COLUMN_UPDATED_AT = "updated_at"
)

Variables

View Source
var TableNameClasses = "classes" //
View Source
var TableNameUsers = "users" //

Functions

This section is empty.

Types

type ClassesDO

type ClassesDO struct {
	Id        int32  `json:"id,omitempty" db:"id" `                                 //incr id
	ClassNo   string `json:"class_no,omitempty" db:"class_no" `                     //class no
	UserId    int32  `json:"user_id,omitempty" db:"user_id" `                       //student id
	CreatedAt string `json:"created_at,omitempty" db:"created_at" sqlca:"readonly"` //create time
	UpdatedAt string `json:"updated_at,omitempty" db:"updated_at" sqlca:"readonly"` //update time
}

func (*ClassesDO) GetClassNo

func (do *ClassesDO) GetClassNo() string

func (*ClassesDO) GetCreatedAt

func (do *ClassesDO) GetCreatedAt() string

func (*ClassesDO) GetId

func (do *ClassesDO) GetId() int32

func (*ClassesDO) GetUpdatedAt

func (do *ClassesDO) GetUpdatedAt() string

func (*ClassesDO) GetUserId

func (do *ClassesDO) GetUserId() int32

func (*ClassesDO) SetClassNo

func (do *ClassesDO) SetClassNo(v string)

func (*ClassesDO) SetCreatedAt added in v1.2.10

func (do *ClassesDO) SetCreatedAt(v string)

func (*ClassesDO) SetId

func (do *ClassesDO) SetId(v int32)

func (*ClassesDO) SetUpdatedAt added in v1.2.10

func (do *ClassesDO) SetUpdatedAt(v string)

func (*ClassesDO) SetUserId

func (do *ClassesDO) SetUserId(v int32)

type UsersDO

type UsersDO struct {
	Id        uint32  `json:"id,omitempty" db:"id" `                                 //auto inc id
	Name      string  `json:"name,omitempty" db:"name" `                             //user name
	Phone     string  `json:"phone,omitempty" db:"phone" `                           //phone number
	Sex       uint8   `json:"sex,omitempty" db:"sex" `                               //user sex
	Email     string  `json:"email,omitempty" db:"email" `                           //email
	Disable   int8    `json:"disable,omitempty" db:"disable" `                       //disabled(0=false 1=true)
	Balance   float64 `json:"balance,omitempty" db:"balance" `                       //balance of decimal
	SexName   string  `json:"sex_name,omitempty" db:"sex_name" `                     //sex name
	CreatedAt string  `json:"created_at,omitempty" db:"created_at" sqlca:"readonly"` //create time
	UpdatedAt string  `json:"updated_at,omitempty" db:"updated_at" sqlca:"readonly"` //update time
}

func (*UsersDO) GetBalance

func (do *UsersDO) GetBalance() float64

func (*UsersDO) GetCreatedAt

func (do *UsersDO) GetCreatedAt() string

func (*UsersDO) GetDisable

func (do *UsersDO) GetDisable() int8

func (*UsersDO) GetEmail

func (do *UsersDO) GetEmail() string

func (*UsersDO) GetId

func (do *UsersDO) GetId() uint32

func (*UsersDO) GetName

func (do *UsersDO) GetName() string

func (*UsersDO) GetPhone

func (do *UsersDO) GetPhone() string

func (*UsersDO) GetSex

func (do *UsersDO) GetSex() uint8

func (*UsersDO) GetSexName added in v1.2.10

func (do *UsersDO) GetSexName() string

func (*UsersDO) GetUpdatedAt

func (do *UsersDO) GetUpdatedAt() string

func (*UsersDO) SetBalance

func (do *UsersDO) SetBalance(v float64)

func (*UsersDO) SetCreatedAt added in v1.2.10

func (do *UsersDO) SetCreatedAt(v string)

func (*UsersDO) SetDisable

func (do *UsersDO) SetDisable(v int8)

func (*UsersDO) SetEmail

func (do *UsersDO) SetEmail(v string)

func (*UsersDO) SetId

func (do *UsersDO) SetId(v uint32)

func (*UsersDO) SetName

func (do *UsersDO) SetName(v string)

func (*UsersDO) SetPhone

func (do *UsersDO) SetPhone(v string)

func (*UsersDO) SetSex

func (do *UsersDO) SetSex(v uint8)

func (*UsersDO) SetSexName added in v1.2.10

func (do *UsersDO) SetSexName(v string)

func (*UsersDO) SetUpdatedAt added in v1.2.10

func (do *UsersDO) SetUpdatedAt(v string)

Jump to

Keyboard shortcuts

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