Documentation
¶
Index ¶
- Constants
- func Generate(inputFile, modelName string, outputDir string) error
- type GoField
- type MysqlModel
- func (model MysqlModel) GetName() string
- func (model MysqlModel) GetPrimaryKeyAsQueryStmt() string
- func (model MysqlModel) GetPrimaryKeyAsString(prefix, suffix, delimiter string, toLower bool, withGoType bool) string
- func (model MysqlModel) HasPrimaryKey() bool
- func (model MysqlModel) NeedImportTime() bool
- type MysqlTimestampTrackerType
Constants ¶
View Source
const ( MysqlTimestampTracker_Unknown = "" MysqlTimestampTracker_Time = "time.Time" MysqlTimestampTracker_TimePtr = "*time.Time" MysqlTimestampTracker_Int = "int" MysqlTimestampTracker_IntPtr = "*int" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MysqlModel ¶
type MysqlModel struct { Name string TableName string PrimaryKeys []GoField IsCreatedAt bool CreatedAtType MysqlTimestampTrackerType IsUpdatedAt bool UpdatedAtType MysqlTimestampTrackerType }
func (MysqlModel) GetName ¶
func (model MysqlModel) GetName() string
func (MysqlModel) GetPrimaryKeyAsQueryStmt ¶
func (model MysqlModel) GetPrimaryKeyAsQueryStmt() string
func (MysqlModel) GetPrimaryKeyAsString ¶
func (model MysqlModel) GetPrimaryKeyAsString(prefix, suffix, delimiter string, toLower bool, withGoType bool) string
func (MysqlModel) HasPrimaryKey ¶
func (model MysqlModel) HasPrimaryKey() bool
func (MysqlModel) NeedImportTime ¶
func (model MysqlModel) NeedImportTime() bool
type MysqlTimestampTrackerType ¶
type MysqlTimestampTrackerType string
func NewMysqlTimestampTrackerType ¶
func NewMysqlTimestampTrackerType(in string) MysqlTimestampTrackerType
Click to show internal directories.
Click to hide internal directories.