diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 30c71423..cb2b66c3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,7 +38,7 @@ jobs: with: config: .ls-lint.yaml - name: Create Pull Request - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@v7 if: github.ref == 'refs/heads/main' with: commit-message: fixed formatting mistakes have sneaked into prod diff --git a/client/go.mod b/client/go.mod index db9356c7..a36ed85d 100644 --- a/client/go.mod +++ b/client/go.mod @@ -5,15 +5,15 @@ go 1.21 require ( github.com/TUM-Dev/Campus-Backend/server v0.0.0-20231009133538-1a7f37e5f27c github.com/sirupsen/logrus v1.9.3 - google.golang.org/grpc v1.65.0 + google.golang.org/grpc v1.67.0 ) require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/client/go.sum b/client/go.sum index 7ac48771..c1417269 100644 --- a/client/go.sum +++ b/client/go.sum @@ -3,8 +3,8 @@ github.com/TUM-Dev/Campus-Backend/server v0.0.0-20231009133538-1a7f37e5f27c/go.m github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= @@ -17,21 +17,21 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/server/api/generate.bash b/server/api/generate.bash index 3877b37e..cb7a0b5c 100755 --- a/server/api/generate.bash +++ b/server/api/generate.bash @@ -7,7 +7,7 @@ pushd $BASEDIR > /dev/null echo updating the generated files export PATH="$PATH:$(go env GOPATH)/bin" -buf mod update || exit 1 +buf dep update || exit 1 buf generate || exit 1 echo making sure the openapi document points to the valid api diff --git a/server/api/installBuf.bash b/server/api/installBuf.bash index 107188a9..102825e2 100755 --- a/server/api/installBuf.bash +++ b/server/api/installBuf.bash @@ -4,20 +4,21 @@ BASEDIR=$(dirname "$0") echo "making sure that this script is run from $BASEDIR" pushd "$BASEDIR" > /dev/null || exit +go work use ./ + echo downloading... -go get github.com/bufbuild/buf/cmd/buf \ - github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ - github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ - google.golang.org/protobuf/cmd/protoc-gen-go \ - google.golang.org/grpc/cmd/protoc-gen-go-grpc +go get github.com/bufbuild/buf/cmd/buf +go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway +go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 +go get google.golang.org/protobuf/cmd/protoc-gen-go +go get google.golang.org/grpc/cmd/protoc-gen-go-grpc echo installing... -go install \ - github.com/bufbuild/buf/cmd/buf \ - github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ - github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ - google.golang.org/protobuf/cmd/protoc-gen-go \ - google.golang.org/grpc/cmd/protoc-gen-go-grpc +GO111MODULE=on go install github.com/bufbuild/buf/cmd/buf +go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway +go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 +go install google.golang.org/protobuf/cmd/protoc-gen-go +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc echo tidiing up diff --git a/server/api/tumdev/campus_backend.pb.go b/server/api/tumdev/campus_backend.pb.go index 9595a889..8af39eba 100644 --- a/server/api/tumdev/campus_backend.pb.go +++ b/server/api/tumdev/campus_backend.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.34.2-devel // protoc (unknown) // source: tumdev/campus_backend.proto @@ -72,6 +72,52 @@ func (DeviceType) EnumDescriptor() ([]byte, []int) { return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{0} } +type Language int32 + +const ( + Language_German Language = 0 + Language_English Language = 1 +) + +// Enum value maps for Language. +var ( + Language_name = map[int32]string{ + 0: "German", + 1: "English", + } + Language_value = map[string]int32{ + "German": 0, + "English": 1, + } +) + +func (x Language) Enum() *Language { + p := new(Language) + *p = x + return p +} + +func (x Language) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Language) Descriptor() protoreflect.EnumDescriptor { + return file_tumdev_campus_backend_proto_enumTypes[1].Descriptor() +} + +func (Language) Type() protoreflect.EnumType { + return &file_tumdev_campus_backend_proto_enumTypes[1] +} + +func (x Language) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Language.Descriptor instead. +func (Language) EnumDescriptor() ([]byte, []int) { + return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{1} +} + type CreateFeedbackRequest_Recipient int32 const ( @@ -104,11 +150,11 @@ func (x CreateFeedbackRequest_Recipient) String() string { } func (CreateFeedbackRequest_Recipient) Descriptor() protoreflect.EnumDescriptor { - return file_tumdev_campus_backend_proto_enumTypes[1].Descriptor() + return file_tumdev_campus_backend_proto_enumTypes[2].Descriptor() } func (CreateFeedbackRequest_Recipient) Type() protoreflect.EnumType { - return &file_tumdev_campus_backend_proto_enumTypes[1] + return &file_tumdev_campus_backend_proto_enumTypes[2] } func (x CreateFeedbackRequest_Recipient) Number() protoreflect.EnumNumber { @@ -132,11 +178,9 @@ type CreateDeviceRequest struct { func (x *CreateDeviceRequest) Reset() { *x = CreateDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeviceRequest) String() string { @@ -147,7 +191,7 @@ func (*CreateDeviceRequest) ProtoMessage() {} func (x *CreateDeviceRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -193,11 +237,9 @@ type CreateDeviceReply struct { func (x *CreateDeviceReply) Reset() { *x = CreateDeviceReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeviceReply) String() string { @@ -208,7 +250,7 @@ func (*CreateDeviceReply) ProtoMessage() {} func (x *CreateDeviceReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +283,9 @@ type DeleteDeviceRequest struct { func (x *DeleteDeviceRequest) Reset() { *x = DeleteDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeviceRequest) String() string { @@ -256,7 +296,7 @@ func (*DeleteDeviceRequest) ProtoMessage() {} func (x *DeleteDeviceRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,11 +335,9 @@ type DeleteDeviceReply struct { func (x *DeleteDeviceReply) Reset() { *x = DeleteDeviceReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeviceReply) String() string { @@ -310,7 +348,7 @@ func (*DeleteDeviceReply) ProtoMessage() {} func (x *DeleteDeviceReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +395,9 @@ type News struct { func (x *News) Reset() { *x = News{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *News) String() string { @@ -372,7 +408,7 @@ func (*News) ProtoMessage() {} func (x *News) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +503,9 @@ type ListNewsReply struct { func (x *ListNewsReply) Reset() { *x = ListNewsReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNewsReply) String() string { @@ -482,7 +516,7 @@ func (*ListNewsReply) ProtoMessage() {} func (x *ListNewsReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -519,11 +553,9 @@ type ListNewsRequest struct { func (x *ListNewsRequest) Reset() { *x = ListNewsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNewsRequest) String() string { @@ -534,7 +566,7 @@ func (*ListNewsRequest) ProtoMessage() {} func (x *ListNewsRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -578,11 +610,9 @@ type ListNewsSourcesRequest struct { func (x *ListNewsSourcesRequest) Reset() { *x = ListNewsSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNewsSourcesRequest) String() string { @@ -593,7 +623,7 @@ func (*ListNewsSourcesRequest) ProtoMessage() {} func (x *ListNewsSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,11 +648,9 @@ type ListNewsSourcesReply struct { func (x *ListNewsSourcesReply) Reset() { *x = ListNewsSourcesReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNewsSourcesReply) String() string { @@ -633,7 +661,7 @@ func (*ListNewsSourcesReply) ProtoMessage() {} func (x *ListNewsSourcesReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +696,9 @@ type NewsSource struct { func (x *NewsSource) Reset() { *x = NewsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NewsSource) String() string { @@ -683,7 +709,7 @@ func (*NewsSource) ProtoMessage() {} func (x *NewsSource) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +756,9 @@ type ListNewsAlertsRequest struct { func (x *ListNewsAlertsRequest) Reset() { *x = ListNewsAlertsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNewsAlertsRequest) String() string { @@ -745,7 +769,7 @@ func (*ListNewsAlertsRequest) ProtoMessage() {} func (x *ListNewsAlertsRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -777,11 +801,9 @@ type ListNewsAlertsReply struct { func (x *ListNewsAlertsReply) Reset() { *x = ListNewsAlertsReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNewsAlertsReply) String() string { @@ -792,7 +814,7 @@ func (*ListNewsAlertsReply) ProtoMessage() {} func (x *ListNewsAlertsReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -828,11 +850,9 @@ type NewsAlert struct { func (x *NewsAlert) Reset() { *x = NewsAlert{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NewsAlert) String() string { @@ -843,7 +863,7 @@ func (*NewsAlert) ProtoMessage() {} func (x *NewsAlert) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -910,11 +930,9 @@ type ListCanteenRatingsRequest struct { func (x *ListCanteenRatingsRequest) Reset() { *x = ListCanteenRatingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCanteenRatingsRequest) String() string { @@ -925,7 +943,7 @@ func (*ListCanteenRatingsRequest) ProtoMessage() {} func (x *ListCanteenRatingsRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -983,11 +1001,9 @@ type ListCanteenRatingsReply struct { func (x *ListCanteenRatingsReply) Reset() { *x = ListCanteenRatingsReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCanteenRatingsReply) String() string { @@ -998,7 +1014,7 @@ func (*ListCanteenRatingsReply) ProtoMessage() {} func (x *ListCanteenRatingsReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1075,11 +1091,9 @@ type GetDishRatingsRequest struct { func (x *GetDishRatingsRequest) Reset() { *x = GetDishRatingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDishRatingsRequest) String() string { @@ -1090,7 +1104,7 @@ func (*GetDishRatingsRequest) ProtoMessage() {} func (x *GetDishRatingsRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1161,11 +1175,9 @@ type GetDishRatingsReply struct { func (x *GetDishRatingsReply) Reset() { *x = GetDishRatingsReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDishRatingsReply) String() string { @@ -1176,7 +1188,7 @@ func (*GetDishRatingsReply) ProtoMessage() {} func (x *GetDishRatingsReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1257,11 +1269,9 @@ type SingleRatingReply struct { func (x *SingleRatingReply) Reset() { *x = SingleRatingReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SingleRatingReply) String() string { @@ -1272,7 +1282,7 @@ func (*SingleRatingReply) ProtoMessage() {} func (x *SingleRatingReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1330,11 +1340,9 @@ type CreateCanteenRatingReply struct { func (x *CreateCanteenRatingReply) Reset() { *x = CreateCanteenRatingReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCanteenRatingReply) String() string { @@ -1345,7 +1353,7 @@ func (*CreateCanteenRatingReply) ProtoMessage() {} func (x *CreateCanteenRatingReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1385,9 @@ type CreateCanteenRatingRequest struct { func (x *CreateCanteenRatingRequest) Reset() { *x = CreateCanteenRatingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCanteenRatingRequest) String() string { @@ -1392,7 +1398,7 @@ func (*CreateCanteenRatingRequest) ProtoMessage() {} func (x *CreateCanteenRatingRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1450,11 +1456,9 @@ type CreateDishRatingReply struct { func (x *CreateDishRatingReply) Reset() { *x = CreateDishRatingReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDishRatingReply) String() string { @@ -1465,7 +1469,7 @@ func (*CreateDishRatingReply) ProtoMessage() {} func (x *CreateDishRatingReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1502,11 +1506,9 @@ type CreateDishRatingRequest struct { func (x *CreateDishRatingRequest) Reset() { *x = CreateDishRatingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDishRatingRequest) String() string { @@ -1517,7 +1519,7 @@ func (*CreateDishRatingRequest) ProtoMessage() {} func (x *CreateDishRatingRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1582,11 +1584,9 @@ type ListAvailableDishTagsRequest struct { func (x *ListAvailableDishTagsRequest) Reset() { *x = ListAvailableDishTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAvailableDishTagsRequest) String() string { @@ -1597,7 +1597,7 @@ func (*ListAvailableDishTagsRequest) ProtoMessage() {} func (x *ListAvailableDishTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1622,11 +1622,9 @@ type ListAvailableDishTagsReply struct { func (x *ListAvailableDishTagsReply) Reset() { *x = ListAvailableDishTagsReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAvailableDishTagsReply) String() string { @@ -1637,7 +1635,7 @@ func (*ListAvailableDishTagsReply) ProtoMessage() {} func (x *ListAvailableDishTagsReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1667,11 +1665,9 @@ type ListNameTagsRequest struct { func (x *ListNameTagsRequest) Reset() { *x = ListNameTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNameTagsRequest) String() string { @@ -1682,7 +1678,7 @@ func (*ListNameTagsRequest) ProtoMessage() {} func (x *ListNameTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1707,11 +1703,9 @@ type ListNameTagsReply struct { func (x *ListNameTagsReply) Reset() { *x = ListNameTagsReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNameTagsReply) String() string { @@ -1722,7 +1716,7 @@ func (*ListNameTagsReply) ProtoMessage() {} func (x *ListNameTagsReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1752,11 +1746,9 @@ type ListAvailableCanteenTagsRequest struct { func (x *ListAvailableCanteenTagsRequest) Reset() { *x = ListAvailableCanteenTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAvailableCanteenTagsRequest) String() string { @@ -1767,7 +1759,7 @@ func (*ListAvailableCanteenTagsRequest) ProtoMessage() {} func (x *ListAvailableCanteenTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1792,11 +1784,9 @@ type ListAvailableCanteenTagsReply struct { func (x *ListAvailableCanteenTagsReply) Reset() { *x = ListAvailableCanteenTagsReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAvailableCanteenTagsReply) String() string { @@ -1807,7 +1797,7 @@ func (*ListAvailableCanteenTagsReply) ProtoMessage() {} func (x *ListAvailableCanteenTagsReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1841,11 +1831,9 @@ type TagsOverview struct { func (x *TagsOverview) Reset() { *x = TagsOverview{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagsOverview) String() string { @@ -1856,7 +1844,7 @@ func (*TagsOverview) ProtoMessage() {} func (x *TagsOverview) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1903,11 +1891,9 @@ type RatingTag struct { func (x *RatingTag) Reset() { *x = RatingTag{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RatingTag) String() string { @@ -1918,7 +1904,7 @@ func (*RatingTag) ProtoMessage() {} func (x *RatingTag) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1958,11 +1944,9 @@ type RatingTagNewRequest struct { func (x *RatingTagNewRequest) Reset() { *x = RatingTagNewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RatingTagNewRequest) String() string { @@ -1973,7 +1957,7 @@ func (*RatingTagNewRequest) ProtoMessage() {} func (x *RatingTagNewRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2016,11 +2000,9 @@ type RatingTagResult struct { func (x *RatingTagResult) Reset() { *x = RatingTagResult{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RatingTagResult) String() string { @@ -2031,7 +2013,7 @@ func (*RatingTagResult) ProtoMessage() {} func (x *RatingTagResult) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2089,11 +2071,9 @@ type ListCanteensRequest struct { func (x *ListCanteensRequest) Reset() { *x = ListCanteensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCanteensRequest) String() string { @@ -2104,7 +2084,7 @@ func (*ListCanteensRequest) ProtoMessage() {} func (x *ListCanteensRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2129,11 +2109,9 @@ type ListCanteensReply struct { func (x *ListCanteensReply) Reset() { *x = ListCanteensReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCanteensReply) String() string { @@ -2144,7 +2122,7 @@ func (*ListCanteensReply) ProtoMessage() {} func (x *ListCanteensReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2179,11 +2157,9 @@ type Canteen struct { func (x *Canteen) Reset() { *x = Canteen{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Canteen) String() string { @@ -2194,7 +2170,7 @@ func (*Canteen) ProtoMessage() {} func (x *Canteen) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2254,11 +2230,9 @@ type ListDishesRequest struct { func (x *ListDishesRequest) Reset() { *x = ListDishesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDishesRequest) String() string { @@ -2269,7 +2243,7 @@ func (*ListDishesRequest) ProtoMessage() {} func (x *ListDishesRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2322,11 +2296,9 @@ type ListDishesReply struct { func (x *ListDishesReply) Reset() { *x = ListDishesReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDishesReply) String() string { @@ -2337,7 +2309,7 @@ func (*ListDishesReply) ProtoMessage() {} func (x *ListDishesReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2377,11 +2349,9 @@ type RoomInformationElement struct { func (x *RoomInformationElement) Reset() { *x = RoomInformationElement{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoomInformationElement) String() string { @@ -2392,7 +2362,7 @@ func (*RoomInformationElement) ProtoMessage() {} func (x *RoomInformationElement) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2480,11 +2450,9 @@ type GetUpdateNoteRequest struct { func (x *GetUpdateNoteRequest) Reset() { *x = GetUpdateNoteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUpdateNoteRequest) String() string { @@ -2495,7 +2463,7 @@ func (*GetUpdateNoteRequest) ProtoMessage() {} func (x *GetUpdateNoteRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2528,11 +2496,9 @@ type GetUpdateNoteReply struct { func (x *GetUpdateNoteReply) Reset() { *x = GetUpdateNoteReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUpdateNoteReply) String() string { @@ -2543,7 +2509,7 @@ func (*GetUpdateNoteReply) ProtoMessage() {} func (x *GetUpdateNoteReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2585,11 +2551,9 @@ type ListMoviesRequest struct { func (x *ListMoviesRequest) Reset() { *x = ListMoviesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMoviesRequest) String() string { @@ -2600,7 +2564,7 @@ func (*ListMoviesRequest) ProtoMessage() {} func (x *ListMoviesRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2639,11 +2603,9 @@ type ListMoviesReply struct { func (x *ListMoviesReply) Reset() { *x = ListMoviesReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMoviesReply) String() string { @@ -2654,7 +2616,7 @@ func (*ListMoviesReply) ProtoMessage() {} func (x *ListMoviesReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2717,11 +2679,9 @@ type Movie struct { func (x *Movie) Reset() { *x = Movie{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Movie) String() string { @@ -2732,7 +2692,7 @@ func (*Movie) ProtoMessage() {} func (x *Movie) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2886,11 +2846,9 @@ type CreateFeedbackRequest struct { func (x *CreateFeedbackRequest) Reset() { *x = CreateFeedbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeedbackRequest) String() string { @@ -2901,7 +2859,7 @@ func (*CreateFeedbackRequest) ProtoMessage() {} func (x *CreateFeedbackRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2983,11 +2941,9 @@ type Coordinate struct { func (x *Coordinate) Reset() { *x = Coordinate{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Coordinate) String() string { @@ -2998,7 +2954,7 @@ func (*Coordinate) ProtoMessage() {} func (x *Coordinate) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3035,11 +2991,9 @@ type CreateFeedbackReply struct { func (x *CreateFeedbackReply) Reset() { *x = CreateFeedbackReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeedbackReply) String() string { @@ -3050,7 +3004,7 @@ func (*CreateFeedbackReply) ProtoMessage() {} func (x *CreateFeedbackReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3075,11 +3029,9 @@ type CreateFeedbackImageReply struct { func (x *CreateFeedbackImageReply) Reset() { *x = CreateFeedbackImageReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeedbackImageReply) String() string { @@ -3090,7 +3042,7 @@ func (*CreateFeedbackImageReply) ProtoMessage() {} func (x *CreateFeedbackImageReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3123,11 +3075,9 @@ type CreateFeedbackImageRequest struct { func (x *CreateFeedbackImageRequest) Reset() { *x = CreateFeedbackImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeedbackImageRequest) String() string { @@ -3138,7 +3088,7 @@ func (*CreateFeedbackImageRequest) ProtoMessage() {} func (x *CreateFeedbackImageRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3177,11 +3127,9 @@ type GetMemberRequest struct { func (x *GetMemberRequest) Reset() { *x = GetMemberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMemberRequest) String() string { @@ -3192,7 +3140,7 @@ func (*GetMemberRequest) ProtoMessage() {} func (x *GetMemberRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3226,11 +3174,9 @@ type GetMemberReply struct { func (x *GetMemberReply) Reset() { *x = GetMemberReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMemberReply) String() string { @@ -3241,7 +3187,7 @@ func (*GetMemberReply) ProtoMessage() {} func (x *GetMemberReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3287,11 +3233,9 @@ type GetUploadStatusRequest struct { func (x *GetUploadStatusRequest) Reset() { *x = GetUploadStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUploadStatusRequest) String() string { @@ -3302,7 +3246,7 @@ func (*GetUploadStatusRequest) ProtoMessage() {} func (x *GetUploadStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3338,11 +3282,9 @@ type GetUploadStatusReply struct { func (x *GetUploadStatusReply) Reset() { *x = GetUploadStatusReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUploadStatusReply) String() string { @@ -3353,7 +3295,7 @@ func (*GetUploadStatusReply) ProtoMessage() {} func (x *GetUploadStatusReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3413,11 +3355,9 @@ type GetNotificationRequest struct { func (x *GetNotificationRequest) Reset() { *x = GetNotificationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationRequest) String() string { @@ -3428,7 +3368,7 @@ func (*GetNotificationRequest) ProtoMessage() {} func (x *GetNotificationRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3464,11 +3404,9 @@ type GetNotificationReply struct { func (x *GetNotificationReply) Reset() { *x = GetNotificationReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationReply) String() string { @@ -3479,7 +3417,7 @@ func (*GetNotificationReply) ProtoMessage() {} func (x *GetNotificationReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3539,11 +3477,9 @@ type GetNotificationConfirmRequest struct { func (x *GetNotificationConfirmRequest) Reset() { *x = GetNotificationConfirmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationConfirmRequest) String() string { @@ -3554,7 +3490,7 @@ func (*GetNotificationConfirmRequest) ProtoMessage() {} func (x *GetNotificationConfirmRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3586,11 +3522,9 @@ type GetNotificationConfirmReply struct { func (x *GetNotificationConfirmReply) Reset() { *x = GetNotificationConfirmReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationConfirmReply) String() string { @@ -3601,7 +3535,7 @@ func (*GetNotificationConfirmReply) ProtoMessage() {} func (x *GetNotificationConfirmReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3634,11 +3568,9 @@ type GetCanteenHeadCountRequest struct { func (x *GetCanteenHeadCountRequest) Reset() { *x = GetCanteenHeadCountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCanteenHeadCountRequest) String() string { @@ -3649,7 +3581,7 @@ func (*GetCanteenHeadCountRequest) ProtoMessage() {} func (x *GetCanteenHeadCountRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3688,11 +3620,9 @@ type GetCanteenHeadCountReply struct { func (x *GetCanteenHeadCountReply) Reset() { *x = GetCanteenHeadCountReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCanteenHeadCountReply) String() string { @@ -3703,7 +3633,7 @@ func (*GetCanteenHeadCountReply) ProtoMessage() {} func (x *GetCanteenHeadCountReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3750,15 +3680,17 @@ type ListStudentClubRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Language of the student clubs and categories + // Defaults to german + Language *Language `protobuf:"varint,1,opt,name=language,proto3,enum=api.Language,oneof" json:"language,omitempty"` } func (x *ListStudentClubRequest) Reset() { *x = ListStudentClubRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStudentClubRequest) String() string { @@ -3769,7 +3701,7 @@ func (*ListStudentClubRequest) ProtoMessage() {} func (x *ListStudentClubRequest) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3784,6 +3716,13 @@ func (*ListStudentClubRequest) Descriptor() ([]byte, []int) { return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{58} } +func (x *ListStudentClubRequest) GetLanguage() Language { + if x != nil && x.Language != nil { + return *x.Language + } + return Language_German +} + type ListStudentClubReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3794,11 +3733,9 @@ type ListStudentClubReply struct { func (x *ListStudentClubReply) Reset() { *x = ListStudentClubReply{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStudentClubReply) String() string { @@ -3809,7 +3746,7 @@ func (*ListStudentClubReply) ProtoMessage() {} func (x *ListStudentClubReply) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3848,11 +3785,9 @@ type StudentClub struct { func (x *StudentClub) Reset() { *x = StudentClub{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudentClub) String() string { @@ -3863,7 +3798,7 @@ func (*StudentClub) ProtoMessage() {} func (x *StudentClub) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3914,15 +3849,16 @@ type StudentClubCollection struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Clubs []*StudentClub `protobuf:"bytes,3,rep,name=clubs,proto3" json:"clubs,omitempty"` + // id of the collection. + // Might not be stable over time because of scraping + UnstableCollectionId uint64 `protobuf:"varint,4,opt,name=unstable_collection_id,json=unstableCollectionId,proto3" json:"unstable_collection_id,omitempty"` } func (x *StudentClubCollection) Reset() { *x = StudentClubCollection{} - if protoimpl.UnsafeEnabled { - mi := &file_tumdev_campus_backend_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_tumdev_campus_backend_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudentClubCollection) String() string { @@ -3933,7 +3869,7 @@ func (*StudentClubCollection) ProtoMessage() {} func (x *StudentClubCollection) ProtoReflect() protoreflect.Message { mi := &file_tumdev_campus_backend_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3969,6 +3905,13 @@ func (x *StudentClubCollection) GetClubs() []*StudentClub { return nil } +func (x *StudentClubCollection) GetUnstableCollectionId() uint64 { + if x != nil { + return x.UnstableCollectionId + } + return 0 +} + var File_tumdev_campus_backend_proto protoreflect.FileDescriptor var file_tumdev_campus_backend_proto_rawDesc = []byte{ @@ -4383,198 +4326,208 @@ var file_tumdev_campus_backend_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x65, - 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x54, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x43, 0x6f, 0x6c, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0xb5, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, - 0x6c, 0x75, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1e, - 0x0a, 0x08, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x6b, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x20, - 0x0a, 0x09, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x02, 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, - 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0c, 0x0a, - 0x0a, 0x5f, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x77, 0x0a, 0x15, 0x53, - 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x05, - 0x63, 0x6c, 0x75, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x52, 0x05, 0x63, - 0x6c, 0x75, 0x62, 0x73, 0x2a, 0x2f, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4f, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x41, - 0x4e, 0x44, 0x52, 0x4f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x49, 0x4e, 0x44, - 0x4f, 0x57, 0x53, 0x10, 0x02, 0x32, 0xbc, 0x13, 0x0a, 0x06, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, - 0x12, 0x64, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, 0x72, - 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, - 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, - 0x72, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, - 0x62, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x0c, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2f, - 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x69, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, - 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x62, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x12, 0x0d, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x49, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x12, 0x14, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, - 0x77, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x62, - 0x04, 0x6e, 0x65, 0x77, 0x73, 0x12, 0x05, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x12, 0x72, 0x0a, 0x12, - 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x63, 0x61, - 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x67, 0x65, 0x74, - 0x12, 0x63, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x68, - 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, - 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x2f, 0x67, 0x65, 0x74, 0x12, 0x75, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, - 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x6e, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x6e, 0x65, 0x77, 0x12, 0x69, 0x0a, 0x10, + 0x61, 0x6d, 0x70, 0x22, 0x55, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x65, + 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, + 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x48, 0x00, + 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x54, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, + 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xb5, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6c, + 0x69, 0x6e, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x07, 0x6c, 0x69, 0x6e, 0x6b, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, + 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, + 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0xad, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x75, + 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x05, 0x63, 0x6c, + 0x75, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x52, 0x05, 0x63, 0x6c, 0x75, + 0x62, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x14, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x2a, 0x2f, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4f, 0x53, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x41, 0x4e, 0x44, 0x52, 0x4f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, + 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x53, 0x10, 0x02, 0x2a, 0x23, 0x0a, 0x08, 0x4c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x10, 0x01, 0x32, 0xbc, + 0x13, 0x0a, 0x06, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x12, 0x64, 0x0a, 0x0e, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x62, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, + 0x73, 0x12, 0x0c, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, + 0x69, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, + 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x18, 0x62, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x0d, 0x2f, 0x6e, 0x65, + 0x77, 0x73, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x08, 0x4c, 0x69, + 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x62, 0x04, 0x6e, 0x65, 0x77, 0x73, 0x12, 0x05, + 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x12, 0x72, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, + 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x72, + 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x67, 0x65, 0x74, 0x12, 0x63, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x64, + 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x67, 0x65, 0x74, 0x12, 0x75, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, + 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, + 0x22, 0x13, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x2f, 0x6e, 0x65, 0x77, 0x12, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, - 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, - 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x68, 0x52, - 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, - 0x69, 0x6e, 0x67, 0x2f, 0x6e, 0x65, 0x77, 0x12, 0x8c, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, - 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x62, 0x0b, 0x72, - 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1a, 0x2f, 0x64, 0x69, 0x73, - 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x69, - 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x6f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x54, 0x61, 0x67, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54, - 0x61, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, - 0x62, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x2f, - 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x6c, 0x6c, 0x44, - 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, - 0x54, 0x61, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x54, - 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x61, - 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x32, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x62, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, - 0x61, 0x67, 0x73, 0x12, 0x1d, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x72, 0x61, - 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, - 0x67, 0x73, 0x12, 0x67, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x6e, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x73, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x62, 0x07, 0x63, 0x61, - 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x12, 0x14, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, - 0x61, 0x6c, 0x6c, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x73, 0x12, 0x51, 0x0a, 0x0a, 0x4c, - 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x68, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x68, - 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x62, - 0x04, 0x64, 0x69, 0x73, 0x68, 0x12, 0x07, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x65, 0x73, 0x12, 0x62, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x12, - 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, - 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x6e, 0x6f, 0x74, 0x65, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x7d, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x73, - 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x19, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x2f, - 0x7b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x1a, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, - 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x09, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, - 0x28, 0x01, 0x12, 0x6c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x21, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x75, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2f, 0x7b, 0x6c, 0x72, 0x7a, 0x5f, 0x69, 0x64, 0x7d, - 0x12, 0x73, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x28, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x90, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, - 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, - 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x2f, 0x7b, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x52, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6c, 0x72, 0x7a, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7e, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, - 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x61, - 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x2f, - 0x7b, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x54, 0x0a, 0x0c, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x12, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x64, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x2a, 0x13, 0x2f, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x7d, 0x12, 0x61, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, - 0x43, 0x6c, 0x75, 0x62, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, - 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x16, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x10, 0x2a, 0x0e, 0x2f, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x63, - 0x6c, 0x75, 0x62, 0x73, 0x42, 0x5e, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x2e, 0x74, 0x75, 0x6d, 0x2e, - 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0e, 0x43, 0x61, 0x6d, 0x70, - 0x75, 0x73, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x55, 0x4d, 0x2d, 0x44, 0x65, 0x76, - 0x2f, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x2d, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x61, 0x70, 0x69, 0xaa, 0x02, 0x0e, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x41, 0x70, 0x69, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, + 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x6e, 0x65, 0x77, + 0x12, 0x8c, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, + 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x62, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, + 0x61, 0x67, 0x73, 0x12, 0x1a, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x2f, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, + 0x6f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x73, 0x12, + 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x61, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x62, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, + 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, + 0x12, 0x98, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x12, 0x24, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x54, 0x61, + 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x62, + 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x2f, 0x63, + 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x6c, + 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x67, 0x0a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x25, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x62, 0x07, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x12, 0x14, + 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x61, 0x6c, 0x6c, 0x43, 0x61, 0x6e, 0x74, + 0x65, 0x65, 0x6e, 0x73, 0x12, 0x51, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x68, + 0x65, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, + 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x62, 0x04, 0x64, 0x69, 0x73, 0x68, 0x12, 0x07, + 0x2f, 0x64, 0x69, 0x73, 0x68, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, + 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x6e, 0x6f, 0x74, + 0x65, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0x55, 0x0a, 0x0a, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, + 0x11, 0x2f, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x7d, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, + 0x62, 0x61, 0x63, 0x6b, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, + 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x17, 0x3a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x09, + 0x2f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x01, 0x12, 0x6c, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, + 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, + 0x2f, 0x7b, 0x6c, 0x72, 0x7a, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x73, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x6e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x90, + 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, + 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x2f, + 0x7b, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x7d, 0x12, 0x52, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x15, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x13, 0x12, 0x11, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6c, 0x72, + 0x7a, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, + 0x65, 0x65, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x48, 0x65, 0x61, + 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x48, 0x65, + 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x27, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x68, + 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x7b, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, + 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x54, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, + 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x0c, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x2a, 0x13, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x61, 0x0a, 0x0f, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x12, 0x1b, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, + 0x6c, 0x75, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x75, 0x62, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x2a, 0x0e, 0x2f, + 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x75, 0x62, 0x73, 0x42, 0x5e, 0x0a, + 0x12, 0x61, 0x70, 0x70, 0x2e, 0x74, 0x75, 0x6d, 0x2e, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x42, 0x0e, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x41, 0x70, 0x69, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x54, 0x55, 0x4d, 0x2d, 0x44, 0x65, 0x76, 0x2f, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, + 0x2d, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0xaa, 0x02, 0x0e, 0x43, + 0x61, 0x6d, 0x70, 0x75, 0x73, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4589,164 +4542,166 @@ func file_tumdev_campus_backend_proto_rawDescGZIP() []byte { return file_tumdev_campus_backend_proto_rawDescData } -var file_tumdev_campus_backend_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_tumdev_campus_backend_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_tumdev_campus_backend_proto_msgTypes = make([]protoimpl.MessageInfo, 62) var file_tumdev_campus_backend_proto_goTypes = []any{ (DeviceType)(0), // 0: api.DeviceType - (CreateFeedbackRequest_Recipient)(0), // 1: api.CreateFeedbackRequest.Recipient - (*CreateDeviceRequest)(nil), // 2: api.CreateDeviceRequest - (*CreateDeviceReply)(nil), // 3: api.CreateDeviceReply - (*DeleteDeviceRequest)(nil), // 4: api.DeleteDeviceRequest - (*DeleteDeviceReply)(nil), // 5: api.DeleteDeviceReply - (*News)(nil), // 6: api.News - (*ListNewsReply)(nil), // 7: api.ListNewsReply - (*ListNewsRequest)(nil), // 8: api.ListNewsRequest - (*ListNewsSourcesRequest)(nil), // 9: api.ListNewsSourcesRequest - (*ListNewsSourcesReply)(nil), // 10: api.ListNewsSourcesReply - (*NewsSource)(nil), // 11: api.NewsSource - (*ListNewsAlertsRequest)(nil), // 12: api.ListNewsAlertsRequest - (*ListNewsAlertsReply)(nil), // 13: api.ListNewsAlertsReply - (*NewsAlert)(nil), // 14: api.NewsAlert - (*ListCanteenRatingsRequest)(nil), // 15: api.ListCanteenRatingsRequest - (*ListCanteenRatingsReply)(nil), // 16: api.ListCanteenRatingsReply - (*GetDishRatingsRequest)(nil), // 17: api.GetDishRatingsRequest - (*GetDishRatingsReply)(nil), // 18: api.GetDishRatingsReply - (*SingleRatingReply)(nil), // 19: api.SingleRatingReply - (*CreateCanteenRatingReply)(nil), // 20: api.CreateCanteenRatingReply - (*CreateCanteenRatingRequest)(nil), // 21: api.CreateCanteenRatingRequest - (*CreateDishRatingReply)(nil), // 22: api.CreateDishRatingReply - (*CreateDishRatingRequest)(nil), // 23: api.CreateDishRatingRequest - (*ListAvailableDishTagsRequest)(nil), // 24: api.ListAvailableDishTagsRequest - (*ListAvailableDishTagsReply)(nil), // 25: api.ListAvailableDishTagsReply - (*ListNameTagsRequest)(nil), // 26: api.ListNameTagsRequest - (*ListNameTagsReply)(nil), // 27: api.ListNameTagsReply - (*ListAvailableCanteenTagsRequest)(nil), // 28: api.ListAvailableCanteenTagsRequest - (*ListAvailableCanteenTagsReply)(nil), // 29: api.ListAvailableCanteenTagsReply - (*TagsOverview)(nil), // 30: api.TagsOverview - (*RatingTag)(nil), // 31: api.RatingTag - (*RatingTagNewRequest)(nil), // 32: api.RatingTagNewRequest - (*RatingTagResult)(nil), // 33: api.RatingTagResult - (*ListCanteensRequest)(nil), // 34: api.ListCanteensRequest - (*ListCanteensReply)(nil), // 35: api.ListCanteensReply - (*Canteen)(nil), // 36: api.Canteen - (*ListDishesRequest)(nil), // 37: api.ListDishesRequest - (*ListDishesReply)(nil), // 38: api.ListDishesReply - (*RoomInformationElement)(nil), // 39: api.RoomInformationElement - (*GetUpdateNoteRequest)(nil), // 40: api.GetUpdateNoteRequest - (*GetUpdateNoteReply)(nil), // 41: api.GetUpdateNoteReply - (*ListMoviesRequest)(nil), // 42: api.ListMoviesRequest - (*ListMoviesReply)(nil), // 43: api.ListMoviesReply - (*Movie)(nil), // 44: api.Movie - (*CreateFeedbackRequest)(nil), // 45: api.CreateFeedbackRequest - (*Coordinate)(nil), // 46: api.Coordinate - (*CreateFeedbackReply)(nil), // 47: api.CreateFeedbackReply - (*CreateFeedbackImageReply)(nil), // 48: api.CreateFeedbackImageReply - (*CreateFeedbackImageRequest)(nil), // 49: api.CreateFeedbackImageRequest - (*GetMemberRequest)(nil), // 50: api.GetMemberRequest - (*GetMemberReply)(nil), // 51: api.GetMemberReply - (*GetUploadStatusRequest)(nil), // 52: api.GetUploadStatusRequest - (*GetUploadStatusReply)(nil), // 53: api.GetUploadStatusReply - (*GetNotificationRequest)(nil), // 54: api.GetNotificationRequest - (*GetNotificationReply)(nil), // 55: api.GetNotificationReply - (*GetNotificationConfirmRequest)(nil), // 56: api.GetNotificationConfirmRequest - (*GetNotificationConfirmReply)(nil), // 57: api.GetNotificationConfirmReply - (*GetCanteenHeadCountRequest)(nil), // 58: api.GetCanteenHeadCountRequest - (*GetCanteenHeadCountReply)(nil), // 59: api.GetCanteenHeadCountReply - (*ListStudentClubRequest)(nil), // 60: api.ListStudentClubRequest - (*ListStudentClubReply)(nil), // 61: api.ListStudentClubReply - (*StudentClub)(nil), // 62: api.StudentClub - (*StudentClubCollection)(nil), // 63: api.StudentClubCollection - (*timestamppb.Timestamp)(nil), // 64: google.protobuf.Timestamp + (Language)(0), // 1: api.Language + (CreateFeedbackRequest_Recipient)(0), // 2: api.CreateFeedbackRequest.Recipient + (*CreateDeviceRequest)(nil), // 3: api.CreateDeviceRequest + (*CreateDeviceReply)(nil), // 4: api.CreateDeviceReply + (*DeleteDeviceRequest)(nil), // 5: api.DeleteDeviceRequest + (*DeleteDeviceReply)(nil), // 6: api.DeleteDeviceReply + (*News)(nil), // 7: api.News + (*ListNewsReply)(nil), // 8: api.ListNewsReply + (*ListNewsRequest)(nil), // 9: api.ListNewsRequest + (*ListNewsSourcesRequest)(nil), // 10: api.ListNewsSourcesRequest + (*ListNewsSourcesReply)(nil), // 11: api.ListNewsSourcesReply + (*NewsSource)(nil), // 12: api.NewsSource + (*ListNewsAlertsRequest)(nil), // 13: api.ListNewsAlertsRequest + (*ListNewsAlertsReply)(nil), // 14: api.ListNewsAlertsReply + (*NewsAlert)(nil), // 15: api.NewsAlert + (*ListCanteenRatingsRequest)(nil), // 16: api.ListCanteenRatingsRequest + (*ListCanteenRatingsReply)(nil), // 17: api.ListCanteenRatingsReply + (*GetDishRatingsRequest)(nil), // 18: api.GetDishRatingsRequest + (*GetDishRatingsReply)(nil), // 19: api.GetDishRatingsReply + (*SingleRatingReply)(nil), // 20: api.SingleRatingReply + (*CreateCanteenRatingReply)(nil), // 21: api.CreateCanteenRatingReply + (*CreateCanteenRatingRequest)(nil), // 22: api.CreateCanteenRatingRequest + (*CreateDishRatingReply)(nil), // 23: api.CreateDishRatingReply + (*CreateDishRatingRequest)(nil), // 24: api.CreateDishRatingRequest + (*ListAvailableDishTagsRequest)(nil), // 25: api.ListAvailableDishTagsRequest + (*ListAvailableDishTagsReply)(nil), // 26: api.ListAvailableDishTagsReply + (*ListNameTagsRequest)(nil), // 27: api.ListNameTagsRequest + (*ListNameTagsReply)(nil), // 28: api.ListNameTagsReply + (*ListAvailableCanteenTagsRequest)(nil), // 29: api.ListAvailableCanteenTagsRequest + (*ListAvailableCanteenTagsReply)(nil), // 30: api.ListAvailableCanteenTagsReply + (*TagsOverview)(nil), // 31: api.TagsOverview + (*RatingTag)(nil), // 32: api.RatingTag + (*RatingTagNewRequest)(nil), // 33: api.RatingTagNewRequest + (*RatingTagResult)(nil), // 34: api.RatingTagResult + (*ListCanteensRequest)(nil), // 35: api.ListCanteensRequest + (*ListCanteensReply)(nil), // 36: api.ListCanteensReply + (*Canteen)(nil), // 37: api.Canteen + (*ListDishesRequest)(nil), // 38: api.ListDishesRequest + (*ListDishesReply)(nil), // 39: api.ListDishesReply + (*RoomInformationElement)(nil), // 40: api.RoomInformationElement + (*GetUpdateNoteRequest)(nil), // 41: api.GetUpdateNoteRequest + (*GetUpdateNoteReply)(nil), // 42: api.GetUpdateNoteReply + (*ListMoviesRequest)(nil), // 43: api.ListMoviesRequest + (*ListMoviesReply)(nil), // 44: api.ListMoviesReply + (*Movie)(nil), // 45: api.Movie + (*CreateFeedbackRequest)(nil), // 46: api.CreateFeedbackRequest + (*Coordinate)(nil), // 47: api.Coordinate + (*CreateFeedbackReply)(nil), // 48: api.CreateFeedbackReply + (*CreateFeedbackImageReply)(nil), // 49: api.CreateFeedbackImageReply + (*CreateFeedbackImageRequest)(nil), // 50: api.CreateFeedbackImageRequest + (*GetMemberRequest)(nil), // 51: api.GetMemberRequest + (*GetMemberReply)(nil), // 52: api.GetMemberReply + (*GetUploadStatusRequest)(nil), // 53: api.GetUploadStatusRequest + (*GetUploadStatusReply)(nil), // 54: api.GetUploadStatusReply + (*GetNotificationRequest)(nil), // 55: api.GetNotificationRequest + (*GetNotificationReply)(nil), // 56: api.GetNotificationReply + (*GetNotificationConfirmRequest)(nil), // 57: api.GetNotificationConfirmRequest + (*GetNotificationConfirmReply)(nil), // 58: api.GetNotificationConfirmReply + (*GetCanteenHeadCountRequest)(nil), // 59: api.GetCanteenHeadCountRequest + (*GetCanteenHeadCountReply)(nil), // 60: api.GetCanteenHeadCountReply + (*ListStudentClubRequest)(nil), // 61: api.ListStudentClubRequest + (*ListStudentClubReply)(nil), // 62: api.ListStudentClubReply + (*StudentClub)(nil), // 63: api.StudentClub + (*StudentClubCollection)(nil), // 64: api.StudentClubCollection + (*timestamppb.Timestamp)(nil), // 65: google.protobuf.Timestamp } var file_tumdev_campus_backend_proto_depIdxs = []int32{ 0, // 0: api.CreateDeviceRequest.device_type:type_name -> api.DeviceType 0, // 1: api.DeleteDeviceRequest.device_type:type_name -> api.DeviceType - 64, // 2: api.News.created:type_name -> google.protobuf.Timestamp - 64, // 3: api.News.date:type_name -> google.protobuf.Timestamp - 6, // 4: api.ListNewsReply.news:type_name -> api.News - 64, // 5: api.ListNewsRequest.oldest_date_at:type_name -> google.protobuf.Timestamp - 11, // 6: api.ListNewsSourcesReply.sources:type_name -> api.NewsSource - 14, // 7: api.ListNewsAlertsReply.alerts:type_name -> api.NewsAlert - 64, // 8: api.NewsAlert.created:type_name -> google.protobuf.Timestamp - 64, // 9: api.NewsAlert.from:type_name -> google.protobuf.Timestamp - 64, // 10: api.NewsAlert.to:type_name -> google.protobuf.Timestamp - 64, // 11: api.ListCanteenRatingsRequest.from:type_name -> google.protobuf.Timestamp - 64, // 12: api.ListCanteenRatingsRequest.to:type_name -> google.protobuf.Timestamp - 19, // 13: api.ListCanteenRatingsReply.rating:type_name -> api.SingleRatingReply - 33, // 14: api.ListCanteenRatingsReply.rating_tags:type_name -> api.RatingTagResult - 64, // 15: api.GetDishRatingsRequest.from:type_name -> google.protobuf.Timestamp - 64, // 16: api.GetDishRatingsRequest.to:type_name -> google.protobuf.Timestamp - 19, // 17: api.GetDishRatingsReply.rating:type_name -> api.SingleRatingReply - 33, // 18: api.GetDishRatingsReply.rating_tags:type_name -> api.RatingTagResult - 33, // 19: api.GetDishRatingsReply.name_tags:type_name -> api.RatingTagResult - 32, // 20: api.SingleRatingReply.rating_tags:type_name -> api.RatingTagNewRequest - 64, // 21: api.SingleRatingReply.visited:type_name -> google.protobuf.Timestamp - 31, // 22: api.CreateCanteenRatingRequest.rating_tags:type_name -> api.RatingTag - 31, // 23: api.CreateDishRatingRequest.rating_tags:type_name -> api.RatingTag - 30, // 24: api.ListAvailableDishTagsReply.rating_tags:type_name -> api.TagsOverview - 30, // 25: api.ListNameTagsReply.rating_tags:type_name -> api.TagsOverview - 30, // 26: api.ListAvailableCanteenTagsReply.rating_tags:type_name -> api.TagsOverview - 36, // 27: api.ListCanteensReply.canteen:type_name -> api.Canteen - 64, // 28: api.ListMoviesRequest.oldest_date_at:type_name -> google.protobuf.Timestamp - 44, // 29: api.ListMoviesReply.movies:type_name -> api.Movie - 64, // 30: api.Movie.date:type_name -> google.protobuf.Timestamp - 64, // 31: api.Movie.created:type_name -> google.protobuf.Timestamp - 1, // 32: api.CreateFeedbackRequest.recipient:type_name -> api.CreateFeedbackRequest.Recipient - 46, // 33: api.CreateFeedbackRequest.location:type_name -> api.Coordinate - 64, // 34: api.GetCanteenHeadCountReply.timestamp:type_name -> google.protobuf.Timestamp - 63, // 35: api.ListStudentClubReply.collections:type_name -> api.StudentClubCollection - 62, // 36: api.StudentClubCollection.clubs:type_name -> api.StudentClub - 12, // 37: api.Campus.ListNewsAlerts:input_type -> api.ListNewsAlertsRequest - 9, // 38: api.Campus.ListNewsSources:input_type -> api.ListNewsSourcesRequest - 8, // 39: api.Campus.ListNews:input_type -> api.ListNewsRequest - 15, // 40: api.Campus.ListCanteenRatings:input_type -> api.ListCanteenRatingsRequest - 17, // 41: api.Campus.GetDishRatings:input_type -> api.GetDishRatingsRequest - 21, // 42: api.Campus.CreateCanteenRating:input_type -> api.CreateCanteenRatingRequest - 23, // 43: api.Campus.CreateDishRating:input_type -> api.CreateDishRatingRequest - 24, // 44: api.Campus.ListAvailableDishTags:input_type -> api.ListAvailableDishTagsRequest - 26, // 45: api.Campus.ListNameTags:input_type -> api.ListNameTagsRequest - 28, // 46: api.Campus.ListAvailableCanteenTags:input_type -> api.ListAvailableCanteenTagsRequest - 34, // 47: api.Campus.ListCanteens:input_type -> api.ListCanteensRequest - 37, // 48: api.Campus.ListDishes:input_type -> api.ListDishesRequest - 40, // 49: api.Campus.GetUpdateNote:input_type -> api.GetUpdateNoteRequest - 42, // 50: api.Campus.ListMovies:input_type -> api.ListMoviesRequest - 45, // 51: api.Campus.CreateFeedback:input_type -> api.CreateFeedbackRequest - 52, // 52: api.Campus.GetUploadStatus:input_type -> api.GetUploadStatusRequest - 54, // 53: api.Campus.GetNotification:input_type -> api.GetNotificationRequest - 56, // 54: api.Campus.GetNotificationConfirm:input_type -> api.GetNotificationConfirmRequest - 50, // 55: api.Campus.GetMember:input_type -> api.GetMemberRequest - 58, // 56: api.Campus.GetCanteenHeadCount:input_type -> api.GetCanteenHeadCountRequest - 2, // 57: api.Campus.CreateDevice:input_type -> api.CreateDeviceRequest - 4, // 58: api.Campus.DeleteDevice:input_type -> api.DeleteDeviceRequest - 60, // 59: api.Campus.ListStudentClub:input_type -> api.ListStudentClubRequest - 13, // 60: api.Campus.ListNewsAlerts:output_type -> api.ListNewsAlertsReply - 10, // 61: api.Campus.ListNewsSources:output_type -> api.ListNewsSourcesReply - 7, // 62: api.Campus.ListNews:output_type -> api.ListNewsReply - 16, // 63: api.Campus.ListCanteenRatings:output_type -> api.ListCanteenRatingsReply - 18, // 64: api.Campus.GetDishRatings:output_type -> api.GetDishRatingsReply - 20, // 65: api.Campus.CreateCanteenRating:output_type -> api.CreateCanteenRatingReply - 22, // 66: api.Campus.CreateDishRating:output_type -> api.CreateDishRatingReply - 25, // 67: api.Campus.ListAvailableDishTags:output_type -> api.ListAvailableDishTagsReply - 27, // 68: api.Campus.ListNameTags:output_type -> api.ListNameTagsReply - 29, // 69: api.Campus.ListAvailableCanteenTags:output_type -> api.ListAvailableCanteenTagsReply - 35, // 70: api.Campus.ListCanteens:output_type -> api.ListCanteensReply - 38, // 71: api.Campus.ListDishes:output_type -> api.ListDishesReply - 41, // 72: api.Campus.GetUpdateNote:output_type -> api.GetUpdateNoteReply - 43, // 73: api.Campus.ListMovies:output_type -> api.ListMoviesReply - 47, // 74: api.Campus.CreateFeedback:output_type -> api.CreateFeedbackReply - 53, // 75: api.Campus.GetUploadStatus:output_type -> api.GetUploadStatusReply - 55, // 76: api.Campus.GetNotification:output_type -> api.GetNotificationReply - 57, // 77: api.Campus.GetNotificationConfirm:output_type -> api.GetNotificationConfirmReply - 51, // 78: api.Campus.GetMember:output_type -> api.GetMemberReply - 59, // 79: api.Campus.GetCanteenHeadCount:output_type -> api.GetCanteenHeadCountReply - 3, // 80: api.Campus.CreateDevice:output_type -> api.CreateDeviceReply - 5, // 81: api.Campus.DeleteDevice:output_type -> api.DeleteDeviceReply - 61, // 82: api.Campus.ListStudentClub:output_type -> api.ListStudentClubReply - 60, // [60:83] is the sub-list for method output_type - 37, // [37:60] is the sub-list for method input_type - 37, // [37:37] is the sub-list for extension type_name - 37, // [37:37] is the sub-list for extension extendee - 0, // [0:37] is the sub-list for field type_name + 65, // 2: api.News.created:type_name -> google.protobuf.Timestamp + 65, // 3: api.News.date:type_name -> google.protobuf.Timestamp + 7, // 4: api.ListNewsReply.news:type_name -> api.News + 65, // 5: api.ListNewsRequest.oldest_date_at:type_name -> google.protobuf.Timestamp + 12, // 6: api.ListNewsSourcesReply.sources:type_name -> api.NewsSource + 15, // 7: api.ListNewsAlertsReply.alerts:type_name -> api.NewsAlert + 65, // 8: api.NewsAlert.created:type_name -> google.protobuf.Timestamp + 65, // 9: api.NewsAlert.from:type_name -> google.protobuf.Timestamp + 65, // 10: api.NewsAlert.to:type_name -> google.protobuf.Timestamp + 65, // 11: api.ListCanteenRatingsRequest.from:type_name -> google.protobuf.Timestamp + 65, // 12: api.ListCanteenRatingsRequest.to:type_name -> google.protobuf.Timestamp + 20, // 13: api.ListCanteenRatingsReply.rating:type_name -> api.SingleRatingReply + 34, // 14: api.ListCanteenRatingsReply.rating_tags:type_name -> api.RatingTagResult + 65, // 15: api.GetDishRatingsRequest.from:type_name -> google.protobuf.Timestamp + 65, // 16: api.GetDishRatingsRequest.to:type_name -> google.protobuf.Timestamp + 20, // 17: api.GetDishRatingsReply.rating:type_name -> api.SingleRatingReply + 34, // 18: api.GetDishRatingsReply.rating_tags:type_name -> api.RatingTagResult + 34, // 19: api.GetDishRatingsReply.name_tags:type_name -> api.RatingTagResult + 33, // 20: api.SingleRatingReply.rating_tags:type_name -> api.RatingTagNewRequest + 65, // 21: api.SingleRatingReply.visited:type_name -> google.protobuf.Timestamp + 32, // 22: api.CreateCanteenRatingRequest.rating_tags:type_name -> api.RatingTag + 32, // 23: api.CreateDishRatingRequest.rating_tags:type_name -> api.RatingTag + 31, // 24: api.ListAvailableDishTagsReply.rating_tags:type_name -> api.TagsOverview + 31, // 25: api.ListNameTagsReply.rating_tags:type_name -> api.TagsOverview + 31, // 26: api.ListAvailableCanteenTagsReply.rating_tags:type_name -> api.TagsOverview + 37, // 27: api.ListCanteensReply.canteen:type_name -> api.Canteen + 65, // 28: api.ListMoviesRequest.oldest_date_at:type_name -> google.protobuf.Timestamp + 45, // 29: api.ListMoviesReply.movies:type_name -> api.Movie + 65, // 30: api.Movie.date:type_name -> google.protobuf.Timestamp + 65, // 31: api.Movie.created:type_name -> google.protobuf.Timestamp + 2, // 32: api.CreateFeedbackRequest.recipient:type_name -> api.CreateFeedbackRequest.Recipient + 47, // 33: api.CreateFeedbackRequest.location:type_name -> api.Coordinate + 65, // 34: api.GetCanteenHeadCountReply.timestamp:type_name -> google.protobuf.Timestamp + 1, // 35: api.ListStudentClubRequest.language:type_name -> api.Language + 64, // 36: api.ListStudentClubReply.collections:type_name -> api.StudentClubCollection + 63, // 37: api.StudentClubCollection.clubs:type_name -> api.StudentClub + 13, // 38: api.Campus.ListNewsAlerts:input_type -> api.ListNewsAlertsRequest + 10, // 39: api.Campus.ListNewsSources:input_type -> api.ListNewsSourcesRequest + 9, // 40: api.Campus.ListNews:input_type -> api.ListNewsRequest + 16, // 41: api.Campus.ListCanteenRatings:input_type -> api.ListCanteenRatingsRequest + 18, // 42: api.Campus.GetDishRatings:input_type -> api.GetDishRatingsRequest + 22, // 43: api.Campus.CreateCanteenRating:input_type -> api.CreateCanteenRatingRequest + 24, // 44: api.Campus.CreateDishRating:input_type -> api.CreateDishRatingRequest + 25, // 45: api.Campus.ListAvailableDishTags:input_type -> api.ListAvailableDishTagsRequest + 27, // 46: api.Campus.ListNameTags:input_type -> api.ListNameTagsRequest + 29, // 47: api.Campus.ListAvailableCanteenTags:input_type -> api.ListAvailableCanteenTagsRequest + 35, // 48: api.Campus.ListCanteens:input_type -> api.ListCanteensRequest + 38, // 49: api.Campus.ListDishes:input_type -> api.ListDishesRequest + 41, // 50: api.Campus.GetUpdateNote:input_type -> api.GetUpdateNoteRequest + 43, // 51: api.Campus.ListMovies:input_type -> api.ListMoviesRequest + 46, // 52: api.Campus.CreateFeedback:input_type -> api.CreateFeedbackRequest + 53, // 53: api.Campus.GetUploadStatus:input_type -> api.GetUploadStatusRequest + 55, // 54: api.Campus.GetNotification:input_type -> api.GetNotificationRequest + 57, // 55: api.Campus.GetNotificationConfirm:input_type -> api.GetNotificationConfirmRequest + 51, // 56: api.Campus.GetMember:input_type -> api.GetMemberRequest + 59, // 57: api.Campus.GetCanteenHeadCount:input_type -> api.GetCanteenHeadCountRequest + 3, // 58: api.Campus.CreateDevice:input_type -> api.CreateDeviceRequest + 5, // 59: api.Campus.DeleteDevice:input_type -> api.DeleteDeviceRequest + 61, // 60: api.Campus.ListStudentClub:input_type -> api.ListStudentClubRequest + 14, // 61: api.Campus.ListNewsAlerts:output_type -> api.ListNewsAlertsReply + 11, // 62: api.Campus.ListNewsSources:output_type -> api.ListNewsSourcesReply + 8, // 63: api.Campus.ListNews:output_type -> api.ListNewsReply + 17, // 64: api.Campus.ListCanteenRatings:output_type -> api.ListCanteenRatingsReply + 19, // 65: api.Campus.GetDishRatings:output_type -> api.GetDishRatingsReply + 21, // 66: api.Campus.CreateCanteenRating:output_type -> api.CreateCanteenRatingReply + 23, // 67: api.Campus.CreateDishRating:output_type -> api.CreateDishRatingReply + 26, // 68: api.Campus.ListAvailableDishTags:output_type -> api.ListAvailableDishTagsReply + 28, // 69: api.Campus.ListNameTags:output_type -> api.ListNameTagsReply + 30, // 70: api.Campus.ListAvailableCanteenTags:output_type -> api.ListAvailableCanteenTagsReply + 36, // 71: api.Campus.ListCanteens:output_type -> api.ListCanteensReply + 39, // 72: api.Campus.ListDishes:output_type -> api.ListDishesReply + 42, // 73: api.Campus.GetUpdateNote:output_type -> api.GetUpdateNoteReply + 44, // 74: api.Campus.ListMovies:output_type -> api.ListMoviesReply + 48, // 75: api.Campus.CreateFeedback:output_type -> api.CreateFeedbackReply + 54, // 76: api.Campus.GetUploadStatus:output_type -> api.GetUploadStatusReply + 56, // 77: api.Campus.GetNotification:output_type -> api.GetNotificationReply + 58, // 78: api.Campus.GetNotificationConfirm:output_type -> api.GetNotificationConfirmReply + 52, // 79: api.Campus.GetMember:output_type -> api.GetMemberReply + 60, // 80: api.Campus.GetCanteenHeadCount:output_type -> api.GetCanteenHeadCountReply + 4, // 81: api.Campus.CreateDevice:output_type -> api.CreateDeviceReply + 6, // 82: api.Campus.DeleteDevice:output_type -> api.DeleteDeviceReply + 62, // 83: api.Campus.ListStudentClub:output_type -> api.ListStudentClubReply + 61, // [61:84] is the sub-list for method output_type + 38, // [38:61] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 38, // [38:38] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name } func init() { file_tumdev_campus_backend_proto_init() } @@ -4754,759 +4709,14 @@ func file_tumdev_campus_backend_proto_init() { if File_tumdev_campus_backend_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_tumdev_campus_backend_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeviceReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeviceReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*News); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListNewsReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListNewsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListNewsSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListNewsSourcesReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*NewsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListNewsAlertsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListNewsAlertsReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*NewsAlert); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListCanteenRatingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListCanteenRatingsReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetDishRatingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetDishRatingsReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SingleRatingReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateCanteenRatingReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateCanteenRatingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CreateDishRatingReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CreateDishRatingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListAvailableDishTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListAvailableDishTagsReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListNameTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListNameTagsReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListAvailableCanteenTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListAvailableCanteenTagsReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*TagsOverview); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*RatingTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*RatingTagNewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*RatingTagResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListCanteensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListCanteensReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Canteen); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListDishesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListDishesReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*RoomInformationElement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*GetUpdateNoteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*GetUpdateNoteReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ListMoviesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ListMoviesReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Movie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeedbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Coordinate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeedbackReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeedbackImageReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeedbackImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*GetMemberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*GetMemberReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*GetUploadStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*GetUploadStatusReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationConfirmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationConfirmReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*GetCanteenHeadCountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*GetCanteenHeadCountReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*ListStudentClubRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*ListStudentClubReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*StudentClub); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_tumdev_campus_backend_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*StudentClubCollection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } + file_tumdev_campus_backend_proto_msgTypes[58].OneofWrappers = []any{} file_tumdev_campus_backend_proto_msgTypes[60].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_tumdev_campus_backend_proto_rawDesc, - NumEnums: 2, + NumEnums: 3, NumMessages: 62, NumExtensions: 0, NumServices: 1, diff --git a/server/api/tumdev/campus_backend.pb.gw.go b/server/api/tumdev/campus_backend.pb.gw.go index 918e3225..2331f4cf 100644 --- a/server/api/tumdev/campus_backend.pb.gw.go +++ b/server/api/tumdev/campus_backend.pb.gw.go @@ -855,10 +855,21 @@ func local_request_Campus_DeleteDevice_0(ctx context.Context, marshaler runtime. } +var ( + filter_Campus_ListStudentClub_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_Campus_ListStudentClub_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListStudentClubRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListStudentClub_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.ListStudentClub(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -868,6 +879,13 @@ func local_request_Campus_ListStudentClub_0(ctx context.Context, marshaler runti var protoReq ListStudentClubRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListStudentClub_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.ListStudentClub(ctx, &protoReq) return msg, metadata, err diff --git a/server/api/tumdev/campus_backend.proto b/server/api/tumdev/campus_backend.proto index 861c8a5b..4ecb265c 100644 --- a/server/api/tumdev/campus_backend.proto +++ b/server/api/tumdev/campus_backend.proto @@ -564,7 +564,17 @@ message GetCanteenHeadCountReply { // A time stamp indicating how up to date the response is. Only valid in case percent != -1. google.protobuf.Timestamp timestamp = 4; } -message ListStudentClubRequest {} + +enum Language { + German = 0; + English = 1; +} + +message ListStudentClubRequest { + // Language of the student clubs and categories + // Defaults to german + optional Language language = 1; +} message ListStudentClubReply { repeated StudentClubCollection collections = 1; } @@ -582,4 +592,7 @@ message StudentClubCollection { string title = 1; string description = 2; repeated StudentClub clubs = 3; + // id of the collection. + // Might not be stable over time because of scraping + uint64 unstable_collection_id = 4; } diff --git a/server/api/tumdev/campus_backend.swagger.json b/server/api/tumdev/campus_backend.swagger.json index d2649ae9..2dd61a13 100644 --- a/server/api/tumdev/campus_backend.swagger.json +++ b/server/api/tumdev/campus_backend.swagger.json @@ -805,6 +805,20 @@ } } }, + "parameters": [ + { + "name": "language", + "description": "Language of the student clubs and categories\nDefaults to german", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "German", + "English" + ], + "default": "German" + } + ], "tags": [ "Campus" ] @@ -1172,6 +1186,14 @@ } } }, + "apiLanguage": { + "type": "string", + "enum": [ + "German", + "English" + ], + "default": "German" + }, "apiListAvailableCanteenTagsReply": { "type": "object", "properties": { @@ -1622,6 +1644,11 @@ "type": "object", "$ref": "#/definitions/apiStudentClub" } + }, + "unstableCollectionId": { + "type": "string", + "format": "uint64", + "title": "id of the collection.\nMight not be stable over time because of scraping" } } }, diff --git a/server/backend/cafeteria.go b/server/backend/cafeteria.go index 6a679497..2750b781 100644 --- a/server/backend/cafeteria.go +++ b/server/backend/cafeteria.go @@ -58,7 +58,7 @@ func (s *CampusServer) ListCanteenRatings(ctx context.Context, input *pb.ListCan // queryLastCafeteriaRatingsWithLimit // Queries the actual ratings for a cafeteria and attaches the tag ratings which belong to the ratings func queryLastCafeteriaRatingsWithLimit(input *pb.ListCanteenRatingsRequest, cafeteriaID int32, tx *gorm.DB) []*pb.SingleRatingReply { - var ratings []model.CafeteriaRating + var ratings []model.CanteenRating var err error var limit = int(input.Limit) @@ -81,7 +81,8 @@ func queryLastCafeteriaRatingsWithLimit(input *pb.ListCanteenRatingsRequest, caf } else { to = input.To.AsTime() } - err = tx.Order("timestamp desc, cafeteriaRating desc"). + err = tx. + Order("timestamp desc, cafeteriaRating desc"). Limit(limit). Find(&ratings, "cafeteriaID = ? AND timestamp < ? AND timestamp > ?", cafeteriaID, to, from).Error } else { @@ -233,25 +234,25 @@ func queryTags(cafeteriaID int32, dishID int32, ratingType model.ModelType, tx * var results []queryRatingTag var err error if ratingType == model.DISH { - err = tx.Table("dish_rating_tag_option options"). + err = tx.Table("dish_rating_tag_options options"). Joins("JOIN dish_rating_tag_statistics results ON options.dishRatingTagOption = results.tagID"). Select("options.dishRatingTagOption as tagId, results.average as avg, "+ "results.min as min, results.max as max, results.std as std"). Where("results.cafeteriaID = ? AND results.dishID = ?", cafeteriaID, dishID). Scan(&results).Error } else if ratingType == model.CAFETERIA { - err = tx.Table("cafeteria_rating_tag_option options"). + err = tx.Table("cafeteria_rating_tag_options options"). Joins("JOIN cafeteria_rating_tag_statistics results ON options.cafeteriaRatingTagOption = results.tagID"). Select("options.cafeteriaRatingTagOption as tagId, results.average as avg, "+ "results.min as min, results.max as max, results.std as std"). Where("results.cafeteriaID = ?", cafeteriaID). Scan(&results).Error } else { //Query for name tags - err = tx.Table("dish_to_dish_name_tag mapping"). + err = tx.Table("dish_to_dish_name_tags mapping"). Where("mapping.dishID = ?", dishID). Select("mapping.nameTagID as tag"). Joins("JOIN dish_name_tag_statistics results ON mapping.nameTagID = results.tagID"). - Joins("JOIN dish_name_tag_option options ON mapping.nameTagID = options.dishNameTagOption"). + Joins("JOIN dish_name_tag_options options ON mapping.nameTagID = options.dishNameTagOption"). Select("mapping.nameTagID as tagId, results.average as avg, " + "results.min as min, results.max as max, results.std as std"). Scan(&results).Error @@ -282,13 +283,13 @@ func queryTagRatingsOverviewForRating(dishID int64, ratingType model.ModelType, var results []*pb.RatingTagNewRequest var err error if ratingType == model.DISH { - err = tx.Table("dish_rating_tag_option options"). - Joins("JOIN dish_rating_tag rating ON options.dishRatingTagOption = rating.tagID"). + err = tx.Table("dish_rating_tag_options options"). + Joins("JOIN dish_rating_tags rating ON options.dishRatingTagOption = rating.tagID"). Select("dishRatingTagOption as tagId, points, parentRating"). Find(&results, "parentRating = ?", dishID).Error } else { - err = tx.Table("cafeteria_rating_tag_option options"). - Joins("JOIN cafeteria_rating_tag rating ON options.cafeteriaRatingTagOption = rating.tagID"). + err = tx.Table("cafeteria_rating_tag_options options"). + Joins("JOIN cafeteria_rating_tags rating ON options.cafeteriaRatingTagOption = rating.tagID"). Select("cafeteriaRatingTagOption as tagId, points, correspondingRating"). Find(&results, "correspondingRating = ?", dishID).Error } @@ -312,7 +313,7 @@ func (s *CampusServer) CreateCanteenRating(ctx context.Context, input *pb.Create } resPath := imageWrapper(input.Image, "cafeterias", cafeteriaID) - rating := model.CafeteriaRating{ + rating := model.CanteenRating{ Comment: input.Comment, Points: input.Points, CafeteriaID: cafeteriaID, @@ -411,7 +412,7 @@ func (s *CampusServer) CreateDishRating(ctx context.Context, input *pb.CreateDis return nil, status.Error(codes.Internal, "Error while creating the new rating in the database. Rating has not been saved.") } - assignDishNameTag(rating, dishInCafeteria.Dish, tx) + assignDishNameTag(&rating, dishInCafeteria.Dish, tx) if err := storeRatingTags(rating.DishRating, input.RatingTags, model.DISH, tx); err != nil { return &pb.CreateDishRatingReply{}, err @@ -421,7 +422,7 @@ func (s *CampusServer) CreateDishRating(ctx context.Context, input *pb.CreateDis // assignDishNameTag // Query all name tags for this specific dish and generate the DishNameTag Ratings ffor each name tag -func assignDishNameTag(rating model.DishRating, dishID int64, tx *gorm.DB) { +func assignDishNameTag(rating *model.DishRating, dishID int64, tx *gorm.DB) { var nameTagIDs []int64 err := tx.Model(&model.DishToDishNameTag{}). Where("dishID = ? ", dishID). @@ -432,9 +433,9 @@ func assignDishNameTag(rating model.DishRating, dishID int64, tx *gorm.DB) { } else { for _, tagID := range nameTagIDs { if err := tx.Create(&model.DishNameTag{ - CorrespondingRating: rating.DishRating, - Points: rating.Points, - TagNameID: tagID, + RatingID: rating.DishRating, + Points: rating.Points, + TagNameID: tagID, }).Error; err != nil { log.WithError(err).Error("while creating a new dish name rating.") } @@ -457,10 +458,10 @@ func inputSanitizationForNewRatingElements(rating int32, comment string, cafeter return -1, status.Error(codes.InvalidArgument, "Comments must not contain @ symbols in order to prevent misuse. Rating has not been saved.") } - var result *model.Cafeteria + var result *model.Canteen if res := tx.First(&result, "name LIKE ?", cafeteriaName); errors.Is(res.Error, gorm.ErrRecordNotFound) || res.RowsAffected == 0 { log.WithError(res.Error).Error("Error while querying the cafeteria id by name: ", cafeteriaName) - return -1, status.Error(codes.InvalidArgument, "Cafeteria does not exist. Rating has not been saved.") + return -1, status.Error(codes.InvalidArgument, "Canteen does not exist. Rating has not been saved.") } return result.Cafeteria, nil @@ -473,8 +474,7 @@ func storeRatingTags(parentRatingID int64, tags []*pb.RatingTag, tagType model.M var errorOccurred = "" var warningOccurred = "" if len(tags) > 0 { - usedTagIds := make(map[int]int) - insertModel := getModelStoreTag(tagType, tx) + usedTagIds := make(map[int64]bool) for _, currentTag := range tags { var err error var count int64 @@ -484,7 +484,7 @@ func storeRatingTags(parentRatingID int64, tags []*pb.RatingTag, tagType model.M Where("dishRatingTagOption LIKE ?", currentTag.TagId). Count(&count).Error } else { - err = tx.Model(&model.CafeteriaRatingTagOption{}). + err = tx.Model(&model.CanteenRatingTagOption{}). Where("cafeteriaRatingTagOption LIKE ?", currentTag.TagId). Count(&count).Error } @@ -497,17 +497,25 @@ func storeRatingTags(parentRatingID int64, tags []*pb.RatingTag, tagType model.M log.WithFields(fields).Info("tag does not exist") errorOccurred = fmt.Sprintf("%s, %d", errorOccurred, currentTag.TagId) } else { - if usedTagIds[int(currentTag.TagId)] == 0 { - err := insertModel. - Create(&model.DishRatingTag{ - CorrespondingRating: parentRatingID, - Points: int32(currentTag.Points), - TagID: currentTag.TagId, - }).Error - if err != nil { - log.WithError(err).Error("while Creating a currentTag rating for a new rating.") + if !usedTagIds[currentTag.TagId] { + if tagType == model.DISH { + if err := tx.Create(&model.DishRatingTag{ + RatingID: parentRatingID, + Points: int32(currentTag.Points), + TagID: currentTag.TagId, + }).Error; err != nil { + log.WithError(err).Error("while Creating a currentTag rating for a new rating.") + } + } else { + if err := tx.Create(&model.CanteenRatingTag{ + RatingID: parentRatingID, + Points: int32(currentTag.Points), + TagID: currentTag.TagId, + }).Error; err != nil { + log.WithError(err).Error("while Creating a currentTag rating for a new rating.") + } } - usedTagIds[int(currentTag.TagId)] = 1 + usedTagIds[currentTag.TagId] = true } else { warningOccurred = fmt.Sprintf("%s, %d", warningOccurred, currentTag.TagId) @@ -527,20 +535,11 @@ func storeRatingTags(parentRatingID int64, tags []*pb.RatingTag, tagType model.M } else { return nil } - -} - -func getModelStoreTag(tagType model.ModelType, tx *gorm.DB) *gorm.DB { - if tagType == model.DISH { - return tx.Model(&model.DishRatingTag{}) - } else { - return tx.Model(&model.CafeteriaRatingTag{}) - } } func getIDForCafeteriaName(name string, tx *gorm.DB) int32 { var result int32 = -1 - err := tx.Model(&model.Cafeteria{}). + err := tx.Model(&model.Canteen{}). Where("name LIKE ?", name). Select("cafeteria"). Scan(&result).Error @@ -609,7 +608,7 @@ func (s *CampusServer) GetAvailableCafeteriaTags(ctx context.Context, _ *pb.List var result []*pb.TagsOverview var requestStatus error = nil err := s.db.WithContext(ctx). - Model(&model.CafeteriaRatingTagOption{}). + Model(&model.CanteenRatingTagOption{}). Select("DE as de, EN as en, cafeteriaRatingsTagOption as TagId"). Find(&result).Error if err != nil { @@ -628,7 +627,7 @@ func (s *CampusServer) GetCafeterias(ctx context.Context, _ *pb.ListCanteensRequ var result []*pb.Canteen var requestStatus error = nil if err := s.db.WithContext(ctx). - Model(&model.Cafeteria{}). + Model(&model.Canteen{}). Select("cafeteria as id,address,latitude,longitude"). Scan(&result).Error; err != nil { log.WithError(err).Error("while loading Cafeterias from database.") @@ -657,7 +656,7 @@ func (s *CampusServer) ListDishes(ctx context.Context, req *pb.ListDishesRequest cafeteriaName := strings.ReplaceAll(strings.ToUpper(req.CanteenId), "-", "_") err := s.db.WithContext(ctx). - Table("dishes_of_the_week weekly"). + Table("dishes_of_the_weeks weekly"). Where("weekly.day = ? AND weekly.week = ? and weekly.year = ?", req.Day, req.Week, req.Year). Select("weekly.dishID"). Joins("JOIN dish d ON d.dish = weekly.dishID"). diff --git a/server/backend/cron/cronjobs.go b/server/backend/cron/cronjobs.go index 8e11f02a..f6d284b3 100644 --- a/server/backend/cron/cronjobs.go +++ b/server/backend/cron/cronjobs.go @@ -3,6 +3,8 @@ package cron import ( "time" + pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev" + "github.com/TUM-Dev/Campus-Backend/server/model" "github.com/mmcdole/gofeed" log "github.com/sirupsen/logrus" @@ -69,7 +71,8 @@ func (c *CronService) Run() error { // Run each job in a separate goroutine, so we can parallelize them switch cronjob.Type.String { case StudentClubType: - g.Go(func() error { return c.studentClubCron() }) + g.Go(func() error { return c.studentClubCron(pb.Language_German) }) + g.Go(func() error { return c.studentClubCron(pb.Language_English) }) case NewsType: // if this is not copied here, this may not be threads save due to go's guarantees // loop variable cronjob captured by func literal (govet) diff --git a/server/backend/cron/dish_name_download.go b/server/backend/cron/dish_name_download.go index 07f36fae..1aa3fe07 100644 --- a/server/backend/cron/dish_name_download.go +++ b/server/backend/cron/dish_name_download.go @@ -24,8 +24,8 @@ type CafeteriaWithID struct { } type CanteenLocation struct { - Longitude float32 `json:"longitude"` - Latitude float32 `json:"latitude"` + Longitude float64 `json:"longitude"` + Latitude float64 `json:"latitude"` Address string `json:"address"` } @@ -51,7 +51,7 @@ func (c *CronService) dishNameDownloadCron() error { } func downloadDailyDishes(c *CronService) { - var results []model.Cafeteria + var results []model.Canteen if err := c.db.Find(&results).Error; err != nil { log.WithError(err).Error("Error while querying all cafeteria names from the database.") return @@ -145,13 +145,13 @@ func downloadCanteenNames(c *CronService) { } for _, cafeteriaName := range cafeteriaNames { - mensa := model.Cafeteria{ + mensa := model.Canteen{ Name: cafeteriaName.Name, Address: cafeteriaName.Location.Address, Latitude: cafeteriaName.Location.Latitude, Longitude: cafeteriaName.Location.Longitude, } - var cafeteriaResult model.Cafeteria + var cafeteriaResult model.Canteen if err := c.db.First(&cafeteriaResult, "name = ?", cafeteriaName.Name).Error; err != nil { if err := c.db.Create(&mensa).Error; err != nil { log.WithError(err).Error("Error while creating the db entry for the cafeteria ", cafeteriaName.Name) @@ -170,7 +170,7 @@ func downloadCanteenNames(c *CronService) { func addDishTagsToMapping(dishID int64, dishName string, db *gorm.DB) { lowercaseDish := strings.ToLower(dishName) var includedTags []int64 - if err := db.Model(&model.DishNameTagOptionIncluded{}). + if err := db.Model(&model.IncludedDishNameTagOption{}). Where("? LIKE CONCAT('%', expression ,'%')", lowercaseDish). Select("nameTagID"). Scan(&includedTags).Error; err != nil { @@ -178,7 +178,7 @@ func addDishTagsToMapping(dishID int64, dishName string, db *gorm.DB) { } var excludedTags []int64 - if err := db.Model(&model.DishNameTagOptionExcluded{}). + if err := db.Model(&model.ExcludedDishNameTagOption{}). Where("? LIKE CONCAT('%', expression ,'%')", lowercaseDish). Select("nameTagID"). Scan(&excludedTags).Error; err != nil { diff --git a/server/backend/cron/feedback_email.go b/server/backend/cron/feedback_email.go index c33d2ffc..be974f04 100644 --- a/server/backend/cron/feedback_email.go +++ b/server/backend/cron/feedback_email.go @@ -71,11 +71,7 @@ func messageWithHeaders(feedback *model.Feedback) *gomail.Message { m.SetHeader("Reply-To", feedback.ReplyToEmail.String) } // Timestamp - if feedback.Timestamp.Valid { - m.SetDateHeader("Date", feedback.Timestamp.Time) - } else { - m.SetDateHeader("Date", time.Now()) - } + m.SetDateHeader("Date", feedback.Timestamp) // Subject if feedback.Recipient == "app@tum.de" { versionString := "TCA" diff --git a/server/backend/cron/feedback_email_test.go b/server/backend/cron/feedback_email_test.go index 52f5e6a1..27c5d7c7 100644 --- a/server/backend/cron/feedback_email_test.go +++ b/server/backend/cron/feedback_email_test.go @@ -33,7 +33,7 @@ func fullFeedback() *model.Feedback { Longitude: null.FloatFrom(0), AppVersion: null.StringFrom("TCA 10.2"), OsVersion: null.StringFrom("Android 10.0"), - Timestamp: null.TimeFrom(time.Now()), + Timestamp: time.Now(), } } @@ -49,7 +49,7 @@ func emptyFeedback() *model.Feedback { Longitude: null.Float{}, AppVersion: null.String{}, OsVersion: null.String{}, - Timestamp: null.Time{}, + Timestamp: time.Now(), } } @@ -61,7 +61,7 @@ func TestHeaderInstantiationWithFullFeedback(t *testing.T) { assert.Equal(t, []string{`"TUM Campus App" `}, m.GetHeader("From")) assert.Equal(t, []string{fb.Recipient}, m.GetHeader("To")) assert.Equal(t, []string{"\"Erika Mustermann\" "}, m.GetHeader("Reply-To")) - assert.Equal(t, []string{fb.Timestamp.Time.Format(time.RFC1123Z)}, m.GetHeader("Date")) + assert.Equal(t, []string{fb.Timestamp.Format(time.RFC1123Z)}, m.GetHeader("Date")) assert.Equal(t, []string{"Feedback via the TUM Campus App"}, m.GetHeader("Subject")) } diff --git a/server/backend/cron/movies.go b/server/backend/cron/movies.go index 8c510a92..09e2f6f6 100644 --- a/server/backend/cron/movies.go +++ b/server/backend/cron/movies.go @@ -32,7 +32,7 @@ func (c *CronService) movieCron() error { } log.Trace("parsing upcoming feed") var allMovieLinks []string - if err := c.db.Model(&model.Kino{}). + if err := c.db.Model(&model.Movie{}). Distinct(). Pluck("Link", &allMovieLinks).Error; err != nil { return err @@ -70,7 +70,7 @@ func (c *CronService) movieCron() error { log.WithFields(logFields).WithError(err).Error("error while finding imdb id") continue } - movie := model.Kino{ + movie := model.Movie{ Date: date, Title: item.Title, Location: null.StringFrom(item.Location), diff --git a/server/backend/cron/student_clubs.go b/server/backend/cron/student_clubs.go index e74534db..e6a65343 100644 --- a/server/backend/cron/student_clubs.go +++ b/server/backend/cron/student_clubs.go @@ -7,6 +7,8 @@ import ( "io" "strings" + pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev" + "github.com/TUM-Dev/Campus-Backend/server/backend/cron/student_club_parsers" "gorm.io/gorm" @@ -20,8 +22,8 @@ const ( StudentClubImageDirectory = "student_club/" ) -func (c *CronService) studentClubCron() error { - body, err := student_club_parsers.DownloadHtml("https://www.sv.tum.de/sv/hochschulgruppen/") +func (c *CronService) studentClubCron(language pb.Language) error { + body, err := student_club_parsers.DownloadHtml(svUrl(language)) defer func(Body io.ReadCloser) { if err := Body.Close(); err != nil { log.WithError(err).Error("Error while closing body") @@ -37,27 +39,31 @@ func (c *CronService) studentClubCron() error { // save the result of the previous steps (🎉) if err := c.db.Transaction(func(tx *gorm.DB) error { - if err := tx.Where("1 = 1").Delete(&model.StudentClub{}).Error; err != nil { + if err := tx.Where("language = ?", language.String()).Delete(&model.StudentClub{}).Error; err != nil { return err } - if err := tx.Where("1 = 1").Delete(&model.StudentClubCollection{}).Error; err != nil { + if err := tx.Where("language = ?", language.String()).Delete(&model.StudentClubCollection{}).Error; err != nil { return err } + nameToCollectionID := make(map[string]uint) for _, scrapedCollection := range scrapedCollections { collection := model.StudentClubCollection{ - ID: scrapedCollection.Name, + Name: scrapedCollection.Name, + Language: language.String(), Description: scrapedCollection.Description, } if err := tx.Create(&collection).Error; err != nil { return err } + nameToCollectionID[collection.Name] = collection.ID } for _, scrapedClub := range scrapedClubs { club := model.StudentClub{ + Language: language.String(), Name: scrapedClub.Name, Description: scrapedClub.Description, LinkUrl: scrapedClub.LinkUrl, - StudentClubCollectionID: scrapedClub.Collection, + StudentClubCollectionID: nameToCollectionID[scrapedClub.Collection], } if scrapedClub.ImageUrl.Valid { file, err := saveImageTo(tx, scrapedClub.ImageUrl.String, StudentClubImageDirectory) @@ -79,6 +85,13 @@ func (c *CronService) studentClubCron() error { return nil } +func svUrl(language pb.Language) string { + if language == pb.Language_English { + return "https://www.sv.tum.de/en/sv/student-groups/" + } + return "https://www.sv.tum.de/sv/hochschulgruppen/" +} + // saveImage saves an image to the database, so it can be downloaded by another cronjob and returns the file func saveImageTo(tx *gorm.DB, url string, path string) (*model.File, error) { seps := strings.SplitAfter(url, ".") diff --git a/server/backend/cron/student_clubs_test.go b/server/backend/cron/student_clubs_test.go index d0e07f24..c9fc8852 100644 --- a/server/backend/cron/student_clubs_test.go +++ b/server/backend/cron/student_clubs_test.go @@ -4,6 +4,8 @@ import ( "context" "testing" + pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev" + "github.com/TUM-Dev/Campus-Backend/server/model" "github.com/TUM-Dev/Campus-Backend/server/utils" "github.com/stretchr/testify/require" @@ -15,9 +17,13 @@ func TestCronService_studentClubCron(t *testing.T) { db := utils.SetupTestContainer(ctx, t) service := New(db) var clubs []model.StudentClub - db.WithContext(ctx).Find(&clubs) + require.NoError(t, db.WithContext(ctx).Find(&clubs).Error) require.Equal(t, []model.StudentClub{}, clubs) - require.NoError(t, service.studentClubCron()) - db.WithContext(ctx).Find(&clubs) + require.NoError(t, service.studentClubCron(pb.Language_German)) + require.NoError(t, db.WithContext(ctx).Find(&clubs).Error) + require.True(t, len(clubs) > 0) + require.NoError(t, db.WithContext(ctx).Where("1=1").Delete(&model.StudentClub{}).Error) + require.NoError(t, service.studentClubCron(pb.Language_English)) + require.NoError(t, db.WithContext(ctx).Find(&clubs).Error) require.True(t, len(clubs) > 0) } diff --git a/server/backend/migration/20210709193000.go b/server/backend/migration/20210709193000.go index d18a3cb5..9854285c 100644 --- a/server/backend/migration/20210709193000.go +++ b/server/backend/migration/20210709193000.go @@ -8,7 +8,7 @@ import ( ) type File struct { - File int64 `gorm:"primary_key;AUTO_INCREMENT;column:file;type:int;" json:"file"` + File int64 `gorm:"primary_key;autoIncrement;column:file;type:int;" json:"file"` Name string `gorm:"column:name;type:text;size:16777215;" json:"name"` Path string `gorm:"column:path;type:text;size:16777215;" json:"path"` Downloads int32 `gorm:"column:downloads;type:int;default:0;" json:"downloads"` diff --git a/server/backend/migration/20220713000000.go b/server/backend/migration/20220713000000.go index 69c65c19..1d071041 100644 --- a/server/backend/migration/20220713000000.go +++ b/server/backend/migration/20220713000000.go @@ -10,11 +10,11 @@ import ( // InitialCafeteria stores all Available cafeterias in the format of the eat-api type InitialCafeteria struct { - Cafeteria int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteria;type:int;not null;" json:"canteen" ` - Name string `gorm:"column:name;type:mediumtext;not null;" json:"name" ` + Cafeteria int64 `gorm:"primary_key;autoIncrement;column:cafeteria;type:int;not null;" json:"canteen" ` + Name string `gorm:"column:name;type:text;not null;" json:"name" ` Address string `gorm:"column:address;type:text;not null;" json:"address" ` - Latitude float32 `gorm:"column:latitude;type:float;not null;" json:"latitude" ` - Longitude float32 `gorm:"column:longitude;type:float;not null;" json:"longitude"` + Latitude float64 `gorm:"column:latitude;type:double;not null;" json:"latitude" ` + Longitude float64 `gorm:"column:longitude;type:double;not null;" json:"longitude"` } // TableName sets the insert table name for this struct type @@ -24,11 +24,11 @@ func (n *InitialCafeteria) TableName() string { // InitialCafeteriaRating stores all Available cafeterias in the format of the eat-api type InitialCafeteriaRating struct { - CafeteriaRating int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRating;type:int;not null;" json:"canteenrating"` + CafeteriaRating int64 `gorm:"primary_key;autoIncrement;column:cafeteriaRating;type:int;not null;" json:"canteenrating"` Points int32 `gorm:"column:points;type:int;not null;" json:"points"` Comment string `gorm:"column:comment;type:text;" json:"comment" ` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"canteenID"` - Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;" json:"timestamp" ` + Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;default:current_timestamp();OnUpdate:current_timestamp();" json:"timestamp" ` Image string `gorm:"column:image;type:text;" json:"image"` } @@ -39,10 +39,10 @@ func (n *InitialCafeteriaRating) TableName() string { // InitialCafeteriaRatingTag struct is a row record of the either the dish_tag_rating-table or the cafeteria_rating_tags-table in the database type InitialCafeteriaRatingTag struct { - CafeteriaRatingTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:CafeteriaRatingTag;type:int;not null;" json:"CanteenRatingTag" ` - CorrespondingRating int64 `gorm:"foreignKey:cafeteriaRatingID;column:correspondingRating;type:int;not null;" json:"correspondingRating"` - Points int32 `gorm:"column:points;type:int;not null;" json:"points"` - TagID int64 `gorm:"foreignKey:cafeteriaRatingTagOption;column:tagID;type:int;not null;" json:"tagID"` + CafeteriaRatingTag int64 `gorm:"primary_key;autoIncrement;column:CafeteriaRatingTag;type:int;not null;"` + CorrespondingRating int64 `gorm:"foreignKey:cafeteriaRatingID;column:correspondingRating;type:int;not null;"` + Points int32 `gorm:"column:points;type:int;not null;"` + TagID int64 `gorm:"foreignKey:cafeteriaRatingTagOption;column:tagID;type:int;not null;"` } // TableName sets the insert table name for this struct type @@ -52,9 +52,9 @@ func (n *InitialCafeteriaRatingTag) TableName() string { // InitialCafeteriaRatingTagOption stores all available options for tags which can be used to quickly rate cafeterias type InitialCafeteriaRatingTagOption struct { - CafeteriaRatingsTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagOption;type:int;not null;" json:"canteenRatingTagOption"` - DE string `gorm:"column:DE;text;default:('de');not null;" json:"DE"` - EN string `gorm:"column:EN;text;default:('en');not null;" json:"EN"` + CafeteriaRatingsTagOption int64 `gorm:"primary_key;autoIncrement;column:cafeteriaRatingTagOption;type:int;not null;"` + DE string `gorm:"column:DE;text;default:('de');not null;"` + EN string `gorm:"column:EN;text;default:('en');not null;"` } // TableName sets the insert table name for this struct type @@ -64,7 +64,7 @@ func (n *InitialCafeteriaRatingTagOption) TableName() string { // InitialDish represents one dish fin a specific cafeteria type InitialDish struct { - Dish int64 `gorm:"primary_key;AUTO_INCREMENT;column:dish;type:int;not null;" json:"dish"` + Dish int64 `gorm:"primary_key;autoIncrement;column:dish;type:int;not null;" json:"dish"` Name string `gorm:"column:name;type:text;not null;" json:"name" ` Type string `gorm:"column:type;type:text;not null;" json:"type" ` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"` @@ -76,7 +76,7 @@ func (n *InitialDish) TableName() string { } type InitialDishesOfTheWeek struct { - DishesOfTheWeek int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishesOfTheWeek;type:int;not null;" json:"dishesOfTheWeek"` + DishesOfTheWeek int64 `gorm:"primary_key;autoIncrement;column:dishesOfTheWeek;type:int;not null;" json:"dishesOfTheWeek"` Year int32 `gorm:"column:year;type:int;not null;" json:"year"` Week int32 `gorm:"column:week;type:int;not null;" json:"week"` Day int32 `gorm:"column:day;type:int;not null;" json:"day"` @@ -89,7 +89,7 @@ func (n *InitialDishesOfTheWeek) TableName() string { } type InitialDishNameTagOption struct { - DishNameTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOption;type:int;not null;" json:"dishNameTagOption"` + DishNameTagOption int64 `gorm:"primary_key;autoIncrement;column:dishNameTagOption;type:int;not null;" json:"dishNameTagOption"` DE string `gorm:"column:DE;type:text;not null;" json:"DE"` EN string `gorm:"column:EN;type:text;not null;" json:"EN"` } @@ -100,7 +100,7 @@ func (n *InitialDishNameTagOption) TableName() string { } type InitialDishRatingTagOption struct { - DishRatingTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagOption;type:int;not null;" json:"dishRatingTagOption"` + DishRatingTagOption int64 `gorm:"primary_key;autoIncrement;column:dishRatingTagOption;type:int;not null;" json:"dishRatingTagOption"` DE string `gorm:"column:DE;type:text;default:('de');not null;" json:"DE"` EN string `gorm:"column:EN;type:text;default:('en');not null;" json:"EN"` } @@ -111,7 +111,7 @@ func (n *InitialDishRatingTagOption) TableName() string { } type InitialDishNameTag struct { - DishNameTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:DishNameTag;type:int;not null;" json:"DishNameTag"` + DishNameTag int64 `gorm:"primary_key;autoIncrement;column:DishNameTag;type:int;not null;" json:"DishNameTag"` CorrespondingRating int64 `gorm:"foreignKey:dish;column:correspondingRating;type:int;not null;" json:"correspondingRating"` Points int32 `gorm:"column:points;type:int;not null;" json:"points"` TagNameID int64 `gorm:"foreignKey:tagRatingID;column:tagNameID;type:int;not null;" json:"tagnameID"` @@ -123,7 +123,7 @@ func (n *InitialDishNameTag) TableName() string { } type InitialDishNameTagOptionExcluded struct { - DishNameTagOptionExcluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionExcluded;type:int;not null;" json:"dishNameTagOptionExcluded"` + DishNameTagOptionExcluded int64 `gorm:"primary_key;autoIncrement;column:dishNameTagOptionExcluded;type:int;not null;" json:"dishNameTagOptionExcluded"` NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` Expression string `gorm:"column:expression;type:text;" json:"expression"` } @@ -134,7 +134,7 @@ func (n *InitialDishNameTagOptionExcluded) TableName() string { } type InitialDishNameTagOptionIncluded struct { - DishNameTagOptionIncluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionIncluded;type:int;not null;" json:"dishNameTagOptionIncluded"` + DishNameTagOptionIncluded int64 `gorm:"primary_key;autoIncrement;column:dishNameTagOptionIncluded;type:int;not null;" json:"dishNameTagOptionIncluded"` NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` Expression string `gorm:"column:expression;type:text;" json:"expression"` } @@ -145,12 +145,12 @@ func (n *InitialDishNameTagOptionIncluded) TableName() string { } type InitialDishRating struct { - DishRating int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRating;type:int;not null;" json:"dishRating"` + DishRating int64 `gorm:"primary_key;autoIncrement;column:dishRating;type:int;not null;" json:"dishRating"` Points int32 `gorm:"column:points;type:int;not null;" json:"points"` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"` DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"` Comment string `gorm:"column:comment;type:text;" json:"comment"` - Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;" json:"timestamp"` + Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;default:current_timestamp();OnUpdate:current_timestamp();" json:"timestamp"` Image string `gorm:"column:image;type:text;" json:"image"` } @@ -160,7 +160,7 @@ func (n *InitialDishRating) TableName() string { } type InitialDishRatingTag struct { - DishRatingTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTag;type:int;not null;" json:"dishRatingTag"` + DishRatingTag int64 `gorm:"primary_key;autoIncrement;column:dishRatingTag;type:int;not null;" json:"dishRatingTag"` CorrespondingRating int64 `gorm:"foreignKey:cafeteriaRating;column:parentRating;type:int;not null;" json:"parentRating"` Points int32 `gorm:"column:points;type:int;not null;" json:"points"` TagID int64 `gorm:"foreignKey:dishRatingTagOption;column:tagID;type:int;not null;" json:"tagID"` @@ -172,7 +172,7 @@ func (n *InitialDishRatingTag) TableName() string { } type InitialDishToDishNameTag struct { - DishToDishNameTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishToDishNameTag;type:int;not null;" json:"dishToDishNameTag"` + DishToDishNameTag int64 `gorm:"primary_key;autoIncrement;column:dishToDishNameTag;type:int;not null;" json:"dishToDishNameTag"` DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"` NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` } @@ -184,12 +184,12 @@ func (n *InitialDishToDishNameTag) TableName() string { // InitialCafeteriaRatingAverage stores all precomputed values for the cafeteria ratings type InitialCafeteriaRatingAverage struct { - CafeteriaRatingAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingAverage;type:int;not null;" json:"canteenRatingAverage" ` + CafeteriaRatingAverage int64 `gorm:"primary_key;autoIncrement;column:cafeteriaRatingAverage;type:int;not null;" json:"canteenRatingAverage" ` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"canteenID"` - Average float64 `gorm:"column:average;type:float;not null;" json:"average" ` + Average float64 `gorm:"column:average;type:double;not null;" json:"average" ` Min int32 `gorm:"column:min;type:int;not null;" json:"min"` Max int32 `gorm:"column:max;type:int;not null;" json:"max"` - Std float64 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } // TableName sets the insert table name for this struct type @@ -199,13 +199,13 @@ func (n *InitialCafeteriaRatingAverage) TableName() string { // InitialCafeteriaRatingTagAverage stores all precomputed values for the cafeteria ratings type InitialCafeteriaRatingTagAverage struct { - CafeteriaRatingTagsAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagsAverage;type:int;not null;" json:"canteenRatingTagsAverage"` + CafeteriaRatingTagsAverage int64 `gorm:"primary_key;autoIncrement;column:cafeteriaRatingTagsAverage;type:int;not null;" json:"canteenRatingTagsAverage"` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"canteenID"` TagID int64 `gorm:"column:tagID;foreignKey:cafeteriaRatingTagOption;type:int;not null;" json:"tagID"` - Average float32 `gorm:"column:average;type:float;not null;" json:"average"` + Average float64 `gorm:"column:average;type:double;not null;" json:"average"` Min int8 `gorm:"column:min;type:int;not null;" json:"min"` Max int8 `gorm:"column:max;type:int;not null;" json:"max"` - Std float32 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } // TableName sets the insert table name for this struct type @@ -215,13 +215,13 @@ func (n *InitialCafeteriaRatingTagAverage) TableName() string { // InitialDishNameTagAverage stores all precomputed values for the DishName ratings type InitialDishNameTagAverage struct { - DishNameTagAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagAverage;type:int;not null;" json:"dishNameTagAverage" ` + DishNameTagAverage int64 `gorm:"primary_key;autoIncrement;column:dishNameTagAverage;type:int;not null;" json:"dishNameTagAverage" ` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"` TagID int64 `gorm:"column:tagID;foreignKey:DishNameTagOption;type:int;not null;" json:"tagID"` - Average float32 `gorm:"column:average;type:float;not null;" json:"average" ` + Average float64 `gorm:"column:average;type:double;not null;" json:"average" ` Min int8 `gorm:"column:min;type:int;not null;" json:"min"` Max int8 `gorm:"column:max;type:int;not null;" json:"max"` - Std float32 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } // TableName sets the insert table name for this struct type @@ -231,13 +231,13 @@ func (n *InitialDishNameTagAverage) TableName() string { // InitialDishRatingAverage stores all precomputed values for the cafeteria ratings type InitialDishRatingAverage struct { - DishRatingAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingAverage;type:int;not null;" json:"dishRatingAverage" ` + DishRatingAverage int64 `gorm:"primary_key;autoIncrement;column:dishRatingAverage;type:int;not null;" json:"dishRatingAverage" ` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"` DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"` - Average float64 `gorm:"column:average;type:float;not null;" json:"average" ` + Average float64 `gorm:"column:average;type:double;not null;" json:"average" ` Min int32 `gorm:"column:min;type:int;not null;" json:"min"` Max int32 `gorm:"column:max;type:int;not null;" json:"max"` - Std float64 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } // TableName sets the insert table name for this struct type @@ -247,14 +247,14 @@ func (n *InitialDishRatingAverage) TableName() string { // InitialDishRatingTagAverage stores all precomputed values for the cafeteria ratings type InitialDishRatingTagAverage struct { - DishRatingTagsAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagsAverage;type:int;not null;" json:"dishRatingTagsAverage" ` + DishRatingTagsAverage int64 `gorm:"primary_key;autoIncrement;column:dishRatingTagsAverage;type:int;not null;" json:"dishRatingTagsAverage" ` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"` TagID int64 `gorm:"column:tagID;foreignKey:tagID;type:int;not null;" json:"tagID"` DishID int64 `gorm:"column:dishID;foreignKey:dishID;type:int;not null;" json:"dishID"` - Average float32 `gorm:"column:average;type:float;not null;" json:"average" ` + Average float64 `gorm:"column:average;type:double;not null;" json:"average" ` Min int8 `gorm:"column:min;type:int;not null;" json:"min"` Max int8 `gorm:"column:max;type:int;not null;" json:"max"` - Std float32 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } // TableName sets the insert table name for this struct type diff --git a/server/backend/migration/20221210000000.go b/server/backend/migration/20221210000000.go index 9471b5aa..7b859fd6 100644 --- a/server/backend/migration/20221210000000.go +++ b/server/backend/migration/20221210000000.go @@ -15,7 +15,7 @@ type InitialCanteenHeadCount struct { Count uint32 `gorm:"column:count;type:int;not null;" json:"count"` MaxCount uint32 `gorm:"column:max_count;type:int;not null;" json:"max_count"` Percent float32 `gorm:"column:percent;type:float;not null;" json:"percent"` - Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;" json:"timestamp" ` + Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;default:current_timestamp();OnUpdate:current_timestamp();" json:"timestamp" ` } // TableName sets the insert table name for this struct type diff --git a/server/backend/migration/20230826000000.go b/server/backend/migration/20230826000000.go index 92bb8e40..a768bb43 100644 --- a/server/backend/migration/20230826000000.go +++ b/server/backend/migration/20230826000000.go @@ -9,8 +9,8 @@ import ( type Feedback struct { Processed bool `gorm:"column:processed;type:boolean;default:false;not null;"` - OsVersion null.String `gorm:"column:os_version;type:text;null;"` - AppVersion null.String `gorm:"column:app_version;type:text;null;"` + OsVersion null.String `gorm:"column:os_version;type:text;"` + AppVersion null.String `gorm:"column:app_version;type:text;"` } // TableName sets the insert table name for this struct type diff --git a/server/backend/migration/20230904100000.go b/server/backend/migration/20230904100000.go index e58b9414..2705429c 100644 --- a/server/backend/migration/20230904100000.go +++ b/server/backend/migration/20230904100000.go @@ -8,7 +8,7 @@ import ( ) type NewsSourceFile struct { - File int64 `gorm:"primary_key;AUTO_INCREMENT;column:file;type:int;"` + File int64 `gorm:"primary_key;autoIncrement;column:file;type:int;"` } func (n *NewsSourceFile) TableName() string { @@ -17,7 +17,7 @@ func (n *NewsSourceFile) TableName() string { // NewsSource struct is a row record of the newsSource table in the tca database type NewsSource struct { - Source int64 `gorm:"primary_key;AUTO_INCREMENT;column:source;type:int;"` + Source int64 `gorm:"primary_key;autoIncrement;column:source;type:int;"` Title string `gorm:"column:title;type:text;size:16777215;"` URL null.String `gorm:"column:url;type:text;size:16777215;"` FileID int64 `gorm:"column:icon;not null;type:int;"` diff --git a/server/backend/migration/20231003000000.go b/server/backend/migration/20231003000000.go index 88b38a08..fe5dd3fb 100644 --- a/server/backend/migration/20231003000000.go +++ b/server/backend/migration/20231003000000.go @@ -33,7 +33,7 @@ type nameTag struct { } type ToFillCafeteriaRatingTagOption struct { - CafeteriaRatingsTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagOption;type:int;not null;" json:"canteenRatingTagOption"` + CafeteriaRatingsTagOption int64 `gorm:"primary_key;autoIncrement;column:cafeteriaRatingTagOption;type:int;not null;" json:"canteenRatingTagOption"` DE string `gorm:"column:DE;text;default:('de');not null;" json:"DE"` EN string `gorm:"column:EN;text;default:('en');not null;" json:"EN"` } @@ -44,7 +44,7 @@ func (n *ToFillCafeteriaRatingTagOption) TableName() string { } type ToFillDishRatingTagOption struct { - DishRatingTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagOption;type:int;not null;" json:"dishRatingTagOption"` + DishRatingTagOption int64 `gorm:"primary_key;autoIncrement;column:dishRatingTagOption;type:int;not null;" json:"dishRatingTagOption"` DE string `gorm:"column:DE;type:text;default:('de');not null;" json:"DE"` EN string `gorm:"column:EN;type:text;default:('en');not null;" json:"EN"` } @@ -55,7 +55,7 @@ func (n *ToFillDishRatingTagOption) TableName() string { } type ToFillDishNameTagOption struct { - DishNameTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOption;type:int;not null;" json:"dishNameTagOption"` + DishNameTagOption int64 `gorm:"primary_key;autoIncrement;column:dishNameTagOption;type:int;not null;" json:"dishNameTagOption"` DE string `gorm:"column:DE;type:text;not null;" json:"DE"` EN string `gorm:"column:EN;type:text;not null;" json:"EN"` } @@ -66,7 +66,7 @@ func (n *ToFillDishNameTagOption) TableName() string { } type ToFillDishNameTagOptionExcluded struct { - DishNameTagOptionExcluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionExcluded;type:int;not null;" json:"dishNameTagOptionExcluded"` + DishNameTagOptionExcluded int64 `gorm:"primary_key;autoIncrement;column:dishNameTagOptionExcluded;type:int;not null;" json:"dishNameTagOptionExcluded"` NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` Expression string `gorm:"column:expression;type:text;" json:"expression"` } @@ -77,7 +77,7 @@ func (n *ToFillDishNameTagOptionExcluded) TableName() string { } type ToFillDishNameTagOptionIncluded struct { - DishNameTagOptionIncluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionIncluded;type:int;not null;" json:"dishNameTagOptionIncluded"` + DishNameTagOptionIncluded int64 `gorm:"primary_key;autoIncrement;column:dishNameTagOptionIncluded;type:int;not null;" json:"dishNameTagOptionIncluded"` NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` Expression string `gorm:"column:expression;type:text;" json:"expression"` } diff --git a/server/backend/migration/20231015000000.go b/server/backend/migration/20231015000000.go index 34a34ca8..e378c97e 100644 --- a/server/backend/migration/20231015000000.go +++ b/server/backend/migration/20231015000000.go @@ -9,12 +9,12 @@ import ( // CafeteriaRatingAverage stores all precomputed values for the cafeteria ratings type CafeteriaRatingAverage struct { - CafeteriaRatingAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingAverage;type:int;not null;"` + CafeteriaRatingAverage int64 `gorm:"primary_key;autoIncrement;column:cafeteriaRatingAverage;type:int;not null;"` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;"` - Average float64 `gorm:"column:average;type:float;not null;"` + Average float64 `gorm:"column:average;type:double;not null;"` Min int32 `gorm:"column:min;type:int;not null;"` Max int32 `gorm:"column:max;type:int;not null;"` - Std float64 `gorm:"column:std;type:float;not null;"` + Std float64 `gorm:"column:std;type:double;not null;"` } // TableName sets the insert table name for this struct type @@ -24,13 +24,13 @@ func (n *CafeteriaRatingAverage) TableName() string { // DishRatingAverage stores all precomputed values for the cafeteria ratings type DishRatingAverage struct { - DishRatingAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingAverage;type:int;not null;"` + DishRatingAverage int64 `gorm:"primary_key;autoIncrement;column:dishRatingAverage;type:int;not null;"` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;"` DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;"` - Average float64 `gorm:"column:average;type:float;not null;"` + Average float64 `gorm:"column:average;type:double;not null;"` Min int32 `gorm:"column:min;type:int;not null;"` Max int32 `gorm:"column:max;type:int;not null;"` - Std float64 `gorm:"column:std;type:float;not null;"` + Std float64 `gorm:"column:std;type:double;not null;"` } // TableName sets the insert table name for this struct type @@ -40,14 +40,14 @@ func (n *DishRatingAverage) TableName() string { // DishRatingTagAverage stores all precomputed values for the cafeteria ratings type DishRatingTagAverage struct { - DishRatingTagsAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagsAverage;type:int;not null;"` + DishRatingTagsAverage int64 `gorm:"primary_key;autoIncrement;column:dishRatingTagsAverage;type:int;not null;"` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;"` TagID int64 `gorm:"column:tagID;foreignKey:tagID;type:int;not null;"` DishID int64 `gorm:"column:dishID;foreignKey:dishID;type:int;not null;"` - Average float32 `gorm:"column:average;type:float;not null;"` + Average float64 `gorm:"column:average;type:double;not null;"` Min int8 `gorm:"column:min;type:int;not null;"` Max int8 `gorm:"column:max;type:int;not null;"` - Std float32 `gorm:"column:std;type:float;not null;"` + Std float64 `gorm:"column:std;type:double;not null;"` } // TableName sets the insert table name for this struct type @@ -57,13 +57,13 @@ func (n *DishRatingTagAverage) TableName() string { // CafeteriaRatingTagsAverage stores all precomputed values for the cafeteria ratings type CafeteriaRatingTagsAverage struct { - CafeteriaRatingTagsAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagsAverage;type:int;not null;" json:"canteenRatingTagsAverage"` + CafeteriaRatingTagsAverage int64 `gorm:"primary_key;autoIncrement;column:cafeteriaRatingTagsAverage;type:int;not null;" json:"canteenRatingTagsAverage"` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"canteenID"` TagID int64 `gorm:"column:tagID;foreignKey:cafeteriaRatingTagOption;type:int;not null;" json:"tagID"` - Average float32 `gorm:"column:average;type:float;not null;" json:"average"` + Average float64 `gorm:"column:average;type:double;not null;" json:"average"` Min int8 `gorm:"column:min;type:int;not null;" json:"min"` Max int8 `gorm:"column:max;type:int;not null;" json:"max"` - Std float32 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } // TableName sets the insert table name for this struct type @@ -73,13 +73,13 @@ func (n *CafeteriaRatingTagsAverage) TableName() string { // DishNameTagAverage stores all precomputed values for the DishName ratings type DishNameTagAverage struct { - DishNameTagAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagAverage;type:int;not null;" json:"dishNameTagAverage" ` + DishNameTagAverage int64 `gorm:"primary_key;autoIncrement;column:dishNameTagAverage;type:int;not null;" json:"dishNameTagAverage" ` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"` TagID int64 `gorm:"column:tagID;foreignKey:DishNameTagOption;type:int;not null;" json:"tagID"` - Average float32 `gorm:"column:average;type:float;not null;" json:"average" ` + Average float64 `gorm:"column:average;type:double;not null;" json:"average" ` Min int8 `gorm:"column:min;type:int;not null;" json:"min"` Max int8 `gorm:"column:max;type:int;not null;" json:"max"` - Std float32 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } // TableName sets the insert table name for this struct type diff --git a/server/backend/migration/20240824000000.go b/server/backend/migration/20240824000000.go new file mode 100644 index 00000000..d1e43d59 --- /dev/null +++ b/server/backend/migration/20240824000000.go @@ -0,0 +1,58 @@ +package migration + +import ( + "github.com/go-gormigrate/gormigrate/v2" + "gorm.io/gorm" +) + +type wrongTableName struct { + Original string + New string +} + +var wrongTableNames = []wrongTableName{ + //{"crontab", "crontabs"}, <- too much work for now + {"kino", "movies"}, + {"cafeteria", "canteens"}, + {"canteen_head_count", "canteen_head_counts"}, + {"cafeteria_rating", "canteen_ratings"}, + {"cafeteria_rating_tag", "canteen_rating_tags"}, + {"cafeteria_rating_tag_option", "canteen_rating_tag_options"}, + {"dish", "dishes"}, + {"dish_rating", "dish_ratings"}, + {"dish_rating_tag", "dish_rating_tags"}, + {"dish_rating_tag_option", "dish_rating_tag_options"}, + {"dish_name_tag", "dish_name_tags"}, + {"dish_name_tag_option", "dish_name_tag_options"}, + {"dish_name_tag_option_excluded", "excluded_dish_name_tag_options"}, + {"dish_name_tag_option_included", "included_dish_name_tag_options"}, + {"dish_to_dish_name_tag", "dish_to_dish_name_tags"}, + {"dishes_of_the_week", "dishes_of_the_weeks"}, + {"update_note", "update_notes"}, + {"newsSource", "news_sources"}, + {"news_alert", "news_alerts"}, +} + +// migrate20240824000000 +// - replaces all instances of misleadingly named tables with the correct ones +func migrate20240824000000() *gormigrate.Migration { + return &gormigrate.Migration{ + ID: "20240824000000", + Migrate: func(tx *gorm.DB) error { + for _, table := range wrongTableNames { + if err := tx.Migrator().RenameTable(table.Original, table.New); err != nil { + return err + } + } + return nil + }, + Rollback: func(tx *gorm.DB) error { + for _, table := range wrongTableNames { + if err := tx.Migrator().RenameTable(table.New, table.Original); err != nil { + return err + } + } + return nil + }, + } +} diff --git a/server/backend/migration/20241023000000.go b/server/backend/migration/20241023000000.go new file mode 100644 index 00000000..2f5c05fb --- /dev/null +++ b/server/backend/migration/20241023000000.go @@ -0,0 +1,76 @@ +package migration + +import ( + "github.com/go-gormigrate/gormigrate/v2" + "github.com/guregu/null" + "gorm.io/gorm" +) + +// StudentClub stores a student Club +type newStudentClub struct { + gorm.Model + Name string + Language string `gorm:"type:enum('German','English');default:'German'"` + Description null.String + LinkUrl null.String `gorm:"type:varchar(190);unique;"` + ImageID null.Int + Image *File `gorm:"foreignKey:ImageID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` + ImageCaption null.String + StudentClubCollectionID uint + StudentClubCollection newStudentClubCollection `gorm:"foreignKey:StudentClubCollectionID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` +} + +// TableName sets the insert table name for this struct type +func (n *newStudentClub) TableName() string { + return "student_clubs" +} + +type newStudentClubCollection struct { + gorm.Model + Name string `gorm:"type:varchar(100)"` + Language string `gorm:"type:enum('German','English');default:'German'"` + Description string +} + +// TableName sets the insert table name for this struct type +func (n *newStudentClubCollection) TableName() string { + return "student_club_collections" +} + +// migrate20241023000000 +// - made sure that student clubs are localised +func migrate20241023000000() *gormigrate.Migration { + return &gormigrate.Migration{ + ID: "20241023000000", + Migrate: func(tx *gorm.DB) error { + if err := tx.Migrator().DropTable(InitialStudentClub{}); err != nil { + return err + } + if err := tx.Migrator().DropTable(InitialStudentClubCollection{}); err != nil { + return err + } + if err := tx.Migrator().AutoMigrate(newStudentClubCollection{}); err != nil { + return err + } + if err := tx.Migrator().AutoMigrate(newStudentClub{}); err != nil { + return err + } + return nil + }, + Rollback: func(tx *gorm.DB) error { + if err := tx.Migrator().DropTable(newStudentClub{}); err != nil { + return err + } + if err := tx.Migrator().DropTable(newStudentClubCollection{}); err != nil { + return err + } + if err := tx.Migrator().AutoMigrate(InitialStudentClubCollection{}); err != nil { + return err + } + if err := tx.Migrator().AutoMigrate(InitialStudentClub{}); err != nil { + return err + } + return nil + }, + } +} diff --git a/server/backend/migration/migration.go b/server/backend/migration/migration.go index 9d633186..4ff90a37 100644 --- a/server/backend/migration/migration.go +++ b/server/backend/migration/migration.go @@ -12,18 +12,18 @@ import ( func autoMigrate(db *gorm.DB) error { err := db.AutoMigrate( - &model.Cafeteria{}, - &model.CafeteriaRating{}, - &model.CafeteriaRatingTag{}, - &model.CafeteriaRatingTagOption{}, + &model.Canteen{}, + &model.CanteenRating{}, + &model.CanteenRatingTag{}, + &model.CanteenRatingTagOption{}, &model.CanteenHeadCount{}, &model.Crontab{}, &model.Device{}, &model.Dish{}, &model.DishNameTag{}, &model.DishNameTagOption{}, - &model.DishNameTagOptionExcluded{}, - &model.DishNameTagOptionIncluded{}, + &model.ExcludedDishNameTagOption{}, + &model.IncludedDishNameTagOption{}, &model.DishRating{}, &model.DishRatingTag{}, &model.DishRatingTagOption{}, @@ -31,7 +31,7 @@ func autoMigrate(db *gorm.DB) error { &model.DishesOfTheWeek{}, &model.Feedback{}, &model.File{}, - &model.Kino{}, + &model.Movie{}, &model.NewExamResultsSubscriber{}, &model.News{}, &model.NewsAlert{}, @@ -87,6 +87,8 @@ func manualMigrate(db *gorm.DB) error { migrate20240511000000(), migrate20240512000000(), migrate20240706000000(), + migrate20240824000000(), + migrate20241023000000(), } return gormigrate.New(db, gormigrateOptions, migrations).Migrate() } diff --git a/server/backend/migration/static_data/source-schema.sql b/server/backend/migration/static_data/source-schema.sql index 4f6bd5db..73cf90f5 100644 --- a/server/backend/migration/static_data/source-schema.sql +++ b/server/backend/migration/static_data/source-schema.sql @@ -120,21 +120,21 @@ create table if not exists faculty create table if not exists feedback ( id int auto_increment primary key, - email_id text charset utf8 null, - receiver text charset utf8 null, + email_id text charset utf8 not null, + receiver text charset utf8 not null, reply_to text charset utf8 null, - feedback text charset utf8 null, + feedback text charset utf8 not null, image_count int null, - latitude decimal(11, 8) null, - longitude decimal(11, 8) null, + latitude double null, + longitude double null, timestamp datetime /* mariadb-5.3 */ default current_timestamp() null ) auto_increment = 293; create table if not exists files ( file int auto_increment primary key, - name mediumtext not null, - path mediumtext not null, + name text not null, + path text not null, downloads int default 0 not null, url varchar(191) null, downloaded tinyint(1) default 1 null @@ -302,12 +302,12 @@ create table if not exists devices uuid varchar(50) not null, created timestamp /* mariadb-5.3 */ null, lastAccess timestamp /* mariadb-5.3 */ default current_timestamp() not null on update current_timestamp(), - lastApi mediumtext default ('') not null, + lastApi text default ('') not null, developer enum ('true', 'false') default 'false' not null, - osVersion mediumtext default ('') not null, - appVersion mediumtext default ('') not null, + osVersion text default ('') not null, + appVersion text default ('') not null, counter int default 0 not null, - pk longtext null, + pk text null, pkActive enum ('true', 'false') default 'false' not null, gcmToken text null, gcmStatus varchar(200) null, @@ -408,8 +408,8 @@ create table if not exists mensa ( mensa int auto_increment primary key, id int null, - name mediumtext not null, - address mediumtext not null, + name text not null, + address text not null, latitude float(10, 6) default 0.000000 not null, longitude float(10, 6) default 0.000000 not null, constraint id unique (id) @@ -447,9 +447,9 @@ create table if not exists mensaprices ( price int auto_increment primary key, created timestamp /* mariadb-5.3 */ default current_timestamp() not null, - person mediumtext not null, - type mediumtext not null, - typeLong mediumtext not null, + person text not null, + type text not null, + typeLong text not null, typeNumber int not null, value decimal not null ) collate = utf8mb4_unicode_ci; @@ -462,8 +462,8 @@ create table if not exists migrations create table if not exists newsSource ( source int auto_increment primary key, - title mediumtext not null, - url mediumtext null, + title text not null, + url text null, icon int not null, hook enum ('newspread', 'impulsivHook') null, constraint newsSource_ibfk_1 foreign key (icon) references files (file) on update cascade on delete cascade diff --git a/server/backend/movie.go b/server/backend/movie.go index b9e7f5e4..b07d8104 100644 --- a/server/backend/movie.go +++ b/server/backend/movie.go @@ -12,7 +12,7 @@ import ( ) func (s *CampusServer) ListMovies(ctx context.Context, req *pb.ListMoviesRequest) (*pb.ListMoviesReply, error) { - var movies []model.Kino + var movies []model.Movie tx := s.db.WithContext(ctx). Joins("File"). Order("date ASC") diff --git a/server/backend/movie_test.go b/server/backend/movie_test.go index f03d2868..68bd96c9 100644 --- a/server/backend/movie_test.go +++ b/server/backend/movie_test.go @@ -78,7 +78,7 @@ var ( } ) -const ListMoviesQuery = "SELECT `kino`.`kino`,`kino`.`date`,`kino`.`created`,`kino`.`title`,`kino`.`year`,`kino`.`runtime`,`kino`.`genre`,`kino`.`director`,`kino`.`actors`,`kino`.`rating`,`kino`.`description`,`kino`.`trailer`,`kino`.`cover`,`kino`.`link`,`kino`.`location`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `kino` LEFT JOIN `files` `File` ON `kino`.`cover` = `File`.`file` WHERE kino > ? ORDER BY date ASC" +const ListMoviesQuery = "SELECT `movies`.`kino`,`movies`.`date`,`movies`.`created`,`movies`.`title`,`movies`.`year`,`movies`.`runtime`,`movies`.`genre`,`movies`.`director`,`movies`.`actors`,`movies`.`rating`,`movies`.`description`,`movies`.`trailer`,`movies`.`cover`,`movies`.`link`,`movies`.`location`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `movies` LEFT JOIN `files` `File` ON `movies`.`cover` = `File`.`file` WHERE kino > ? ORDER BY date ASC" func (s *MovieSuite) Test_ListMoviesAll() { server := CampusServer{db: s.DB} diff --git a/server/backend/news.go b/server/backend/news.go index 4025b8a1..158a14a3 100644 --- a/server/backend/news.go +++ b/server/backend/news.go @@ -25,7 +25,7 @@ func (s *CampusServer) ListNewsSources(ctx context.Context, _ *pb.ListNewsSource if err := s.db.WithContext(ctx). Joins("File"). Find(&sources).Error; err != nil { - log.WithError(err).Error("could not find newsSources") + log.WithError(err).Error("could not find news_sources") return nil, status.Error(codes.Internal, "could not ListNewsSources") } @@ -94,9 +94,9 @@ func (s *CampusServer) ListNewsAlerts(ctx context.Context, req *pb.ListNewsAlert var res []*model.NewsAlert tx := s.db.WithContext(ctx). Joins("File"). - Where("news_alert.to >= NOW()") + Where("news_alerts.to >= NOW()") if req.LastNewsAlertId != 0 { - tx = tx.Where("news_alert.news_alert > ?", req.LastNewsAlertId) + tx = tx.Where("news_alerts.news_alert > ?", req.LastNewsAlertId) } if err := tx.Find(&res).Error; errors.Is(err, gorm.ErrRecordNotFound) { return nil, status.Error(codes.NotFound, "no news alerts") diff --git a/server/backend/news_test.go b/server/backend/news_test.go index 5a03b4e7..11771990 100644 --- a/server/backend/news_test.go +++ b/server/backend/news_test.go @@ -85,7 +85,7 @@ func source2() *model.NewsSource { } } -const ExpectedListNewsSourcesQuery = "SELECT `newsSource`.`source`,`newsSource`.`title`,`newsSource`.`url`,`newsSource`.`icon`,`newsSource`.`hook`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `newsSource` LEFT JOIN `files` `File` ON `newsSource`.`icon` = `File`.`file`" +const ExpectedListNewsSourcesQuery = "SELECT `news_sources`.`source`,`news_sources`.`title`,`news_sources`.`url`,`news_sources`.`icon`,`news_sources`.`hook`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `news_sources` LEFT JOIN `files` `File` ON `news_sources`.`icon` = `File`.`file`" func (s *NewsSuite) Test_ListNewsSourcesMultiple() { s1, s2 := source1(), source2() @@ -141,7 +141,7 @@ func (s *NewsSuite) Test_ListNewsSourcesNone() { require.Equal(s.T(), expectedResp, response) } -const ExpectedListNewsQuery = "SELECT `news`.`news`,`news`.`date`,`news`.`created`,`news`.`title`,`news`.`description`,`news`.`src`,`news`.`link`,`news`.`image`,`news`.`file`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded`,`NewsSource`.`source` AS `NewsSource__source`,`NewsSource`.`title` AS `NewsSource__title`,`NewsSource`.`url` AS `NewsSource__url`,`NewsSource`.`icon` AS `NewsSource__icon`,`NewsSource`.`hook` AS `NewsSource__hook`,`NewsSource__File`.`file` AS `NewsSource__File__file`,`NewsSource__File`.`name` AS `NewsSource__File__name`,`NewsSource__File`.`path` AS `NewsSource__File__path`,`NewsSource__File`.`downloads` AS `NewsSource__File__downloads`,`NewsSource__File`.`url` AS `NewsSource__File__url`,`NewsSource__File`.`downloaded` AS `NewsSource__File__downloaded` FROM `news` LEFT JOIN `files` `File` ON `news`.`file` = `File`.`file` LEFT JOIN `newsSource` `NewsSource` ON `news`.`src` = `NewsSource`.`source` LEFT JOIN `files` `NewsSource__File` ON `NewsSource`.`icon` = `NewsSource__File`.`file`" +const ExpectedListNewsQuery = "SELECT `news`.`news`,`news`.`date`,`news`.`created`,`news`.`title`,`news`.`description`,`news`.`src`,`news`.`link`,`news`.`image`,`news`.`file`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded`,`NewsSource`.`source` AS `NewsSource__source`,`NewsSource`.`title` AS `NewsSource__title`,`NewsSource`.`url` AS `NewsSource__url`,`NewsSource`.`icon` AS `NewsSource__icon`,`NewsSource`.`hook` AS `NewsSource__hook`,`NewsSource__File`.`file` AS `NewsSource__File__file`,`NewsSource__File`.`name` AS `NewsSource__File__name`,`NewsSource__File`.`path` AS `NewsSource__File__path`,`NewsSource__File`.`downloads` AS `NewsSource__File__downloads`,`NewsSource__File`.`url` AS `NewsSource__File__url`,`NewsSource__File`.`downloaded` AS `NewsSource__File__downloaded` FROM `news` LEFT JOIN `files` `File` ON `news`.`file` = `File`.`file` LEFT JOIN `news_sources` `NewsSource` ON `news`.`src` = `NewsSource`.`source` LEFT JOIN `files` `NewsSource__File` ON `NewsSource`.`icon` = `NewsSource__File`.`file`" func (s *NewsSuite) Test_ListNewsNone_withFilters() { s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsQuery+" WHERE src = ? AND news > ?")). @@ -221,7 +221,7 @@ func alert2() *model.NewsAlert { } } -const ExpectedListNewsAlertsQuery = "SELECT `news_alert`.`news_alert`,`news_alert`.`file`,`news_alert`.`name`,`news_alert`.`link`,`news_alert`.`created`,`news_alert`.`from`,`news_alert`.`to`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `news_alert` LEFT JOIN `files` `File` ON `news_alert`.`file` = `File`.`file` WHERE news_alert.to >= NOW()" +const ExpectedListNewsAlertsQuery = "SELECT `news_alerts`.`news_alert`,`news_alerts`.`file`,`news_alerts`.`name`,`news_alerts`.`link`,`news_alerts`.`created`,`news_alerts`.`from`,`news_alerts`.`to`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `news_alerts` LEFT JOIN `files` `File` ON `news_alerts`.`file` = `File`.`file` WHERE news_alerts.to >= NOW()" func (s *NewsSuite) Test_ListNewsAlertsError() { s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsAlertsQuery)).WillReturnError(gorm.ErrInvalidDB) @@ -241,7 +241,7 @@ func (s *NewsSuite) Test_ListNewsAlertsNone_noFilter() { require.Nil(s.T(), response) } func (s *NewsSuite) Test_ListNewsAlertsNone_Filter() { - s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsAlertsQuery + " AND news_alert.news_alert > ?")).WithArgs(42).WillReturnError(gorm.ErrRecordNotFound) + s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsAlertsQuery + " AND news_alerts.news_alert > ?")).WithArgs(42).WillReturnError(gorm.ErrRecordNotFound) server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf} response, err := server.ListNewsAlerts(metadata.NewIncomingContext(context.Background(), metadata.MD{}), &pb.ListNewsAlertsRequest{LastNewsAlertId: 42}) diff --git a/server/backend/student_club.go b/server/backend/student_club.go index d766563c..15b4363b 100644 --- a/server/backend/student_club.go +++ b/server/backend/student_club.go @@ -10,17 +10,35 @@ import ( "google.golang.org/grpc/status" ) -func (s *CampusServer) ListStudentClub(ctx context.Context, _ *pb.ListStudentClubRequest) (*pb.ListStudentClubReply, error) { +func (s *CampusServer) ListStudentClub(ctx context.Context, req *pb.ListStudentClubRequest) (*pb.ListStudentClubReply, error) { var dbClubs []model.StudentClub if err := s.db.WithContext(ctx). + Where(&model.StudentClub{Language: req.GetLanguage().String()}). + Where(&model.StudentClubCollection{Language: req.GetLanguage().String()}). Joins("Image"). Joins("StudentClubCollection"). Find(&dbClubs).Error; err != nil { log.WithError(err).Error("Error while querying student clubs") return nil, status.Error(codes.Internal, "could not query the student clubs. Please retry later") } + + var dbClubCollections []model.StudentClubCollection + if err := s.db.WithContext(ctx). + Where(&model.StudentClubCollection{Language: req.GetLanguage().String()}). + Find(&dbClubCollections).Error; err != nil { + log.WithError(err).Error("Error while querying student club collections") + return nil, status.Error(codes.Internal, "could not query the student club collections. Please retry later") + } // map from the db to the response collections := make([]*pb.StudentClubCollection, 0) + for _, dbCollection := range dbClubCollections { + collections = append(collections, &pb.StudentClubCollection{ + Title: dbCollection.Name, + Description: dbCollection.Description, + Clubs: make([]*pb.StudentClub, 0), + UnstableCollectionId: uint64(dbCollection.ID), + }) + } for _, dbClub := range dbClubs { resClub := &pb.StudentClub{ Name: dbClub.Name, @@ -33,22 +51,11 @@ func (s *CampusServer) ListStudentClub(ctx context.Context, _ *pb.ListStudentClu } for _, collection := range collections { - if collection.Title == dbClub.StudentClubCollectionID { + if collection.UnstableCollectionId == uint64(dbClub.StudentClubCollectionID) { collection.Clubs = append(collection.Clubs, resClub) - resClub = nil break } } - // no collection matched => we need to insert a new collection - if resClub != nil { - collection := &pb.StudentClubCollection{ - Title: dbClub.StudentClubCollection.ID, - Description: dbClub.StudentClubCollection.Description, - Clubs: make([]*pb.StudentClub, 1), - } - collection.Clubs[0] = resClub - collections = append(collections, collection) - } } return &pb.ListStudentClubReply{Collections: collections}, nil diff --git a/server/backend/student_club_test.go b/server/backend/student_club_test.go index 9d0d6e54..38913381 100644 --- a/server/backend/student_club_test.go +++ b/server/backend/student_club_test.go @@ -19,14 +19,16 @@ func TestCampusServer_ListStudentClub(t *testing.T) { db := utils.SetupTestContainer(ctx, t) exampleClubs := genExampleClubData(db, t) server := CampusServer{db: db} - response, err := server.ListStudentClub(ctx, &pb.ListStudentClubRequest{}) + language := pb.Language_German + response, err := server.ListStudentClub(ctx, &pb.ListStudentClubRequest{Language: &language}) require.NoError(t, err) url0 := exampleClubs[0].Image.FullExternalUrl() expectedResp := &pb.ListStudentClubReply{ Collections: []*pb.StudentClubCollection{ { - Title: exampleClubs[0].StudentClubCollection.ID, - Description: exampleClubs[0].StudentClubCollection.Description, + UnstableCollectionId: uint64(exampleClubs[0].StudentClubCollection.ID), + Title: exampleClubs[0].StudentClubCollection.Name, + Description: exampleClubs[0].StudentClubCollection.Description, Clubs: []*pb.StudentClub{ { Name: exampleClubs[0].Name, @@ -40,8 +42,9 @@ func TestCampusServer_ListStudentClub(t *testing.T) { }, }, { - Title: exampleClubs[2].StudentClubCollection.ID, - Description: exampleClubs[2].StudentClubCollection.Description, + UnstableCollectionId: uint64(exampleClubs[2].StudentClubCollection.ID), + Title: exampleClubs[2].StudentClubCollection.Name, + Description: exampleClubs[2].StudentClubCollection.Description, Clubs: []*pb.StudentClub{ { Name: exampleClubs[2].Name, @@ -55,14 +58,16 @@ func TestCampusServer_ListStudentClub(t *testing.T) { func genExampleClubData(db *gorm.DB, t *testing.T) []*model.StudentClub { col1 := model.StudentClubCollection{ - ID: "col1", + Name: "col1", + Language: pb.Language_German.String(), Description: "Awesome collection", } err := db.Create(&col1).Error require.NoError(t, err) col2 := model.StudentClubCollection{ - ID: "col2", + Name: "col2", Description: "Terrible collection", + Language: pb.Language_German.String(), } err = db.Create(&col2).Error require.NoError(t, err) @@ -78,6 +83,7 @@ func genExampleClubData(db *gorm.DB, t *testing.T) []*model.StudentClub { require.NoError(t, err) club1 := &model.StudentClub{ Name: "Student Club 1", + Language: pb.Language_German.String(), Description: null.StringFrom("With Description"), LinkUrl: null.StringFrom("https://example.com"), ImageID: null.IntFrom(file1.File), @@ -90,6 +96,7 @@ func genExampleClubData(db *gorm.DB, t *testing.T) []*model.StudentClub { require.NoError(t, err) club2 := &model.StudentClub{ Name: "Student Club 2", + Language: pb.Language_German.String(), StudentClubCollectionID: col1.ID, StudentClubCollection: col1, } @@ -97,6 +104,7 @@ func genExampleClubData(db *gorm.DB, t *testing.T) []*model.StudentClub { require.NoError(t, err) club3 := &model.StudentClub{ Name: "Student Club 3", + Language: pb.Language_German.String(), StudentClubCollectionID: col2.ID, StudentClubCollection: col2, } diff --git a/server/backend/update_note_test.go b/server/backend/update_note_test.go index ae74e6b4..008d1854 100644 --- a/server/backend/update_note_test.go +++ b/server/backend/update_note_test.go @@ -46,7 +46,7 @@ func (s *UpdateNoteSuite) SetupSuite() { s.deviceBuf = newDeviceBuffer() } -const ExpectedGetUpdateNoteQuery = "SELECT * FROM `update_note` WHERE `update_note`.`version_code` = ? ORDER BY `update_note`.`version_code` LIMIT ?" +const ExpectedGetUpdateNoteQuery = "SELECT * FROM `update_notes` WHERE `update_notes`.`version_code` = ? ORDER BY `update_notes`.`version_code` LIMIT ?" func (s *UpdateNoteSuite) Test_GetUpdateNoteOne() { s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedGetUpdateNoteQuery)). diff --git a/server/go.mod b/server/go.mod index 0132eb9b..ec019e6e 100644 --- a/server/go.mod +++ b/server/go.mod @@ -1,17 +1,17 @@ module github.com/TUM-Dev/Campus-Backend/server -go 1.21.0 +go 1.23 -toolchain go1.23.0 +toolchain go1.23.1 require ( github.com/DATA-DOG/go-sqlmock v1.5.2 - github.com/PuerkitoBio/goquery v1.9.2 + github.com/PuerkitoBio/goquery v1.10.0 github.com/disintegration/imaging v1.6.2 github.com/docker/go-connections v0.5.0 github.com/gabriel-vasile/mimetype v1.4.5 - github.com/getsentry/sentry-go v0.28.1 - github.com/go-gormigrate/gormigrate/v2 v2.1.2 + github.com/getsentry/sentry-go v0.29.0 + github.com/go-gormigrate/gormigrate/v2 v2.1.3 github.com/gofrs/uuid/v5 v5.3.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 github.com/guregu/null v4.0.0+incompatible @@ -19,18 +19,18 @@ require ( github.com/microcosm-cc/bluemonday v1.0.27 github.com/mmcdole/gofeed v1.3.0 github.com/onrik/gorm-logrus v0.5.0 - github.com/prometheus/client_golang v1.20.1 + github.com/prometheus/client_golang v1.20.4 github.com/sirupsen/logrus v1.9.3 github.com/soheilhy/cmux v0.1.5 github.com/stretchr/testify v1.9.0 github.com/testcontainers/testcontainers-go v0.33.0 golang.org/x/sync v0.8.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240822170219-fc7c04adadcd - google.golang.org/grpc v1.65.0 - google.golang.org/protobuf v1.34.2 + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 + google.golang.org/grpc v1.67.0 + google.golang.org/protobuf v1.34.3-0.20240906163944-03df6c145d96 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df gorm.io/driver/mysql v1.5.7 - gorm.io/gorm v1.25.11 + gorm.io/gorm v1.25.12 ) require ( @@ -48,7 +48,7 @@ require ( github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v27.1.2+incompatible // indirect + github.com/docker/docker v27.2.1+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -89,20 +89,20 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/sdk v1.30.0 // indirect + go.opentelemetry.io/otel/trace v1.30.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect - golang.org/x/crypto v0.26.0 // indirect + golang.org/x/crypto v0.27.0 // indirect golang.org/x/image v0.18.0 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/text v0.17.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/server/go.sum b/server/go.sum index 8b0ac736..1e4c6051 100644 --- a/server/go.sum +++ b/server/go.sum @@ -15,8 +15,8 @@ github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKd github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE= -github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk= +github.com/PuerkitoBio/goquery v1.10.0 h1:6fiXdLuUvYs2OJSvNRqlNPoBm6YABE226xrbavY5Wv4= +github.com/PuerkitoBio/goquery v1.10.0/go.mod h1:TjZZl68Q3eGHNBA8CWaxAN7rOU1EbDz3CWuolcO5Yu4= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= @@ -66,8 +66,8 @@ github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44am github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= -github.com/docker/docker v27.1.2+incompatible h1:AhGzR1xaQIy53qCkxARaFluI00WPGtXn0AJuoQsVYTY= -github.com/docker/docker v27.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.2.1+incompatible h1:fQdiLfW7VLscyoeYEBz7/J8soYFDZV1u6VW6gJEjNMI= +github.com/docker/docker v27.2.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -84,14 +84,14 @@ github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmV github.com/gabriel-vasile/mimetype v1.4.5 h1:J7wGKdGu33ocBOhGy0z653k/lFKLFDPJMG8Gql0kxn4= github.com/gabriel-vasile/mimetype v1.4.5/go.mod h1:ibHel+/kbxn9x2407k1izTA1S81ku1z/DlgOW2QE0M4= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= -github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= +github.com/getsentry/sentry-go v0.29.0 h1:YtWluuCFg9OfcqnaujpY918N/AhCCwarIDWOYSBAjCA= +github.com/getsentry/sentry-go v0.29.0/go.mod h1:jhPesDAL0Q0W2+2YEuVOvdWmVtdsr1+jtBrlDEVWwLY= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-gormigrate/gormigrate/v2 v2.1.2 h1:F/d1hpHbRAvKezziV2CC5KUE82cVe9zTgHSBoOOZ4CY= -github.com/go-gormigrate/gormigrate/v2 v2.1.2/go.mod h1:9nHVX6z3FCMCQPA7PThGcA55t22yKQfK/Dnsf5i7hUo= +github.com/go-gormigrate/gormigrate/v2 v2.1.3 h1:ei3Vq/rpPI/jCJY9mRHJAKg5vU+EhZyWhBAkaAomQuw= +github.com/go-gormigrate/gormigrate/v2 v2.1.3/go.mod h1:VJ9FIOBAur+NmQ8c4tDVwOuiJcgupTG105FexPFrXzA= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= @@ -307,8 +307,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= -github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= @@ -405,20 +405,20 @@ github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFi github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= +go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= +go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= @@ -435,8 +435,8 @@ golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ= golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= @@ -474,8 +474,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -532,8 +532,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -543,8 +543,8 @@ golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -556,8 +556,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -579,12 +579,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240822170219-fc7c04adadcd h1:BBOTEWLuuEGQy9n1y9MhVJ9Qt0BDu21X8qZs71/uPZo= -google.golang.org/genproto/googleapis/api v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:fO8wJzT2zbQbAjbIoos1285VfEIYKDDY+Dt+WpTkh6g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -597,8 +597,8 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.34.3-0.20240906163944-03df6c145d96 h1:gqpvySYmKe3qf25lfA3WIEMTXBU+lfISbNkPH2BA844= +google.golang.org/protobuf v1.34.3-0.20240906163944-03df6c145d96/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -624,8 +624,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo= gorm.io/driver/mysql v1.5.7/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= -gorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg= -gorm.io/gorm v1.25.11/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= +gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8= +gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= diff --git a/server/model/cafeteria.go b/server/model/cafeteria.go deleted file mode 100644 index a5c59582..00000000 --- a/server/model/cafeteria.go +++ /dev/null @@ -1,15 +0,0 @@ -package model - -// Cafeteria stores all Available cafeterias in the format of the eat-api -type Cafeteria struct { - Cafeteria int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteria;type:int;not null;" json:"canteen" ` - Name string `gorm:"column:name;type:mediumtext;not null;" json:"name" ` - Address string `gorm:"column:address;type:text;not null;" json:"address" ` - Latitude float32 `gorm:"column:latitude;type:float;not null;" json:"latitude" ` - Longitude float32 `gorm:"column:longitude;type:float;not null;" json:"longitude"` -} - -// TableName sets the insert table name for this struct type -func (n *Cafeteria) TableName() string { - return "cafeteria" -} diff --git a/server/model/cafeteria_rating_tag.go b/server/model/cafeteria_rating_tag.go deleted file mode 100644 index 15e964b6..00000000 --- a/server/model/cafeteria_rating_tag.go +++ /dev/null @@ -1,14 +0,0 @@ -package model - -// CafeteriaRatingTag struct is a row record of the either the dish_tag_rating-table or the cafeteria_rating_tags-table in the database -type CafeteriaRatingTag struct { - CafeteriaRatingTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:CafeteriaRatingTag;type:int;not null;" json:"CanteenRatingTag" ` - CorrespondingRating int64 `gorm:"foreignKey:cafeteriaRatingID;column:correspondingRating;type:int;not null;" json:"correspondingRating"` - Points int32 `gorm:"column:points;type:int;not null;" json:"points"` - TagID int64 `gorm:"foreignKey:cafeteriaRatingTagOption;column:tagID;type:int;not null;" json:"tagID"` -} - -// TableName sets the insert table name for this struct type -func (n *CafeteriaRatingTag) TableName() string { - return "cafeteria_rating_tag" -} diff --git a/server/model/cafeteria_rating_tag_option.go b/server/model/cafeteria_rating_tag_option.go deleted file mode 100644 index e4a9237d..00000000 --- a/server/model/cafeteria_rating_tag_option.go +++ /dev/null @@ -1,13 +0,0 @@ -package model - -// CafeteriaRatingTagOption stores all available options for tags which can be used to quickly rate cafeterias -type CafeteriaRatingTagOption struct { - CafeteriaRatingsTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagOption;type:int;not null;" json:"canteenRatingTagOption"` - DE string `gorm:"column:DE;text;default:('de');not null;" json:"DE"` - EN string `gorm:"column:EN;text;default:('en');not null;" json:"EN"` -} - -// TableName sets the insert table name for this struct type -func (n *CafeteriaRatingTagOption) TableName() string { - return "cafeteria_rating_tag_option" -} diff --git a/server/model/canteen.go b/server/model/canteen.go new file mode 100644 index 00000000..b5a9c1e3 --- /dev/null +++ b/server/model/canteen.go @@ -0,0 +1,10 @@ +package model + +// Canteen stores all Available cafeterias in the format of the eat-api +type Canteen struct { + Cafeteria int64 `gorm:"primary_key;autoIncrement;column:cafeteria;type:int;not null;" json:"canteen" ` + Name string `gorm:"column:name;type:text;not null;" json:"name" ` + Address string `gorm:"column:address;type:text;not null;" json:"address" ` + Latitude float64 `gorm:"column:latitude;type:double;not null;" json:"latitude" ` + Longitude float64 `gorm:"column:longitude;type:double;not null;" json:"longitude"` +} diff --git a/server/model/canteen_head_count.go b/server/model/canteen_head_count.go index 391400e5..ade4144b 100644 --- a/server/model/canteen_head_count.go +++ b/server/model/canteen_head_count.go @@ -10,10 +10,5 @@ type CanteenHeadCount struct { Count uint32 `gorm:"column:count;type:int;not null;" json:"count"` MaxCount uint32 `gorm:"column:max_count;type:int;not null;" json:"max_count"` Percent float32 `gorm:"column:percent;type:float;not null;" json:"percent"` - Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;" json:"timestamp" ` -} - -// TableName sets the insert table name for this struct type -func (n *CanteenHeadCount) TableName() string { - return "canteen_head_count" + Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;default:current_timestamp();OnUpdate:current_timestamp();" json:"timestamp" ` } diff --git a/server/model/cafeteria_rating.go b/server/model/canteen_rating.go similarity index 52% rename from server/model/cafeteria_rating.go rename to server/model/canteen_rating.go index cfa5f686..66f9242c 100644 --- a/server/model/cafeteria_rating.go +++ b/server/model/canteen_rating.go @@ -4,17 +4,12 @@ import ( "time" ) -// CafeteriaRating stores all Available cafeterias in the format of the eat-api -type CafeteriaRating struct { - CafeteriaRating int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRating;type:int;not null;" json:"canteenrating"` +// CanteenRating stores all Available cafeterias in the format of the eat-api +type CanteenRating struct { + CafeteriaRating int64 `gorm:"primary_key;autoIncrement;column:cafeteriaRating;type:int;not null;" json:"canteenrating"` Points int32 `gorm:"column:points;type:int;not null;" json:"points"` Comment string `gorm:"column:comment;type:text;" json:"comment" ` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"canteenID"` - Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;" json:"timestamp" ` + Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;default:current_timestamp();OnUpdate:current_timestamp();" json:"timestamp" ` Image string `gorm:"column:image;type:text;" json:"image"` } - -// TableName sets the insert table name for this struct type -func (n *CafeteriaRating) TableName() string { - return "cafeteria_rating" -} diff --git a/server/model/cafeteria_rating_statistic.go b/server/model/canteen_rating_statistic.go similarity index 72% rename from server/model/cafeteria_rating_statistic.go rename to server/model/canteen_rating_statistic.go index 7af0faeb..e33b5e00 100644 --- a/server/model/cafeteria_rating_statistic.go +++ b/server/model/canteen_rating_statistic.go @@ -3,8 +3,8 @@ package model // CafeteriaRatingStatistic is a view for statistics of cafeteria ratings type CafeteriaRatingStatistic struct { CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;"` - Average float64 `gorm:"column:average;type:float;not null;"` + Average float64 `gorm:"column:average;type:double;not null;"` Min int32 `gorm:"column:min;type:int;not null;"` Max int32 `gorm:"column:max;type:int;not null;"` - Std float64 `gorm:"column:std;type:float;not null;"` + Std float64 `gorm:"column:std;type:double;not null;"` } diff --git a/server/model/canteen_rating_tag.go b/server/model/canteen_rating_tag.go new file mode 100644 index 00000000..fd70196f --- /dev/null +++ b/server/model/canteen_rating_tag.go @@ -0,0 +1,11 @@ +package model + +// CanteenRatingTag connects Canteens with ratings +type CanteenRatingTag struct { + CanteenRatingTag int64 `gorm:"primary_key;autoIncrement;column:CafeteriaRatingTag"` + RatingID int64 `gorm:"column:correspondingRating;not null"` + //Rating CanteenRating + TagID int64 `gorm:"column:tagID;not null"` + //Tag CanteenRatingTagOption + Points int32 `gorm:"not null"` +} diff --git a/server/model/canteen_rating_tag_option.go b/server/model/canteen_rating_tag_option.go new file mode 100644 index 00000000..40c52060 --- /dev/null +++ b/server/model/canteen_rating_tag_option.go @@ -0,0 +1,8 @@ +package model + +// CanteenRatingTagOption stores all available options for tags which can be used to quickly rate cafeterias +type CanteenRatingTagOption struct { + CafeteriaRatingsTagOption int64 `gorm:"primary_key;autoIncrement;column:cafeteriaRatingTagOption;type:int;not null;" json:"canteenRatingTagOption"` + DE string `gorm:"column:DE;text;default:('de');not null;" json:"DE"` + EN string `gorm:"column:EN;text;default:('en');not null;" json:"EN"` +} diff --git a/server/model/cafeteria_rating_tag_statistic.go b/server/model/canteen_rating_tag_statistic.go similarity index 76% rename from server/model/cafeteria_rating_tag_statistic.go rename to server/model/canteen_rating_tag_statistic.go index 7793df17..a7e1f441 100644 --- a/server/model/cafeteria_rating_tag_statistic.go +++ b/server/model/canteen_rating_tag_statistic.go @@ -4,8 +4,8 @@ package model type CafeteriaRatingTagsStatistic struct { CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"canteenID"` TagID int64 `gorm:"column:tagID;foreignKey:cafeteriaRatingTagOption;type:int;not null;" json:"tagID"` - Average float32 `gorm:"column:average;type:float;not null;" json:"average"` + Average float64 `gorm:"column:average;type:double;not null;" json:"average"` Min int8 `gorm:"column:min;type:int;not null;" json:"min"` Max int8 `gorm:"column:max;type:int;not null;" json:"max"` - Std float32 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } diff --git a/server/model/cafeteria_model_type.go b/server/model/cantteen_model_type.go similarity index 100% rename from server/model/cafeteria_model_type.go rename to server/model/cantteen_model_type.go diff --git a/server/model/crontab.go b/server/model/crontab.go index 3d21bce3..3d293e6b 100644 --- a/server/model/crontab.go +++ b/server/model/crontab.go @@ -4,16 +4,16 @@ import ( "github.com/guregu/null" ) -// TableName overrides the table name used by Crontab to `crontab` (Would otherwise auto-migrate to crontabs) -func (Crontab) TableName() string { - return "crontab" -} - // Crontab struct is a row record of the crontab table in the tca database type Crontab struct { - Cron int64 `gorm:"primary_key;AUTO_INCREMENT;column:cron;type:int;" json:"cron"` - Interval int32 `gorm:"column:interval;type:int;default:7200;" json:"interval"` - LastRun int32 `gorm:"column:lastRun;type:int;default:0;" json:"last_run"` - Type null.String `gorm:"column:type;type:enum ('news', 'mensa', 'movie', 'roomfinder', 'alarm', 'fileDownload','dishNameDownload', 'iosNotifications', 'iosActivityReset', 'canteenHeadCount', 'newExamResultsHook', 'scrapeStudentClubs');" json:"type"` + Cron int64 `gorm:"primary_key;autoIncrement;column:cron;type:int;" json:"cron"` + Interval int32 `gorm:"column:interval;type:int;default:7200;not null" json:"interval"` + LastRun int32 `gorm:"column:lastRun;type:int;default:0;not null" json:"last_run"` + Type null.String `gorm:"column:type;type:enum ('news','mensa','ticketsale','alarm','fileDownload','canteenHeadCount','iosNotifications','iosActivityReset','newExamResultsHook','movie','feedbackEmail','dishNameDownload','scrapeStudentClubs');" json:"type"` ID null.Int `gorm:"column:id;type:int;" json:"id"` } + +// TableName sets the insert table name for this struct type +func (n *Crontab) TableName() string { + return "crontab" +} diff --git a/server/model/device.go b/server/model/device.go index d69708f3..eeaa69db 100755 --- a/server/model/device.go +++ b/server/model/device.go @@ -8,18 +8,18 @@ import ( // Device struct is a row record of the devices table in the tca database type Device struct { - Device int64 `gorm:"primary_key;AUTO_INCREMENT;column:device;type:int;" json:"device"` + Device int64 `gorm:"primary_key;autoIncrement;column:device;type:int;" json:"device"` Member null.Int `gorm:"column:member;type:int;" json:"member"` - UUID string `gorm:"column:uuid;type:varchar(50);" json:"uuid"` + UUID string `gorm:"column:uuid;type:varchar(50);not null" json:"uuid"` Created null.Time `gorm:"column:created;type:timestamp;" json:"created"` - LastAccess time.Time `gorm:"column:lastAccess;type:timestamp;default:current_timestamp();" json:"last_access"` - LastAPI string `gorm:"column:lastApi;type:text;size:16777215;" json:"last_api"` - Developer string `gorm:"column:developer;type:enum('true','false');default:'false';" json:"developer"` - OsVersion string `gorm:"column:osVersion;type:text;size:16777215;" json:"os_version"` - AppVersion string `gorm:"column:appVersion;type:text;size:16777215;" json:"app_version"` - Counter int32 `gorm:"column:counter;type:int;default:0;" json:"counter"` - Pk null.String `gorm:"column:pk;type:text;size:4294967295;" json:"pk"` - PkActive string `gorm:"column:pkActive;type:enum('true', 'false');default:'false';" json:"pk_active"` + LastAccess time.Time `gorm:"column:lastAccess;type:timestamp;default:current_timestamp();OnUpdate:current_timestamp();not null" json:"last_access"` + LastAPI string `gorm:"column:lastApi;type:text;not null;default:('')" json:"last_api"` + Developer string `gorm:"column:developer;type:enum('true','false');default:'false';not null" json:"developer"` + OsVersion string `gorm:"column:osVersion;type:text;not null;default:('')" json:"os_version"` + AppVersion string `gorm:"column:appVersion;type:text;not null;default:('')" json:"app_version"` + Counter int32 `gorm:"column:counter;type:int;default:0;not null" json:"counter"` + Pk null.String `gorm:"column:pk;type:text;" json:"pk"` + PkActive string `gorm:"column:pkActive;type:enum('true', 'false');default:'false';not null" json:"pk_active"` GcmToken null.String `gorm:"column:gcmToken;type:text;size:65535;" json:"gcm_token"` GcmStatus null.String `gorm:"column:gcmStatus;type:varchar(200);" json:"gcm_status"` ConfirmationKey null.String `gorm:"column:confirmationKey;type:varchar(35);" json:"confirmation_key"` diff --git a/server/model/dish.go b/server/model/dish.go index 635c8f30..86a77e5a 100644 --- a/server/model/dish.go +++ b/server/model/dish.go @@ -13,7 +13,7 @@ var ( // Dish represents one dish fin a specific cafeteria type Dish struct { - Dish int64 `gorm:"primary_key;AUTO_INCREMENT;column:dish;type:int;not null;" json:"dish"` + Dish int64 `gorm:"primary_key;autoIncrement;column:dish;type:int;not null;" json:"dish"` Name string `gorm:"column:name;type:text;not null;uniqueIndex:dish_name_cafeteriaID_uindex,expression:name(255)" json:"name" ` Type string `gorm:"column:type;type:text;not null;" json:"type" ` CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;uniqueIndex:dish_name_cafeteriaID_uindex" json:"cafeteriaID"` @@ -21,5 +21,5 @@ type Dish struct { // TableName sets the insert table name for this struct type func (n *Dish) TableName() string { - return "dish" + return "dishes" } diff --git a/server/model/dish_name_tag.go b/server/model/dish_name_tag.go index 1dc52ab4..3dbc6aba 100644 --- a/server/model/dish_name_tag.go +++ b/server/model/dish_name_tag.go @@ -1,13 +1,10 @@ package model type DishNameTag struct { - DishNameTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:DishNameTag;type:int;not null;" json:"DishNameTag"` - CorrespondingRating int64 `gorm:"foreignKey:dish;column:correspondingRating;type:int;not null;" json:"correspondingRating"` - Points int32 `gorm:"column:points;type:int;not null;" json:"points"` - TagNameID int64 `gorm:"foreignKey:tagRatingID;column:tagNameID;type:int;not null;" json:"tagnameID"` -} - -// TableName sets the insert table name for this struct type -func (n *DishNameTag) TableName() string { - return "dish_name_tag" + DishNameTag int64 `gorm:"primary_key;autoIncrement;column:DishNameTag;not null;"` + RatingID int64 `gorm:"foreignKey:dish;column:correspondingRating;not null;"` + //Rating CanteenRating + TagNameID int64 `gorm:"foreignKey:tagRatingID;column:tagNameID;not null;"` + //TagName DishNameTag + Points int32 `gorm:"not null;"` } diff --git a/server/model/dish_name_tag_option.go b/server/model/dish_name_tag_option.go index 143eb8a4..22f1360a 100644 --- a/server/model/dish_name_tag_option.go +++ b/server/model/dish_name_tag_option.go @@ -1,12 +1,7 @@ package model type DishNameTagOption struct { - DishNameTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOption;type:int;not null;" json:"dishNameTagOption"` + DishNameTagOption int64 `gorm:"primary_key;autoIncrement;column:dishNameTagOption;type:int;not null;" json:"dishNameTagOption"` DE string `gorm:"column:DE;type:text;not null;" json:"DE"` EN string `gorm:"column:EN;type:text;not null;" json:"EN"` } - -// TableName sets the insert table name for this struct type -func (n *DishNameTagOption) TableName() string { - return "dish_name_tag_option" -} diff --git a/server/model/dish_name_tag_option_excluded.go b/server/model/dish_name_tag_option_excluded.go deleted file mode 100644 index f957ed11..00000000 --- a/server/model/dish_name_tag_option_excluded.go +++ /dev/null @@ -1,12 +0,0 @@ -package model - -type DishNameTagOptionExcluded struct { - DishNameTagOptionExcluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionExcluded;type:int;not null;" json:"dishNameTagOptionExcluded"` - NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` - Expression string `gorm:"column:expression;type:text;" json:"expression"` -} - -// TableName sets the insert table name for this struct type -func (n *DishNameTagOptionExcluded) TableName() string { - return "dish_name_tag_option_excluded" -} diff --git a/server/model/dish_name_tag_option_included.go b/server/model/dish_name_tag_option_included.go deleted file mode 100644 index ddd7683d..00000000 --- a/server/model/dish_name_tag_option_included.go +++ /dev/null @@ -1,12 +0,0 @@ -package model - -type DishNameTagOptionIncluded struct { - DishNameTagOptionIncluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionIncluded;type:int;not null;" json:"dishNameTagOptionIncluded"` - NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` - Expression string `gorm:"column:expression;type:text;" json:"expression"` -} - -// TableName sets the insert table name for this struct type -func (n *DishNameTagOptionIncluded) TableName() string { - return "dish_name_tag_option_included" -} diff --git a/server/model/dish_name_tag_statistic.go b/server/model/dish_name_tag_statistic.go index 44539206..c7144182 100644 --- a/server/model/dish_name_tag_statistic.go +++ b/server/model/dish_name_tag_statistic.go @@ -4,8 +4,8 @@ package model type DishNameTagStatistic struct { CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"` TagID int64 `gorm:"column:tagID;foreignKey:DishNameTagOption;type:int;not null;" json:"tagID"` - Average float32 `gorm:"column:average;type:float;not null;" json:"average" ` + Average float64 `gorm:"column:average;type:double;not null;" json:"average" ` Min int8 `gorm:"column:min;type:int;not null;" json:"min"` Max int8 `gorm:"column:max;type:int;not null;" json:"max"` - Std float32 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } diff --git a/server/model/dish_rating.go b/server/model/dish_rating.go index 2a7fb85d..0e5e93dd 100644 --- a/server/model/dish_rating.go +++ b/server/model/dish_rating.go @@ -5,16 +5,11 @@ import ( ) type DishRating struct { - DishRating int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRating;type:int;not null;" json:"dishRating"` + DishRating int64 `gorm:"primary_key;autoIncrement;column:dishRating;type:int;not null;" json:"dishRating"` Points int32 `gorm:"column:points;type:int;not null;" json:"points"` - DishID int64 `gorm:"column:dishID;type:int;not null;" json:"dishID"` + DishID int64 `gorm:"column:dishID;type:int;not null;index:dish_rating_dish_dish_fk" json:"dishID"` Dish Dish `gorm:"foreignKey:dishID;references:dish;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` Comment string `gorm:"column:comment;type:text;" json:"comment"` - Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;" json:"timestamp"` + Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;default:current_timestamp();OnUpdate:current_timestamp();" json:"timestamp"` Image string `gorm:"column:image;type:text;" json:"image"` } - -// TableName sets the insert table name for this struct type -func (n *DishRating) TableName() string { - return "dish_rating" -} diff --git a/server/model/dish_rating_statistic.go b/server/model/dish_rating_statistic.go index bbf56c04..90a24154 100644 --- a/server/model/dish_rating_statistic.go +++ b/server/model/dish_rating_statistic.go @@ -4,8 +4,8 @@ package model type DishRatingStatistic struct { CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;"` DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;"` - Average float64 `gorm:"column:average;type:float;not null;"` + Average float64 `gorm:"column:average;type:double;not null;"` Min int32 `gorm:"column:min;type:int;not null;"` Max int32 `gorm:"column:max;type:int;not null;"` - Std float64 `gorm:"column:std;type:float;not null;"` + Std float64 `gorm:"column:std;type:double;not null;"` } diff --git a/server/model/dish_rating_tag.go b/server/model/dish_rating_tag.go index de2bda74..5eb64223 100644 --- a/server/model/dish_rating_tag.go +++ b/server/model/dish_rating_tag.go @@ -1,13 +1,10 @@ package model type DishRatingTag struct { - DishRatingTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTag;type:int;not null;" json:"dishRatingTag"` - CorrespondingRating int64 `gorm:"foreignKey:cafeteriaRating;column:parentRating;type:int;not null;" json:"parentRating"` - Points int32 `gorm:"column:points;type:int;not null;" json:"points"` - TagID int64 `gorm:"foreignKey:dishRatingTagOption;column:tagID;type:int;not null;" json:"tagID"` -} - -// TableName sets the insert table name for this struct type -func (n *DishRatingTag) TableName() string { - return "dish_rating_tag" + DishRatingTag int64 `gorm:"primary_key;autoIncrement;column:dishRatingTag"` + RatingID int64 `gorm:"column:parentRating;not null"` + //Rating CanteenRating + TagID int64 `gorm:"column:tagID;not null"` + //Tag CanteenRatingTagOption + Points int32 `gorm:"not null"` } diff --git a/server/model/dish_rating_tag_option.go b/server/model/dish_rating_tag_option.go index 6309b801..7de9563f 100644 --- a/server/model/dish_rating_tag_option.go +++ b/server/model/dish_rating_tag_option.go @@ -2,12 +2,7 @@ package model // DishRatingTagOption stores all available options for tags which can be used to quickly rate dishes type DishRatingTagOption struct { - DishRatingTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagOption;type:int;not null;" json:"dishRatingTagOption"` + DishRatingTagOption int64 `gorm:"primary_key;autoIncrement;column:dishRatingTagOption;type:int;not null;" json:"dishRatingTagOption"` DE string `gorm:"column:DE;type:text;default:('de');not null;" json:"DE"` EN string `gorm:"column:EN;type:text;default:('en');not null;" json:"EN"` } - -// TableName sets the insert table name for this struct type -func (n *DishRatingTagOption) TableName() string { - return "dish_rating_tag_option" -} diff --git a/server/model/dish_rating_tag_statistic.go b/server/model/dish_rating_tag_statistic.go index 7eb41c65..e2847727 100644 --- a/server/model/dish_rating_tag_statistic.go +++ b/server/model/dish_rating_tag_statistic.go @@ -5,8 +5,8 @@ type DishRatingTagStatistic struct { CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"` TagID int64 `gorm:"column:tagID;foreignKey:tagID;type:int;not null;" json:"tagID"` DishID int64 `gorm:"column:dishID;foreignKey:dishID;type:int;not null;" json:"dishID"` - Average float32 `gorm:"column:average;type:float;not null;" json:"average" ` + Average float64 `gorm:"column:average;type:double;not null;" json:"average" ` Min int8 `gorm:"column:min;type:int;not null;" json:"min"` Max int8 `gorm:"column:max;type:int;not null;" json:"max"` - Std float32 `gorm:"column:std;type:float;not null;" json:"std"` + Std float64 `gorm:"column:std;type:double;not null;" json:"std"` } diff --git a/server/model/dish_to_dish_name_tag.go b/server/model/dish_to_dish_name_tag.go index 279ff1c5..6d172178 100644 --- a/server/model/dish_to_dish_name_tag.go +++ b/server/model/dish_to_dish_name_tag.go @@ -1,12 +1,7 @@ package model type DishToDishNameTag struct { - DishToDishNameTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishToDishNameTag;type:int;not null;" json:"dishToDishNameTag"` + DishToDishNameTag int64 `gorm:"primary_key;autoIncrement;column:dishToDishNameTag;type:int;not null;" json:"dishToDishNameTag"` DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"` NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` } - -// TableName sets the insert table name for this struct type -func (n *DishToDishNameTag) TableName() string { - return "dish_to_dish_name_tag" -} diff --git a/server/model/dishes_of_the_week.go b/server/model/dishes_of_the_week.go index 219c306d..e5bdda36 100644 --- a/server/model/dishes_of_the_week.go +++ b/server/model/dishes_of_the_week.go @@ -1,14 +1,9 @@ package model type DishesOfTheWeek struct { - DishesOfTheWeek int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishesOfTheWeek;type:int;not null;" json:"dishesOfTheWeek"` + DishesOfTheWeek int64 `gorm:"primary_key;autoIncrement;column:dishesOfTheWeek;type:int;not null;" json:"dishesOfTheWeek"` Year int32 `gorm:"column:year;type:int;not null;" json:"year"` Week int32 `gorm:"column:week;type:int;not null;" json:"week"` Day int32 `gorm:"column:day;type:int;not null;" json:"day"` DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"` } - -// TableName sets the insert table name for this struct type -func (n *DishesOfTheWeek) TableName() string { - return "dishes_of_the_week" -} diff --git a/server/model/excluded_dish_name_tag_option.go b/server/model/excluded_dish_name_tag_option.go new file mode 100644 index 00000000..49bbb8d9 --- /dev/null +++ b/server/model/excluded_dish_name_tag_option.go @@ -0,0 +1,7 @@ +package model + +type ExcludedDishNameTagOption struct { + DishNameTagOptionExcluded int64 `gorm:"primary_key;autoIncrement;column:dishNameTagOptionExcluded;type:int;not null;" json:"dishNameTagOptionExcluded"` + NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` + Expression string `gorm:"column:expression;type:text;" json:"expression"` +} diff --git a/server/model/feedback.go b/server/model/feedback.go index 4c181e8e..a3a2c120 100644 --- a/server/model/feedback.go +++ b/server/model/feedback.go @@ -1,23 +1,25 @@ package model import ( + "time" + "github.com/guregu/null" ) type Feedback struct { - Id int64 `gorm:"column:id;primary_key;AUTO_INCREMENT;type:int;not null;"` - ImageCount int32 `gorm:"column:image_count;type:int;not null;"` - EmailId string `gorm:"column:email_id;type:text;not null"` - Recipient string `gorm:"column:receiver;type:text;not null;uniqueIndex:receiver_reply_to_feedback_app_version_uindex,expression:receiver(255)"` - ReplyToEmail null.String `gorm:"column:reply_to_email;type:text;null;uniqueIndex:receiver_reply_to_feedback_app_version_uindex,expression:reply_to_email(100)"` - ReplyToName null.String `gorm:"column:reply_to_name;type:text;null"` - Feedback string `gorm:"column:feedback;type:text;not null;uniqueIndex:receiver_reply_to_feedback_app_version_uindex,expression:feedback(255)"` - Latitude null.Float `gorm:"column:latitude;type:float;null;"` - Longitude null.Float `gorm:"column:longitude;type:float;null;"` - OsVersion null.String `gorm:"column:os_version;type:text;null;"` - AppVersion null.String `gorm:"column:app_version;type:text;null;uniqueIndex:receiver_reply_to_feedback_app_version_uindex,expression:app_version(100)"` - Processed bool `gorm:"column:processed;type:boolean;default:false;not null;"` - Timestamp null.Time `gorm:"column:timestamp;type:timestamp;default:CURRENT_TIMESTAMP;null;"` + Id int64 `gorm:"column:id;primary_key;autoIncrement;not null"` + ImageCount int32 `gorm:"column:image_count;not null"` + EmailId string `gorm:"column:email_id;not null"` + Recipient string `gorm:"column:receiver;not null;uniqueIndex:receiver_reply_to_feedback_app_version_uindex,expression:receiver(255)"` + ReplyToEmail null.String `gorm:"column:reply_to_email;uniqueIndex:receiver_reply_to_feedback_app_version_uindex,expression:reply_to_email(100)"` + ReplyToName null.String `gorm:"column:reply_to_name"` + Feedback string `gorm:"column:feedback;not null;uniqueIndex:receiver_reply_to_feedback_app_version_uindex,expression:feedback(255)"` + Latitude null.Float `gorm:"column:latitude;type:double"` + Longitude null.Float `gorm:"column:longitude;type:double"` + OsVersion null.String `gorm:"column:os_version"` + AppVersion null.String `gorm:"column:app_version;uniqueIndex:receiver_reply_to_feedback_app_version_uindex,expression:app_version(100)"` + Processed bool `gorm:"column:processed;default:false;not null"` + Timestamp time.Time `gorm:"column:timestamp;type:datetime;default:current_timestamp();not null"` } // TableName sets the insert table name for this struct type diff --git a/server/model/file.go b/server/model/file.go index be246062..93d675c1 100644 --- a/server/model/file.go +++ b/server/model/file.go @@ -18,10 +18,10 @@ var ( // File struct is a row record of the files table in the tca database type File struct { - File int64 `gorm:"primary_key;AUTO_INCREMENT;column:file;type:int;" json:"file"` - Name string `gorm:"column:name;type:text;size:16777215;" json:"name"` - Path string `gorm:"column:path;type:text;size:16777215;" json:"path"` - Downloads int32 `gorm:"column:downloads;type:int;default:0;" json:"downloads"` + File int64 `gorm:"primary_key;autoIncrement;column:file;type:int;" json:"file"` + Name string `gorm:"column:name;type:text;size:16777215;not null" json:"name"` + Path string `gorm:"column:path;type:text;size:16777215;not null" json:"path"` + Downloads int32 `gorm:"column:downloads;type:int;default:0;not null" json:"downloads"` URL null.String `gorm:"column:url;default:null;" json:"url"` // URL of the files source (if any) Downloaded null.Bool `gorm:"column:downloaded;type:boolean;default:1;" json:"downloaded"` // true when file is ready to be served, false when still being downloaded } diff --git a/server/model/included_dish_name_tag_option.go b/server/model/included_dish_name_tag_option.go new file mode 100644 index 00000000..917b1cb0 --- /dev/null +++ b/server/model/included_dish_name_tag_option.go @@ -0,0 +1,7 @@ +package model + +type IncludedDishNameTagOption struct { + DishNameTagOptionIncluded int64 `gorm:"primary_key;autoIncrement;column:dishNameTagOptionIncluded;type:int;not null;" json:"dishNameTagOptionIncluded"` + NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"` + Expression string `gorm:"column:expression;type:text;" json:"expression"` +} diff --git a/server/model/kino.go b/server/model/movie.go similarity index 76% rename from server/model/kino.go rename to server/model/movie.go index c1dc417d..e267773c 100644 --- a/server/model/kino.go +++ b/server/model/movie.go @@ -6,11 +6,11 @@ import ( "github.com/guregu/null" ) -// Kino stores all movies -type Kino struct { - Id int64 `gorm:"primary_key;AUTO_INCREMENT;column:kino;type:int;not null;"` +// Movie stores all movies +type Movie struct { + Id int64 `gorm:"primary_key;autoIncrement;column:kino;type:int;not null;"` Date time.Time `gorm:"column:date;type:datetime;not null;"` - Created time.Time `gorm:"column:created;type:timestamp;not null;default:CURRENT_TIMESTAMP"` + Created time.Time `gorm:"column:created;type:timestamp;not null;default:current_timestamp()"` Title string `gorm:"column:title;type:text;not null;"` Year null.String `gorm:"column:year;type:varchar(4)"` Runtime null.String `gorm:"column:runtime;type:varchar(40)"` @@ -22,11 +22,6 @@ type Kino struct { Trailer null.String `gorm:"column:trailer"` FileID int64 `gorm:"column:cover"` File File `gorm:"foreignKey:FileID;references:file"` - Link string `gorm:"column:link;type:varchar(190);not null;unique;"` + Link string `gorm:"column:link;type:varchar(190);not null;uniqueIndex:uni_kino_link"` Location null.String `gorm:"column:location;default:null"` } - -// TableName sets the insert table name for this struct type -func (n *Kino) TableName() string { - return "kino" -} diff --git a/server/model/news.go b/server/model/news.go index 5de7ace7..1dd7867b 100755 --- a/server/model/news.go +++ b/server/model/news.go @@ -15,9 +15,9 @@ var ( // News struct is a row record of the news table in the tca database type News struct { - News int64 `gorm:"primary_key;AUTO_INCREMENT;column:news;type:int;"` + News int64 `gorm:"primary_key;autoIncrement;column:news;type:int;"` Date time.Time `gorm:"column:date;type:datetime;"` - Created time.Time `gorm:"column:created;type:timestamp;default:CURRENT_TIMESTAMP;"` + Created time.Time `gorm:"column:created;type:timestamp;default:current_timestamp();"` Title string `gorm:"column:title;type:text;size:255;"` Description string `gorm:"column:description;type:text;size:65535;"` NewsSourceID int64 `gorm:"column:src;type:int;"` @@ -27,8 +27,3 @@ type News struct { FileID null.Int `gorm:"column:file;type:int;"` File *File `gorm:"foreignKey:FileID;references:file;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` } - -// TableName sets the insert table name for this struct type -func (n *News) TableName() string { - return "news" -} diff --git a/server/model/news_alert.go b/server/model/news_alert.go index 076c1ae1..f35d3a4f 100644 --- a/server/model/news_alert.go +++ b/server/model/news_alert.go @@ -17,17 +17,12 @@ var ( // NewsAlert struct is a row record of the news_alert table in the tca database type NewsAlert struct { - NewsAlert int64 `gorm:"primary_key;AUTO_INCREMENT;column:news_alert;type:int;" json:"news_alert"` + NewsAlert int64 `gorm:"primary_key;autoIncrement;column:news_alert;type:int;" json:"news_alert"` FileID int64 `gorm:"column:file;not null"` File File `gorm:"foreignKey:FileID;references:file;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` Name null.String `gorm:"column:name;type:varchar(100);" json:"name"` Link null.String `gorm:"column:link;type:text;size:65535;" json:"link"` - Created time.Time `gorm:"column:created;type:timestamp;default:CURRENT_TIMESTAMP;" json:"created"` - From time.Time `gorm:"column:from;type:datetime;default:CURRENT_TIMESTAMP;" json:"from"` - To time.Time `gorm:"column:to;type:datetime;default:CURRENT_TIMESTAMP;" json:"to"` -} - -// TableName sets the insert table name for this struct type -func (n *NewsAlert) TableName() string { - return "news_alert" + Created time.Time `gorm:"column:created;type:timestamp;default:current_timestamp();" json:"created"` + From time.Time `gorm:"column:from;type:datetime;default:current_timestamp();" json:"from"` + To time.Time `gorm:"column:to;type:datetime;default:current_timestamp();" json:"to"` } diff --git a/server/model/news_source.go b/server/model/news_source.go index 62cc4ca2..5a86c3d9 100644 --- a/server/model/news_source.go +++ b/server/model/news_source.go @@ -15,17 +15,11 @@ var ( _ = uuid.UUID{} ) -// NewsSource struct is a row record of the newsSource table in the tca database type NewsSource struct { - Source int64 `gorm:"primary_key;AUTO_INCREMENT;column:source;type:int;"` + Source int64 `gorm:"primary_key;autoIncrement;column:source;type:int;"` Title string `gorm:"column:title;type:text;size:16777215;"` URL null.String `gorm:"column:url;type:text;size:16777215;"` FileID int64 `gorm:"column:icon;not null;type:int;"` File File `gorm:"foreignKey:FileID;references:file;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` Hook null.String `gorm:"column:hook;type:char;size:12;"` } - -// TableName sets the insert table name for this struct type -func (n *NewsSource) TableName() string { - return "newsSource" -} diff --git a/server/model/notification.go b/server/model/notification.go index 31256045..19c9108f 100644 --- a/server/model/notification.go +++ b/server/model/notification.go @@ -17,12 +17,12 @@ var ( // Notification struct is a row record of the notification table in the tca database type Notification struct { - Notification int64 `gorm:"primary_key;AUTO_INCREMENT;column:notification;type:int;" json:"notification"` + Notification int64 `gorm:"primary_key;autoIncrement;column:notification;type:int;" json:"notification"` Type int32 `gorm:"column:type;type:int;" json:"type"` Location null.Int `gorm:"column:location;type:int;" json:"location"` Title string `gorm:"column:title;type:text;size:65535;" json:"title"` Description string `gorm:"column:description;type:text;size:65535;" json:"description"` - Created time.Time `gorm:"column:created;type:timestamp;default:CURRENT_TIMESTAMP;" json:"created"` + Created time.Time `gorm:"column:created;type:timestamp;default:current_timestamp();" json:"created"` Signature null.String `gorm:"column:signature;type:text;size:65535;" json:"signature"` Silent int32 `gorm:"column:silent;type:tinyint;default:0;" json:"silent"` } diff --git a/server/model/notification_confirmation.go b/server/model/notification_confirmation.go index 7e20fa88..fd12106d 100644 --- a/server/model/notification_confirmation.go +++ b/server/model/notification_confirmation.go @@ -20,7 +20,7 @@ type NotificationConfirmation struct { Notification int64 `gorm:"primary_key;column:notification;type:int;" json:"notification"` Device int64 `gorm:"primary_key;column:device;type:int;" json:"device"` Sent int32 `gorm:"column:sent;type:tinyint;default:0;" json:"sent"` - Created time.Time `gorm:"column:created;type:timestamp;default:CURRENT_TIMESTAMP;" json:"created"` + Created time.Time `gorm:"column:created;type:timestamp;default:current_timestamp();" json:"created"` Received null.Time `gorm:"column:received;type:timestamp;" json:"received"` } diff --git a/server/model/notification_type.go b/server/model/notification_type.go index f3f29592..ceef3461 100644 --- a/server/model/notification_type.go +++ b/server/model/notification_type.go @@ -17,7 +17,7 @@ var ( // NotificationType struct is a row record of the notification_type table in the tca database type NotificationType struct { - Type int64 `gorm:"primary_key;AUTO_INCREMENT;column:type;type:int;" json:"type"` + Type int64 `gorm:"primary_key;autoIncrement;column:type;type:int;" json:"type"` Name string `gorm:"column:name;type:text;size:65535;" json:"name"` Confirmation string `gorm:"column:confirmation;type:enum('true', 'false');default:'false';" json:"confirmation"` } diff --git a/server/model/student_club.go b/server/model/student_club.go index 9f64ca2d..d29a54fd 100644 --- a/server/model/student_club.go +++ b/server/model/student_club.go @@ -9,11 +9,12 @@ import ( type StudentClub struct { gorm.Model Name string + Language string `gorm:"type:enum('German','English');default:'German'"` Description null.String LinkUrl null.String `gorm:"type:varchar(190);unique;"` ImageID null.Int Image *File `gorm:"foreignKey:ImageID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` ImageCaption null.String - StudentClubCollectionID string `gorm:"type:varchar(100)"` + StudentClubCollectionID uint StudentClubCollection StudentClubCollection `gorm:"foreignKey:StudentClubCollectionID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` } diff --git a/server/model/student_club_collection.go b/server/model/student_club_collection.go index bdbb659b..c8f08aee 100644 --- a/server/model/student_club_collection.go +++ b/server/model/student_club_collection.go @@ -1,16 +1,11 @@ package model -import ( - "time" - - "gorm.io/gorm" -) +import "gorm.io/gorm" // StudentClubCollection stores what collection a club belongs to type StudentClubCollection struct { - ID string `gorm:"primaryKey;type:varchar(100)"` + gorm.Model + Name string `gorm:"type:varchar(100)"` + Language string `gorm:"type:enum('German','English');default:'German'"` Description string - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt gorm.DeletedAt `gorm:"index"` } diff --git a/server/model/update_note.go b/server/model/update_note.go index ad83708f..464797e8 100755 --- a/server/model/update_note.go +++ b/server/model/update_note.go @@ -2,12 +2,7 @@ package model // UpdateNote struct for update notes type UpdateNote struct { - VersionCode int64 `gorm:"primary_key;AUTO_INCREMENT;column:version_code;type:int;"` + VersionCode int64 `gorm:"primary_key;autoIncrement;column:version_code;type:int;"` VersionName string `gorm:"column:version_name;type:text;"` Message string `gorm:"column:message;type:text;"` } - -// TableName sets the insert table name for this struct type -func (n *UpdateNote) TableName() string { - return "update_note" -}