models

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INTERNALL_SERVER_ERROR = "INTERNAL SERVER ERROR"
	BAD_SYNTAX             = "REQUEST CONTAINS BAD SYNTAX OR CANNOT BE FULLFILLED"
)
View Source
const BUSLINE_SEQ = "BUSLINE_SEQ"
View Source
const BUSROUTE_SEQ = "BUSROUTE_SEQ"
View Source
const BUSSCHEDULEMASTERLINE = "BUSSCHEDULEMASTERLINE"
View Source
const BUSSTOP_SEQ = "BUSSTOP"

Variables

This section is empty.

Functions

This section is empty.

Types

type Line added in v0.1.0

type Line struct {
	Id             int64  `json:"id" gorm:"primaryKey"`
	Ml_Code        int16  `json:"ml_code"`
	Sdc_Code       int16  `json:"sdc_code"`
	Line_Code      int32  `json:"line_code" gorm:"index:LINE_CODE,unique"`
	Line_Id        string `json:"line_id"`
	Line_Descr     string `json:"line_descr"`
	Line_Descr_Eng string `json:"line_descr_eng"`
	Mld_master     int8   `json:"is_master"`
}

****************************************** Struct for Bus Lines Entities for database ******************************************

type LineArrDto added in v0.1.2

type LineArrDto []LineDto

func (LineArrDto) SortWithId added in v0.1.2

func (t LineArrDto) SortWithId()

type LineDto

type LineDto struct {
	Id             int64               `json:"id"`
	Ml_Code        int64               `json:"ml_code"`
	Sdc_Code       int64               `json:"sdc_code"`
	Line_Code      int32               `json:"line_code"`
	Line_Id        string              `json:"line_id"`
	Line_Descr     string              `json:"line_descr"`
	Line_Descr_Eng string              `json:"line_descr_eng"`
	Routes         []RouteDto          `json:"routes"`
	Schedules      []ScheduleMasterDto `json:"scheduleDay"`
}

*************************************************

This struct is for different reasons

*************************************************

type LineDto02 added in v0.1.2

type LineDto02 struct {
	Line_id     string
	Route_Code  int32
	Route_Descr string
}

type LineOasa added in v0.1.0

type LineOasa struct {
	Ml_Code        int16  `json:"masterCode" oasa:"ml_code"`
	Sdc_Code       int16  `json:"scheduleCode" oasa:"sdc_code"`
	Line_Code      int32  `json:"lineCode" oasa:"line_code" gorm:"index:LINE_CODE,unique"`
	Line_Id        string `json:"lineId" oasa:"line_id"`
	Line_Descr     string `json:"lineDescr" oasa:"line_descr"`
	Line_Descr_Eng string `json:"lineDescrEng" oasa:"line_descr_eng"`
	Mld_master     int8   `json:"mld_master" oasa:"mld_master"`
}

*************************************************** This struct is to get data from OASA Application ***************************************************

type OasaError

type OasaError struct {
	Error string `json:"error" `
}

type Point added in v0.1.1

type Point struct {
	Lat  float64 `json:"point_lat`
	Long float64 `json:point_long`
}

type Route added in v0.1.0

type Route struct {
	Id              int64   `json:"Id" gorm:"PrimaryKey"`
	Route_Code      int32   `json:"route_code" gorm:"index:ROUTE_CODE_UN,unique" oasa:"RouteCode"`
	Line_Code       int32   `json:"line_code" gorm:"index:LINE_CODE_INDX" oasa:"LineCode"`
	Route_Descr     string  `json:"route_descr" oasa:"RouteDescr"`
	Route_Descr_eng string  `json:"route_descr_eng" oasa:"RouteDescrEng"`
	Route_Type      int8    `json:"route_type" oasa:"RouteType"`
	Route_Distance  float32 `json:"route_distance" oasa:"RouteDistance"`
}

****************************************** Struct for Bus Lines Entities for database ******************************************

type RouteDetail added in v0.1.0

type RouteDetail struct {
	Routed_x     float32 `json:"routeLati" oasa:"routed_x"`
	Routed_y     float32 `json:"routeLong" oasa:"routed_y"`
	Routed_order int16   `json:"routeOrder" oasa:"routed_order"`
}

********* Struct for Route Details Entities **************

type RouteDto added in v0.1.0

type RouteDto struct {
	Id         int64 `json:"Id"`
	Route_Code int32 `json:"route_code"`
	// Line_Code       int32         `json:"line_code"`
	Route_Descr     string        `json:"route_descr"`
	Route_Descr_Eng string        `json:"route_descr_eng"`
	Route_Type      int8          `json:"route_type"`
	Route_Distance  float32       `json:"route_distance"`
	Stops           []Stop        `json:"stops"`
	RouteDetails    []RouteDetail `json:"routeDetails"`
}

type RouteOasa added in v0.1.0

type RouteOasa struct {
	Route_Code      int32   `json:"routeCode" oasa:"RouteCode"`
	Line_Code       int32   `json:"lineCode" oasa:"LineCode"`
	Route_Descr     string  `json:"routeDescr" oasa:"RouteDescr"`
	Route_Descr_Eng string  `json:"routeDescrEng" oasa:"RouteDescrEng"`
	Route_Type      int8    `json:"routeType" oasa:"RouteType"`
	Route_Distance  float32 `json:"routeDistance" oasa:"RouteDistance"`
}

*************************************************** This struct is to get data from OASA Application ***************************************************

type RouteStops added in v0.1.0

type RouteStops struct {
	Route_code int32 `json:"routeCode" gorm:"primaryKey"`
	Stop_code  int64 `json:"stopCode" gorm:"primaryKey"`
	Senu       int16 `json:"senu" gorm:"primaryKey"`
}

****************************************** Struct for Bus Lines Entities for database ******************************************

type ScheduleMaster added in v0.1.0

type ScheduleMaster struct {
	Id            int64  `json:"id"`
	Sdc_Descr     string `json:"sdc_descr"`
	Sdc_Descr_Eng string `json:"sdc_descr_eng"`
	Sdc_Code      int32  `json:"sdc_code"`
	Line_Code     int64  `json:"line_code"`
}

type ScheduleMasterDto added in v0.1.0

type ScheduleMasterDto struct {
	Sdc_Descr     string        `json:"sdc_descr" oasa:"sdc_descr"`
	Sdc_Descr_Eng string        `json:"sdc_descr_eng" oasa:"sdc_descr_eng"`
	Sdc_Code      int32         `json:"sdc_code" oasa:"sdc_code"`
	ShcedeLine    ScheduleTimes `json:"scheduleLine"`
}

type ScheduleOasa added in v0.1.0

type ScheduleOasa struct {
	Sdc_Descr     string `json:"scheduleDescr" oasa:"sdc_descr"`
	Sdc_Descr_Eng string `json:"scheduleDescrEng" oasa:"sdc_descr_eng"`
	Sdc_Code      int32  `json:"scheduleCode" oasa:"sdc_code"`
}

*************************************************** This struct is to get data from OASA Application

type ScheduleTime added in v0.1.0

type ScheduleTime struct {
	Sdc_Code   int32  `json:"sdc_code" gorm:"primaryKey"`
	Line_Code  int64  `json:"line_code" gorm:"primaryKey"`
	Start_Time string `json:"start_time" gorm:"primaryKeys"`
	Type       int8   `json:"type" gorm:"primaryKey"`
}

type ScheduleTimeDto added in v0.1.0

type ScheduleTimeDto struct {
	//Line_Code  int64     `json:"line_code" oasa:"line_code"`
	Start_Time string `json:"start_time" oasa:"sde_start1" type:"time"`
	Type       int8   `json:"type"`
}

type ScheduleTimes added in v0.1.0

type ScheduleTimes struct {
	Go   []ScheduleTimeDto `oasa:"go"`
	Come []ScheduleTimeDto `oasa:"come"`
}

type Sequence

type Sequence struct {
	SEQ_GEN   string `gorm:"primaryKey"`
	SEQ_COUNT int64
}

type Stop added in v0.1.0

type Stop struct {
	Id              int64   `json:"Id" gorm:"primaryKey"`
	Stop_code       int64   `json:"Stop_code" gorm:"index:STOP_CODE_UN,unique" oasa:"StopCode"`
	Stop_id         string  `json:"stop_id" oasa:"StopID"`
	Stop_descr      string  `json:"stop_descr" oasa:"StopDescr"`
	Stop_descr_eng  string  `json:"stop_descr_eng" oasa:"StopDescrEng"`
	Stop_street     string  `json:"stop_street" oasa:"StopStreet"`
	Stop_street_eng string  `json:"stop_street_eng" oasa:"StopStreetEng"`
	Stop_heading    int32   `json:"stop_heading" oasa:"StopHeading"`
	Stop_lat        float64 `json:"stop_lat" oasa:"StopLat"`
	Stop_lng        float64 `json:"stop_lng" oasa:"StopLng"`
	//Senu            int16   `json:"stopOrder" oasa:"RouteStopOrder"`
	Stop_type int8 `json:"stop_type" oasa:"StopType"`
	Stop_amea int8 `json:"stop_amea" oasa:"StopAmea"`
}

type StopDto

type StopDto struct {
	Stop_code   int64   `json:"Stop_code"`
	Stop_descr  string  `json:"stop_descr"`
	Stop_street string  `json:"stop_street"`
	Distance    float64 `json:"distance"`
}

type StopOasa added in v0.1.0

type StopOasa struct {
	Stop_code       int64   `json:"StopCode" oasa:"StopCode"`
	Stop_id         string  `json:"stopId" oasa:"StopID"`
	Stop_descr      string  `json:"stopDescr" oasa:"StopDescr"`
	Stop_descr_eng  string  `json:"stopDescrEng" oasa:"StopDescrEng"`
	Stop_street     string  `json:"stopStreet" oasa:"StopStreet"`
	Stop_street_eng string  `json:"stopStreetEng" oasa:"StopStreetEng"`
	Stop_heading    int32   `json:"stopHeading" oasa:"StopHeading"`
	Stop_lat        float64 `json:"stopLat" oasa:"StopLat"`
	Stop_lng        float64 `json:"stopLng" oasa:"StopLng"`
	Senu            int16   `json:"stopOrder" oasa:"RouteStopOrder"`
	Stop_type       int8    `json:"stopType" oasa:"StopType"`
	Stop_amea       int8    `json:"stopAmea" oasa:"StopAmea"`
}

Jump to

Keyboard shortcuts

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