Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Generación de controlador /avaluo
  • Loading branch information
lud committed Mar 28, 2023
1 parent 5e2b1e5 commit 0b5c6f9
Show file tree
Hide file tree
Showing 5 changed files with 436 additions and 0 deletions.
80 changes: 80 additions & 0 deletions controllers/avaluo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package controllers

import (
"github.com/astaxie/beego"
)

// AvaluoController operations for Avaluo
type AvaluoController struct {
beego.Controller
}

// URLMapping ...
func (c *AvaluoController) URLMapping() {
c.Mapping("Post", c.Post)
c.Mapping("GetOne", c.GetOne)
c.Mapping("GetAll", c.GetAll)
c.Mapping("Put", c.Put)
c.Mapping("Delete", c.Delete)
}

// Post ...
// @Title Create
// @Description create Avaluo
// @Param body body models.Avaluo true "body for Avaluo content"
// @Success 201 {object} models.Avaluo
// @Failure 403 body is empty
// @router / [post]
func (c *AvaluoController) Post() {

}

// GetOne ...
// @Title GetOne
// @Description get Avaluo by id
// @Param id path string true "The key for staticblock"
// @Success 200 {object} models.Avaluo
// @Failure 403 :id is empty
// @router /:id [get]
func (c *AvaluoController) GetOne() {

}

// GetAll ...
// @Title GetAll
// @Description get Avaluo
// @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..."
// @Param fields query string false "Fields returned. e.g. col1,col2 ..."
// @Param sortby query string false "Sorted-by fields. e.g. col1,col2 ..."
// @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..."
// @Param limit query string false "Limit the size of result set. Must be an integer"
// @Param offset query string false "Start position of result set. Must be an integer"
// @Success 200 {object} models.Avaluo
// @Failure 403
// @router / [get]
func (c *AvaluoController) GetAll() {

}

// Put ...
// @Title Put
// @Description update the Avaluo
// @Param id path string true "The id you want to update"
// @Param body body models.Avaluo true "body for Avaluo content"
// @Success 200 {object} models.Avaluo
// @Failure 403 :id is not int
// @router /:id [put]
func (c *AvaluoController) Put() {

}

// Delete ...
// @Title Delete
// @Description delete the Avaluo
// @Param id path string true "The id you want to delete"
// @Success 200 {string} delete success!
// @Failure 403 id is empty
// @router /:id [delete]
func (c *AvaluoController) Delete() {

}
45 changes: 45 additions & 0 deletions routers/commentsRouter_controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,51 @@ func init() {
Filters: nil,
Params: nil})

beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"] = append(beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"],
beego.ControllerComments{
Method: "Post",
Router: "/",
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})

beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"] = append(beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"],
beego.ControllerComments{
Method: "GetAll",
Router: "/",
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})

beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"] = append(beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"],
beego.ControllerComments{
Method: "GetOne",
Router: "/:id",
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})

beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"] = append(beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"],
beego.ControllerComments{
Method: "Put",
Router: "/:id",
AllowHTTPMethods: []string{"put"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})

beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"] = append(beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:AvaluoController"],
beego.ControllerComments{
Method: "Delete",
Router: "/:id",
AllowHTTPMethods: []string{"delete"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})

beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:BajaController"] = append(beego.GlobalControllerRouter["github.com/udistrital/arka_mid/controllers:BajaController"],
beego.ControllerComments{
Method: "Post",
Expand Down
5 changes: 5 additions & 0 deletions routers/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ func init() {
&controllers.InmueblesController{},
),
),
beego.NSNamespace("/avaluo",
beego.NSInclude(
&controllers.AvaluoController{},
),
),
)

beego.AddNamespace(ns)
Expand Down
184 changes: 184 additions & 0 deletions swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,182 @@
}
}
},
"/avaluo/": {
"get": {
"tags": [
"avaluo"
],
"description": "get Avaluo",
"operationId": "AvaluoController.GetAll",
"parameters": [
{
"in": "query",
"name": "query",
"description": "Filter. e.g. col1:v1,col2:v2 ...",
"type": "string"
},
{
"in": "query",
"name": "fields",
"description": "Fields returned. e.g. col1,col2 ...",
"type": "string"
},
{
"in": "query",
"name": "sortby",
"description": "Sorted-by fields. e.g. col1,col2 ...",
"type": "string"
},
{
"in": "query",
"name": "order",
"description": "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ...",
"type": "string"
},
{
"in": "query",
"name": "limit",
"description": "Limit the size of result set. Must be an integer",
"type": "string"
},
{
"in": "query",
"name": "offset",
"description": "Start position of result set. Must be an integer",
"type": "string"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/models.Avaluo"
}
},
"403": {
"description": ""
}
}
},
"post": {
"tags": [
"avaluo"
],
"description": "create Avaluo",
"operationId": "AvaluoController.Create",
"parameters": [
{
"in": "body",
"name": "body",
"description": "body for Avaluo content",
"required": true,
"schema": {
"$ref": "#/definitions/models.Avaluo"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/models.Avaluo"
}
},
"403": {
"description": "body is empty"
}
}
}
},
"/avaluo/{id}": {
"get": {
"tags": [
"avaluo"
],
"description": "get Avaluo by id",
"operationId": "AvaluoController.GetOne",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The key for staticblock",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/models.Avaluo"
}
},
"403": {
"description": ":id is empty"
}
}
},
"put": {
"tags": [
"avaluo"
],
"description": "update the Avaluo",
"operationId": "AvaluoController.Put",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id you want to update",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "body for Avaluo content",
"required": true,
"schema": {
"$ref": "#/definitions/models.Avaluo"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/models.Avaluo"
}
},
"403": {
"description": ":id is not int"
}
}
},
"delete": {
"tags": [
"avaluo"
],
"description": "delete the Avaluo",
"operationId": "AvaluoController.Delete",
"parameters": [
{
"in": "path",
"name": "id",
"description": "The id you want to delete",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{string} delete success!"
},
"403": {
"description": "id is empty"
}
}
}
},
"/bajas_elementos/": {
"get": {
"tags": [
Expand Down Expand Up @@ -1673,6 +1849,10 @@
}
}
},
"models.Avaluo": {
"title": "Avaluo",
"type": "object"
},
"models.BodegaConsumoSolicitud": {
"title": "BodegaConsumoSolicitud",
"type": "object",
Expand Down Expand Up @@ -4241,6 +4421,10 @@
{
"name": "inmuebles",
"description": "InmueblesController operations for Inmuebles\n"
},
{
"name": "avaluo",
"description": "AvaluoController operations for Avaluo\n"
}
]
}

0 comments on commit 0b5c6f9

Please sign in to comment.