model

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 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 BaseEntity

type BaseEntity struct {
	CreatedBy string         `json:"createdBy,omitempty" gorm:"column:sys_created_by;size:255" `
	CreatedAt *time.Time     `json:"createdAt,omitempty" gorm:"column:sys_created_at"`
	UpdatedBy string         `json:"updatedBy,omitempty" gorm:"column:sys_updated_by;size:255"`
	UpdatedAt *time.Time     `json:"updatedAt,omitempty" gorm:"column:sys_updated_at"`
	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"`
}

BaseEntity represent BaseEntity

type CountryEntity

type CountryEntity struct {
	ID        int64  `json:"ID" gorm:"primary_key;column:id"`
	Code      string `json:"code" gorm:"column:code;size:10;unique;not null"`
	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"`

	BaseEntity
}

CountryEntity represent CountryEntity

func (*CountryEntity) TableName

func (t *CountryEntity) TableName() string

TableName get real database table name

Jump to

Keyboard shortcuts

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