Documentation ¶
Index ¶
- Variables
- func Scan(data any, value any) error
- func UserModelAddress(x string) mysqlx.Option
- func UserModelId(x int32) mysqlx.Option
- func UserModelName(x string) mysqlx.Option
- func Value(data any) (any, error)
- type Status
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAddress() string
- func (x *User) GetAuthor() *User_Author
- func (x *User) GetBalance() float64
- func (x *User) GetCreateTime() *timestamp.Timestamp
- func (x *User) GetD1() int64
- func (x *User) GetDate() *timestamp.Timestamp
- func (x *User) GetDeletedTime() *timestamp.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetExtra() []byte
- func (x *User) GetId() int32
- func (x *User) GetIds() []int32
- func (x *User) GetM1() map[string]string
- func (x *User) GetName() string
- func (x *User) GetPhone() string
- func (x *User) GetScore() float32
- func (x *User) GetStatus() Status
- func (x *User) GetStatus1() Status
- func (x *User) GetStatus2() Status
- func (x *User) GetT1() int64
- func (x *User) GetT2() uint64
- func (x *User) GetT3() string
- func (x *User) GetUpdateTime() *timestamp.Timestamp
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (x *User) UserModel() (*UserModel, error)
- type UserModel
- type UserModelIdsList
- type UserModelM1Map
- type User_Author
- func (*User_Author) Descriptor() ([]byte, []int)deprecated
- func (x *User_Author) GetDeletedTime() *timestamp.Timestamp
- func (x *User_Author) GetEmail() string
- func (x *User_Author) GetName() string
- func (*User_Author) ProtoMessage()
- func (x *User_Author) ProtoReflect() protoreflect.Message
- func (x *User_Author) Reset()
- func (x *User_Author) String() string
- func (x *User_Author) User_AuthorModel() (*User_AuthorModel, error)
- type User_AuthorModel
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Status_name = map[int32]string{ 0: "UNKNOWN", 1: "PENDING", } Status_value = map[string]int32{ "UNKNOWN": 0, "PENDING": 1, } )
Enum value maps for Status.
View Source
var File_model_proto protoreflect.FileDescriptor
Functions ¶
func UserModelAddress ¶
func UserModelId ¶
func UserModelName ¶
Types ¶
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type User ¶
type User struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` Score float32 `protobuf:"fixed32,6,opt,name=score,proto3" json:"score,omitempty"` Balance float64 `protobuf:"fixed64,7,opt,name=balance,proto3" json:"balance,omitempty"` CreateTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` UpdateTime *timestamp.Timestamp `protobuf:"bytes,9,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` DeletedTime *timestamp.Timestamp `protobuf:"bytes,11,opt,name=deleted_time,json=deletedTime,proto3" json:"deleted_time,omitempty"` Date *timestamp.Timestamp `protobuf:"bytes,10,opt,name=date,proto3" json:"date,omitempty"` Extra []byte `protobuf:"bytes,12,opt,name=extra,proto3" json:"extra,omitempty"` Author *User_Author `protobuf:"bytes,13,opt,name=author,proto3" json:"author,omitempty"` Status Status `protobuf:"varint,14,opt,name=status,proto3,enum=model.Status" json:"status,omitempty"` Status1 Status `protobuf:"varint,15,opt,name=status1,proto3,enum=model.Status" json:"status1,omitempty"` Status2 Status `protobuf:"varint,16,opt,name=status2,proto3,enum=model.Status" json:"status2,omitempty"` T1 int64 `protobuf:"varint,18,opt,name=t1,proto3" json:"t1,omitempty"` T2 uint64 `protobuf:"varint,19,opt,name=t2,proto3" json:"t2,omitempty"` T3 string `protobuf:"bytes,20,opt,name=t3,proto3" json:"t3,omitempty"` D1 int64 `protobuf:"varint,21,opt,name=d1,proto3" json:"d1,omitempty"` Ids []int32 `protobuf:"varint,22,rep,packed,name=ids,proto3" json:"ids,omitempty"` M1 map[string]string `` /* 146-byte string literal not displayed */ // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetAddress ¶
func (*User) GetAuthor ¶
func (x *User) GetAuthor() *User_Author
func (*User) GetBalance ¶
func (*User) GetCreateTime ¶
func (*User) GetDeletedTime ¶
func (*User) GetStatus1 ¶
func (*User) GetStatus2 ¶
func (*User) GetUpdateTime ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserModel ¶
type UserModel struct { Id int32 `gorm:"column:id;type:bigint;primaryKey" json:"id,omitempty"` Name string `gorm:"column:name;index:idx_name_addr,unique" json:"name,omitempty"` Email string `gorm:"column:email" json:"email,omitempty"` Address string `gorm:"column:address;index:idx_name_addr,unique" json:"address,omitempty"` Phone string `gorm:"column:phone" json:"phone,omitempty"` Score float32 `gorm:"column:score;type:decimal(10,2) unsigned;not null" json:"score,omitempty"` Balance float64 `gorm:"column:balance" json:"balance,omitempty"` CreateTime time.Time `gorm:"column:create_time;type:datetime;autoCreateTime;not null" json:"create_time,omitempty"` UpdateTime time.Time `gorm:"column:update_time;type:datetime;autoUpdateTime;not null" json:"update_time,omitempty"` DeletedTime time.Time `gorm:"column:deleted_time;type:datetime;not null" json:"deleted_time,omitempty"` Date datatypes.Date `gorm:"column:date;type:date" json:"date,omitempty"` Extra []byte `gorm:"column:extra;type:tinyblob;default:'abc'" json:"extra,omitempty"` Author *User_AuthorModel `gorm:"-" json:"author,omitempty"` Status string `gorm:"column:status;type:enum('PENDING','UNKNOWN');default:'UNKNOWN'" json:"status,omitempty"` Status1 string `gorm:"column:status1;default:'UNKNOWN'" json:"status1,omitempty"` Status2 Status `gorm:"column:status2;type:int;default:0" json:"status2,omitempty"` T1 time.Time `gorm:"column:t1;type:datetime;autoCreateTime;not null" json:"t1,omitempty"` T2 time.Time `gorm:"column:t2;type:datetime;autoUpdateTime;not null" json:"t2,omitempty"` T3 time.Time `gorm:"column:t3;type:datetime;not null" json:"t3,omitempty"` D1 datatypes.Date `gorm:"column:d1;type:date" json:"d1,omitempty"` Ids UserModelIdsList `gorm:"column:ids;type:longtext" json:"ids,omitempty"` M1 UserModelM1Map `gorm:"column:m1;type:longtext" json:"m1,omitempty"` }
GormModel is an option for User
type UserModelIdsList ¶
type UserModelIdsList []int32
func (*UserModelIdsList) Scan ¶
func (x *UserModelIdsList) Scan(value any) error
type UserModelM1Map ¶
func (*UserModelM1Map) Scan ¶
func (x *UserModelM1Map) Scan(value any) error
type User_Author ¶
type User_Author struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` DeletedTime *timestamp.Timestamp `protobuf:"bytes,11,opt,name=deleted_time,json=deletedTime,proto3" json:"deleted_time,omitempty"` // contains filtered or unexported fields }
func (*User_Author) Descriptor
deprecated
func (*User_Author) Descriptor() ([]byte, []int)
Deprecated: Use User_Author.ProtoReflect.Descriptor instead.
func (*User_Author) GetDeletedTime ¶
func (x *User_Author) GetDeletedTime() *timestamp.Timestamp
func (*User_Author) GetEmail ¶
func (x *User_Author) GetEmail() string
func (*User_Author) GetName ¶
func (x *User_Author) GetName() string
func (*User_Author) ProtoMessage ¶
func (*User_Author) ProtoMessage()
func (*User_Author) ProtoReflect ¶
func (x *User_Author) ProtoReflect() protoreflect.Message
func (*User_Author) Reset ¶
func (x *User_Author) Reset()
func (*User_Author) String ¶
func (x *User_Author) String() string
func (*User_Author) User_AuthorModel ¶
func (x *User_Author) User_AuthorModel() (*User_AuthorModel, error)
type User_AuthorModel ¶
type User_AuthorModel struct { Name string `gorm:"column:name" json:"name,omitempty"` Email string `gorm:"column:email" json:"email,omitempty"` DeletedTime gorm.DeletedAt `gorm:"column:deleted_time;type:datetime;index:idx_deleted_time" json:"deleted_time,omitempty"` }
GormModel is an option for User_Author
func (*User_AuthorModel) User_Author ¶
func (x *User_AuthorModel) User_Author() (*User_Author, error)
Click to show internal directories.
Click to hide internal directories.