model

package
Version: v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	CreatedBy string         `json:"createdBy,omitempty" gorm:"column:sys_created_by;size:255" `
	CreatedAt *time.Time     `json:"createdAt,omitempty" gorm:"column:sys_created_at" sql:"index"`
	UpdatedBy string         `json:"updatedBy,omitempty" gorm:"column:sys_updated_by;size:255"`
	UpdatedAt *time.Time     `json:"updatedAt,omitempty" gorm:"column:sys_updated_at" sql:"index"`
	DeletedBy string         `json:"deletedBy,omitempty" gorm:"column:sys_deleted_by;size:255"`
	DeletedAt gorm.DeletedAt `json:"deletedAt,omitempty" gorm:"column:deleted_at;index:idx_delete_at" sql:"index"`
}

BaseModel represent BaseModel

type Country

type Country struct {
	ID        int64  `json:"ID" gorm:"primary_key;column:id"`
	Code      string `json:"code" gorm:"column:code;size:10;unique;not null" sql:"index"`
	Name      string `json:"name" gorm:"column:name;size:255;not null"`
	ISO2Code  string `json:"ISO2Code" gorm:"column:iso2code;size:5;not null"`
	ISO3Code  string `json:"ISO3Code" gorm:"column:iso3code;size:10"`
	WHORegion string `json:"WHORegion" gorm:"column:who_region;size:20"`

	BaseModel
}

Country represent Country

func (Country) TableName

func (t Country) TableName() string

TableName get real database table name

Source Files

Jump to

Keyboard shortcuts

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