models

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 2 Imported by: 2

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 (
	UVERSIONS_LINE       = "LINES"
	UVERSIONS_ROUTE      = "ROUTES"
	UVERSIONS_STOP       = "STOPS"
	UVERSIONS_ROUTESTOPS = "ROUTE STOPS"
	UVERSIONS_SCHED_CATS = "SCHED_CATS"
	SCHED_ENTRIES        = "SCHED_ENTRIES"
)
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 Entity added in v0.2.1

type Entity interface {
}

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:"mld_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 {
	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      []Schedule `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 Route01 added in v0.2.1

type Route01 struct {
	Id           int64   `json:"id" gorm:"primaryKey"`
	Route_code   int32   `json:"route_code" gorm:"index:route01_code_un,unique"`
	Routed_x     float32 `json:"routed_x"`
	Routed_y     float32 `json:"routed_y"`
	Routed_order int16   `json:"routed_order" gorm:"index:route01_code_un,unique"`
}

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

type Route01Oasa added in v0.2.1

type Route01Oasa struct {
	Routed_x     float32 `oasa:"routed_x"`
	Routed_y     float32 `oasa:"routed_y"`
	Routed_order int16   `oasa:"routed_order"`
}

********* Struct for Route Details OASA **************

type Route02 added in v0.2.1

type Route02 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 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    []Route01 `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 Schedule added in v0.2.1

type Schedule 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"`
	Go            []Schedule01 `oasa:"go"`
	Come          []Schedule01 `oasa:"come"`
}

type Schedule01 added in v0.2.1

type Schedule01 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 Schedule01Dto added in v0.2.1

type Schedule01Dto struct {
	Start_Time string `json:"start_time" oasa:"sde_start1" type:"time"`
	Type       int8   `json:"type"`
}

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 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        int32   `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"`
	Stop_type        int8    `json:"stop_type" oasa:"StopType"`
	Stop_amea        int8    `json:"stop_amea" oasa:"StopAmea"`
	Destinations     string  `json:"destinations"`
	Destinations_Eng string  `json:"destinations_eng"`
}

type StopDto

type StopDto struct {
	Stop_code   int32   `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       int32   `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"`
}

type UVersions added in v0.2.1

type UVersions struct {
	Uv_descr          string `json:"uv_descr" gorm:"primaryKey"`
	Uv_lastupdatelong int64  `json:"uv_lastupdatelong"`
}

type UVersionsOasa added in v0.2.1

type UVersionsOasa struct {
	Uv_descr          string `json:"uv_descr" oasa:"UV_DESCR"`
	Uv_lastupdatelong int64  `json:"uv_lastupdatelong" oasa:"UV_LASTUPDATELONG"`
}

Jump to

Keyboard shortcuts

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