Documentation ¶
Index ¶
- Constants
- func CheckID(domainCNName string, fieldCNName string, id string) error
- func RelativeDomainPath(e Entity) string
- func SnakeDomainName(e Entity) string
- func TableName(schema string, e Entity) string
- type Base
- func (e *Base) CheckFieldID(domainCNName string) error
- func (e *Base) DBSchema() string
- func (e *Base) DomainCNName() string
- func (e *Base) DomainCamelName() string
- func (e *Base) ForCreate() error
- func (e *Base) ForUpdate() error
- func (e *Base) GenerateID() error
- func (e *Base) GetID() string
- func (e *Base) IDColumnName() string
- type Entity
- type TenantIDField
- type TimeFields
- type UserIDFields
Constants ¶
View Source
const ( ColumnID = "id" ColumnTenantID = "tenant_id" ColumnCreateUserID = "create_user_id" ColumnLastUpdateUserID = "last_update_user_id" ColumnCreatedTime = "created_time" ColumnLastUpdatedTime = "last_updated_time" )
Variables ¶
This section is empty.
Functions ¶
func RelativeDomainPath ¶
func SnakeDomainName ¶
Types ¶
type Base ¶
type Base struct {
ID string `sqlmapping:"column:id;key;" sqlresult:"column:id;"`
}
func (*Base) CheckFieldID ¶
func (*Base) DomainCNName ¶
func (*Base) DomainCamelName ¶
func (*Base) GenerateID ¶
func (*Base) IDColumnName ¶
type TenantIDField ¶
type TenantIDField struct {
TenantID string `sqlmapping:"column:tenant_id;" sqlresult:"column:tenant_id;"`
}
func (*TenantIDField) CheckFieldTenantID ¶
func (field *TenantIDField) CheckFieldTenantID(domainCNName string) error
type TimeFields ¶
type UserIDFields ¶
type UserIDFields struct { CreateUserID string `sqlmapping:"column:create_user_id;" sqlresult:"column:create_user_id;"` LastUpdateUserID string `sqlmapping:"column:last_update_user_id;" sqlresult:"column:last_update_user_id;"` }
func (*UserIDFields) CheckFieldCreateUserID ¶
func (field *UserIDFields) CheckFieldCreateUserID(domainCNName string) error
func (*UserIDFields) CheckFieldLastUpdateUserID ¶
func (field *UserIDFields) CheckFieldLastUpdateUserID(domainCNName string) error
Click to show internal directories.
Click to hide internal directories.