model

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FlagDeleted = 1
	FlagActived = 0
)
View Source
var File_hopeio_model_gorm_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DeletedAt added in v0.9.0

type DeletedAt struct {

	// Represents seconds of UTC time since Unix epoch
	// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
	// 9999-12-31T23:59:59Z inclusive.
	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
	// Non-negative fractions of a second at nanosecond resolution. Negative
	// second values with fractions must still have non-negative nanos values
	// that count forward in time. Must be from 0 to 999,999,999
	// inclusive.
	Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletedAt) DeleteClauses added in v0.9.0

func (*DeletedAt) DeleteClauses(f *schema.Field) []clause.Interface

func (*DeletedAt) Descriptor deprecated added in v0.9.0

func (*DeletedAt) Descriptor() ([]byte, []int)

Deprecated: Use DeletedAt.ProtoReflect.Descriptor instead.

func (*DeletedAt) GetNanos added in v0.9.0

func (x *DeletedAt) GetNanos() int32

func (*DeletedAt) GetSeconds added in v0.9.0

func (x *DeletedAt) GetSeconds() int64

func (*DeletedAt) GormDataType added in v0.9.0

func (x *DeletedAt) GormDataType() string

func (*DeletedAt) IsValid added in v0.9.0

func (x *DeletedAt) IsValid() bool

func (*DeletedAt) MarshalGQL added in v0.9.0

func (x *DeletedAt) MarshalGQL(w io.Writer)

func (*DeletedAt) MarshalJSON added in v0.9.0

func (x *DeletedAt) MarshalJSON() ([]byte, error)

func (*DeletedAt) ProtoMessage added in v0.9.0

func (*DeletedAt) ProtoMessage()

func (*DeletedAt) ProtoReflect added in v0.9.0

func (x *DeletedAt) ProtoReflect() protoreflect.Message

func (*DeletedAt) QueryClauses added in v0.9.0

func (*DeletedAt) QueryClauses(f *schema.Field) []clause.Interface

func (*DeletedAt) Reset added in v0.9.0

func (x *DeletedAt) Reset()

func (*DeletedAt) Scan added in v0.9.0

func (x *DeletedAt) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*DeletedAt) String added in v0.9.0

func (x *DeletedAt) String() string

func (*DeletedAt) Time added in v0.9.0

func (x *DeletedAt) Time() time.Time

func (*DeletedAt) UnmarshalGQL added in v0.9.0

func (x *DeletedAt) UnmarshalGQL(v interface{}) error

func (*DeletedAt) UnmarshalJSON added in v0.9.0

func (x *DeletedAt) UnmarshalJSON(data []byte) error

func (*DeletedAt) UpdateClauses added in v0.9.0

func (*DeletedAt) UpdateClauses(f *schema.Field) []clause.Interface

func (*DeletedAt) Value added in v0.9.0

func (x *DeletedAt) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type DeletedAtInput added in v0.9.0

type DeletedAtInput = DeletedAt

type DeletedAtTimestamp added in v0.9.0

type DeletedAtTimestamp struct {
	Mills int64 `protobuf:"varint,1,opt,name=mills,proto3" json:"mills,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletedAtTimestamp) Descriptor deprecated added in v0.9.0

func (*DeletedAtTimestamp) Descriptor() ([]byte, []int)

Deprecated: Use DeletedAtTimestamp.ProtoReflect.Descriptor instead.

func (*DeletedAtTimestamp) GetMills added in v0.9.0

func (x *DeletedAtTimestamp) GetMills() int64

func (*DeletedAtTimestamp) ProtoMessage added in v0.9.0

func (*DeletedAtTimestamp) ProtoMessage()

func (*DeletedAtTimestamp) ProtoReflect added in v0.9.0

func (x *DeletedAtTimestamp) ProtoReflect() protoreflect.Message

func (*DeletedAtTimestamp) Reset added in v0.9.0

func (x *DeletedAtTimestamp) Reset()

func (*DeletedAtTimestamp) String added in v0.9.0

func (x *DeletedAtTimestamp) String() string

type Model

type Model struct {
	Id        uint64               `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"primaryKey"`
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty" gorm:"type:timestamptz(6);default:now()"`
	UpdatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty" gorm:"type:timestamptz(6)"`
	DeletedAt *DeletedAt           `protobuf:"bytes,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty" gorm:"<-:false;type:timestamptz(6);index"`
	// contains filtered or unexported fields
}

[(go.field) = {tags:'json:",inline" gorm:"embedded"'}]

func (*Model) Descriptor deprecated

func (*Model) Descriptor() ([]byte, []int)

Deprecated: Use Model.ProtoReflect.Descriptor instead.

func (*Model) GetCreatedAt

func (x *Model) GetCreatedAt() *timestamp.Timestamp

func (*Model) GetDeletedAt

func (x *Model) GetDeletedAt() *DeletedAt

func (*Model) GetId

func (x *Model) GetId() uint64

func (*Model) GetUpdatedAt

func (x *Model) GetUpdatedAt() *timestamp.Timestamp

func (*Model) ProtoMessage

func (*Model) ProtoMessage()

func (*Model) ProtoReflect

func (x *Model) ProtoReflect() protoreflect.Message

func (*Model) Reset

func (x *Model) Reset()

func (*Model) String

func (x *Model) String() string

type ModelTime

type ModelTime struct {
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,1,opt,name=createdAt,proto3" json:"createdAt,omitempty" gorm:"type:timestamptz(6);default:now();index"`
	UpdatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=updatedAt,proto3" json:"updatedAt,omitempty" gorm:"type:timestamptz(6)"`
	DeletedAt *DeletedAt           `protobuf:"bytes,3,opt,name=deletedAt,proto3" json:"deletedAt,omitempty" gorm:"<-:false;type:timestamptz(6);index"`
	// contains filtered or unexported fields
}

[(go.field) = {tags:'json:",inline" gorm:"embedded"'}]

func (*ModelTime) Descriptor deprecated

func (*ModelTime) Descriptor() ([]byte, []int)

Deprecated: Use ModelTime.ProtoReflect.Descriptor instead.

func (*ModelTime) GetCreatedAt

func (x *ModelTime) GetCreatedAt() *timestamp.Timestamp

func (*ModelTime) GetDeletedAt

func (x *ModelTime) GetDeletedAt() *DeletedAt

func (*ModelTime) GetUpdatedAt

func (x *ModelTime) GetUpdatedAt() *timestamp.Timestamp

func (*ModelTime) ProtoMessage

func (*ModelTime) ProtoMessage()

func (*ModelTime) ProtoReflect

func (x *ModelTime) ProtoReflect() protoreflect.Message

func (*ModelTime) Reset

func (x *ModelTime) Reset()

func (*ModelTime) String

func (x *ModelTime) String() string

type ModelTimeInt

type ModelTimeInt struct {
	CreatedAt int64 `protobuf:"varint,1,opt,name=createdAt,proto3" json:"createdAt,omitempty" gorm:"type:timestamptz(6);default:now();index"`
	UpdatedAt int64 `protobuf:"varint,2,opt,name=updatedAt,proto3" json:"updatedAt,omitempty" gorm:"type:timestamptz(6)"`
	DeletedAt int64 `protobuf:"varint,3,opt,name=deletedAt,proto3" json:"deletedAt,omitempty" gorm:"<-:false;type:timestamptz(6);index"`
	// contains filtered or unexported fields
}

[(go.field) = {tags:'json:",inline" gorm:"embedded"'}]

func (*ModelTimeInt) Descriptor deprecated

func (*ModelTimeInt) Descriptor() ([]byte, []int)

Deprecated: Use ModelTimeInt.ProtoReflect.Descriptor instead.

func (*ModelTimeInt) GetCreatedAt

func (x *ModelTimeInt) GetCreatedAt() int64

func (*ModelTimeInt) GetDeletedAt

func (x *ModelTimeInt) GetDeletedAt() int64

func (*ModelTimeInt) GetUpdatedAt

func (x *ModelTimeInt) GetUpdatedAt() int64

func (*ModelTimeInt) ProtoMessage

func (*ModelTimeInt) ProtoMessage()

func (*ModelTimeInt) ProtoReflect

func (x *ModelTimeInt) ProtoReflect() protoreflect.Message

func (*ModelTimeInt) Reset

func (x *ModelTimeInt) Reset()

func (*ModelTimeInt) String

func (x *ModelTimeInt) String() string

type ModelTimeStr

type ModelTimeStr struct {
	CreatedAt string `protobuf:"bytes,1,opt,name=createdAt,proto3" json:"createdAt,omitempty" gorm:"type:timestamptz(6);default:now();index"`
	UpdatedAt string `protobuf:"bytes,2,opt,name=updatedAt,proto3" json:"updatedAt,omitempty" gorm:"type:timestamptz(6)"`
	DeletedAt string `protobuf:"bytes,3,opt,name=deletedAt,proto3" json:"deletedAt,omitempty" gorm:"<-:false;type:timestamptz(6);index"`
	// contains filtered or unexported fields
}

[(go.field) = {tags:'json:",inline" gorm:"embedded"'}]

func (*ModelTimeStr) Descriptor deprecated

func (*ModelTimeStr) Descriptor() ([]byte, []int)

Deprecated: Use ModelTimeStr.ProtoReflect.Descriptor instead.

func (*ModelTimeStr) GetCreatedAt

func (x *ModelTimeStr) GetCreatedAt() string

func (*ModelTimeStr) GetDeletedAt

func (x *ModelTimeStr) GetDeletedAt() string

func (*ModelTimeStr) GetUpdatedAt

func (x *ModelTimeStr) GetUpdatedAt() string

func (*ModelTimeStr) ProtoMessage

func (*ModelTimeStr) ProtoMessage()

func (*ModelTimeStr) ProtoReflect

func (x *ModelTimeStr) ProtoReflect() protoreflect.Message

func (*ModelTimeStr) Reset

func (x *ModelTimeStr) Reset()

func (*ModelTimeStr) String

func (x *ModelTimeStr) String() string

Jump to

Keyboard shortcuts

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