Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Define ¶
type Define struct { Fields Fields `json:"fields"` Extend ztype.Map `json:"extend"` Relations map[string]*ModelRelation `json:"relations"` // Hook func(name string, m *Model) error `json:"-"` Table Table `json:"table"` Name string `json:"name"` Values ztype.Maps `json:"values"` Options ModelOptions `json:"options"` }
type Field ¶
type Field struct { Default interface{} `json:"default"` Unique interface{} `json:"unique"` Index interface{} `json:"index"` Comment string `json:"comment"` Label string `json:"label"` Type schema.DataType `json:"type"` Validations []Validations `json:"validations"` Options FieldOption `json:"ModelOptions"` Before []string `json:"before"` After []string `json:"after"` ValidRules zvalid.Engine Size uint64 `json:"size"` Nullable bool `json:"nullable"` }
func (*Field) GetValidations ¶
type FieldOption ¶
type ModelOptions ¶
type ModelOptions struct { Salt string `json:"crypt_salt"` LowFields []string `json:"low_fields"` FieldsSort []string `json:"fields_sort"` CryptLen int `json:"crypt_len"` DisabledMigrator bool `json:"disabled_migrator"` SoftDeletes bool `json:"soft_deletes"` Timestamps bool `json:"timestamps"` CryptID bool `json:"crypt_id"` }
type ModelRelation ¶
type Validations ¶
Click to show internal directories.
Click to hide internal directories.