entity

package
v0.0.0-...-26782db Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExampleDB

func GetExampleDB(ctx context.Context, defDB *gorm.DB) *gorm.DB

GetExampleDB - Get the Example store

Types

type Example

type Example struct {
	entity.Model
	UUID    string  `gorm:"column:uuid;size:36;index;"`  // UUID code
	Code    *string `gorm:"column:code;size:50;index;"`  // Number
	Name    *string `gorm:"column:name;size:100;index;"` // Name
	Memo    *string `gorm:"column:memo;size:200;"`       // Remarks
	Status  *int    `gorm:"column:status;index;"`        // Status (1: Enable 2: Disable)
	Creator *string `gorm:"column:creator;size:36;"`     // Creator
}

Example - Example entity

func (Example) String

func (a Example) String() string

func (Example) TableName

func (a Example) TableName() string

TableName - Table Name

func (Example) ToSchemaExample

func (a Example) ToSchemaExample() *schema.Example

ToSchemaExample - Convert to Example object

type Examples

type Examples []*Example

Examples - Example list

func (Examples) ToSchemaExamples

func (a Examples) ToSchemaExamples() []*schema.Example

ToSchemaExamples - Convert to Example object list

type SchemaExample

type SchemaExample schema.Example

SchemaExample - Example object

func (SchemaExample) ToExample

func (a SchemaExample) ToExample() *Example

ToExample - Convert to Example entity

Jump to

Keyboard shortcuts

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