models

package
v0.0.0-...-e9d4ddd Latest Latest
Warning

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

Go to latest
Published: Apr 14, 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 Address

type Address struct {
	ProvinceID string `bson:"province_id" json:"province_id"`
	RegencyID  string `bson:"regency_id" json:"regency_id"`
	DistrictID string `bson:"district_id" json:"district_id"`
	VillageID  string `bson:"village_id" json:"village_id"`
	RT         string `json:"RT"`
	RW         string `json:"RW"`
	Street     string `json:"street"`
}

Address represent ddress model

type District

type District struct {
	ID       string    `json:"id"`
	Name     string    `json:"name"`
	Villages []Village `json:"villages"`
}

District represent district model

type Haven

type Haven struct {
	Name         string  `json:"name"`
	Phone        string  `json:"phone"`
	Address      Address `json:"address"`
	Relationship string  `json:"relationship"`
	RtName       string  `json:"rt_name"`
}

Haven represent haven model

type Login

type Login struct {
	Username string `form:"username" json:"username"`
	Password string `form:"password" json:"password"`
}

Login represent login model

type People

type People struct {
	ID          primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	IDstr       string             `json:"-"`
	Name        string             `json:"name"`
	IDNumber    string             `bson:"id_number" json:"id_number"`
	Address     string             `json:"address"`
	Phone       string             `json:"phone"`
	Origin      Address            `json:"origin"`
	Purpose     string             `json:"purpose"`
	PeopleCount int                `bson:"people_count" json:"people_count"`
	People      []PeopleProfile    `bson:"people" json:"people"`
	ArrivalDate string             `bson:"arrival_date" json:"arrival_date"`
	Haven       Haven              `json:"haven"`
	SurveyorID  primitive.ObjectID `bson:"surveyor_id" json:"surveyor_id"`
	SubmittedAt time.Time          `bson:"submitted_at" json:"submitted_at"`
}

People represent people model

type PeopleProfile

type PeopleProfile struct {
	Name        string `json:"name"`
	Age         int    `json:"age"`
	Gender      string `json:"gender"`
	CaseHistory string `bson:"case_history" json:"case_history"`
}

PeopleProfile represent person model

type Province

type Province struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Regencies []Regency `bson:"regencies" json:"regencies,omitempty"`
}

Province represent province model

type Regency

type Regency struct {
	ID        string     `json:"id"`
	Name      string     `json:"name"`
	Districts []District `json:"districts"`
}

Regency represent regency model

type Register

type Register struct {
	ID         primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	Name       string             `json:"name"`
	Username   string             `json:"username"`
	Password   string             `json:"password"`
	Role       string             `json:"role"`
	Phone      string             `json:"phone"`
	Level      string             `json:"level"`
	ProvinceID string             `bson:"province_id" json:"province_id"`
	RegencyID  string             `bson:"regency_id" json:"regency_id"`
	DistrictID string             `bson:"district_id" json:"district_id"`
	VillageID  string             `bson:"village_id" json:"village_id"`
}

Register represent register model

type User

type User struct {
	ID         primitive.ObjectID `bson:"_id" json:"_id,omitempty"`
	Name       string             `json:"name"`
	Username   string             `json:"username"`
	Password   string             `json:"-"`
	Role       string             `json:"role"`
	Phone      string             `json:"phone"`
	Level      string             `json:"level"`
	ProvinceID string             `bson:"province_id" json:"province_id"`
	RegencyID  string             `bson:"regency_id" json:"regency_id"`
	DistrictID string             `bson:"district_id" json:"district_id"`
	VillageID  string             `bson:"village_id" json:"village_id"`
}

User represent user model

type Village

type Village struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Village represent village model

Jump to

Keyboard shortcuts

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