entity

package
v0.0.0-...-bf9679a Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	ID           string `gorm:"type:char(5)"`
	Address      string `gorm:"not null"`
	VillageID    string `gorm:"not null;type:char(10)"`
	VillageName  string `gorm:"not null;size:255"`
	DistrictID   string `gorm:"not null;type:char(7)"`
	DistrictName string `gorm:"not null;size:255"`
	RegencyID    string `gorm:"not null;type:char(4)"`
	RegencyName  string `gorm:"not null;size:255"`
	ProvinceID   string `gorm:"not null;type:char(2)"`
	ProvinceName string `gorm:"not null;size:255"`
	CreatedAt    time.Time
	UpdatedAt    time.Time
	DeletedAt    gorm.DeletedAt `gorm:"index"`
}

type Admin

type Admin struct {
	ID        string `gorm:"type:char(4)"`
	Username  string `gorm:"not null;size:20;unique"`
	Name      string `gorm:"not null;size:50"`
	Password  string `gorm:"not null;size:60"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

type District

type District struct {
	ID      string
	Name    string
	Regency Regency
}

type Group

type Group struct {
	ID            string         `gorm:"type:char(5)"`
	Name          string         `gorm:"not null;size:80"`
	Leader        string         `gorm:"not null;size:80"`
	Address       Address        `gorm:"foreignKey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	Properties    []Property     `gorm:"foreignKey:GroupID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	ShowSchedules []ShowSchedule `gorm:"foreignKey:GroupID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	CreatedAt     time.Time
	UpdatedAt     time.Time
	DeletedAt     gorm.DeletedAt `gorm:"index"`
}

type Property

type Property struct {
	ID          string `gorm:"type:char(9)"`
	Name        string `gorm:"not null;size:80"`
	Description string `gorm:"not null"`
	Amount      uint16 `gorm:"not null"`
	GroupID     string `gorm:"type:char(5);not null"`
	CreatedAt   time.Time
	UpdatedAt   time.Time
	DeletedAt   gorm.DeletedAt `gorm:"index"`
}

type Province

type Province struct {
	ID   string
	Name string
}

type Regency

type Regency struct {
	ID       string
	Name     string
	Province Province
}

type ShowSchedule

type ShowSchedule struct {
	ID        string    `gorm:"type:char(9)"`
	GroupID   string    `gorm:"type:char(5); not null"`
	Place     string    `gorm:"not null"`
	StartOn   time.Time `gorm:"not null"`
	FinishOn  time.Time `gorm:"not null"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

type Village

type Village struct {
	ID       string
	Name     string
	District District
}

Jump to

Keyboard shortcuts

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