model

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Banner struct {
	Id          int                  `json:"id_banner"`
	ImageId     int                  `json:"id_imagem"`
	URL         null.String          `json:"link"`
	Order       int                  `json:"ordem"`
	Title       null.String          `json:"titulo"`
	Description null.String          `json:"descricao"`
	HrefTarget  string               `json:"abrir_em"`
	IsVideo     json.IntBool         `json:"is_video"`
	VideoUrl    json.NullEmptyString `json:"video"`
	ImageUrl    json.NullEmptyString `json:"imagem"`
}

func (Banner) Identifier

func (b Banner) Identifier() int

type Broker

type Broker struct {
	Id                      int           `json:"id"`
	Name                    string        `json:"nome"`
	Creci                   string        `json:"creci"`
	Avatar                  null.String   `json:"avatar"`
	Biography               null.String   `json:"biografia"`
	JobPosition             null.String   `json:"cargo"`
	Birthday                null.String   `json:"data_nascimento"`
	CityName                null.String   `json:"cidade"`
	StateAbbrev             null.String   `json:"estado"`
	IsBroker                bool          `json:"corretor"`
	Email                   null.String   `json:"email"`
	PrimaryPhoneNumber      null.String   `json:"telefone"`
	AltPhoneNumber          null.String   `json:"telefone2"`
	PrimaryPhoneHasWhatsapp null.Bool     `json:"telefone_whatsapp"`
	AltPhoneHasWhatsapp     null.Bool     `json:"telefone2_whatsapp"`
	TwitterUrl              null.String   `json:"twitter"`
	FacebookUrl             null.String   `json:"facebook"`
	LinkedinUrl             null.String   `json:"linkedin"`
	SkypeUrl                null.String   `json:"skype"`
	InstagramUrl            null.String   `json:"instagram"`
	PersonalWebsiteUrl      null.String   `json:"website"`
	ShowPersonalWebsite     bool          `json:"mostrar_site"`
	Testimonials            json.StrSlice `json:"depoimentos"`
}

func (Broker) Identifier

func (b Broker) Identifier() int

type Condominium

type Condominium struct {
	Id                       int                   `json:"id_condominio"`
	Type                     string                `json:"tipo"`
	JetimobCoverImageId      null.Int              `json:"id_imagem"`
	Name                     string                `json:"nome"`
	Featured                 bool                  `json:"destaque"`
	Launch                   bool                  `json:"lancamento"`
	Gated                    bool                  `json:"fechado"`
	ConstructionPercentage   null.Int              `json:"acabamentos"`
	BrickPercentage          null.Int              `json:"alvenaria"`
	StructurePercentage      null.Int              `json:"estruturas"`
	FoundationPercentage     null.Int              `json:"fundacoes"`
	InstallationsPercentage  null.Int              `json:"intalacoes"`
	LandscapingPercentage    null.Int              `json:"paisagismo"`
	ProjectPercentage        null.Int              `json:"projetos"`
	GroundLevelingPercentage null.Int              `json:"terraplanagem"`
	Latitude                 float64               `json:"latitude"`
	Longitude                float64               `json:"longitude"`
	Notes                    json.NullEmptyString  `json:"observacoes"`
	IncorporationRecord      null.String           `json:"registro_incorporacao"`
	JetimobNeighborhoodId    int                   `json:"id_bairro"`
	JetimobCityId            int                   `json:"id_cidade"`
	JetimobStateId           int                   `json:"id_estado"`
	AddressZipcode           string                `json:"endereco_cep"`
	AddressStreet            string                `json:"endereco_logradouro"`
	AddressNeighborhood      string                `json:"endereco_bairro"`
	AddressNumber            string                `json:"endereco_numero"`
	CityName                 string                `json:"endereco_cidade"`
	StateName                string                `json:"endereco_estado"`
	Status                   string                `json:"situacao"`
	DeliveryMonth            null.Int              `json:"entrega_mes"`
	DeliveryYear             null.Int              `json:"entrega_ano"`
	AdministeringCompanyName null.String           `json:"administradora"`
	BuildingCompanyName      null.String           `json:"construtora"`
	RealStateDeveloperName   null.String           `json:"incorporadora"`
	ArchitectName            null.String           `json:"projeto_arquitetonico"`
	LandscaperName           null.String           `json:"projeto_paisagismo"`
	DecoratorName            null.String           `json:"projeto_decoracao"`
	CoverImage               json.NullEmptyString  `json:"logotipo"`
	AvailableProperties      int                   `json:"total_imoveis_disponiveis"`
	Infrastructures          json.CommaStrSlice    `json:"infraestruturas"`
	Labels                   json.CommaStrSlice    `json:"etiquetas"`
	Videos                   CondominiumVideoArray `json:"videos"`
	Images                   CondominiumMediaArray `json:"imagens"`
	Blueprints               CondominiumMediaArray `json:"plantas"`
	ArTour                   json.StrSlice         `json:"tour360"`
	CreatedAt                json.JTime            `json:"data_cadastro"`
	UpdatedAt                json.JTime            `json:"data_update"`
}

func (Condominium) Identifier

func (c Condominium) Identifier() int

type CondominiumMappedMedia added in v1.2.0

type CondominiumMappedMedia struct {
	Url   string      `json:"url"`
	Title null.String `json:"title"`
}

type CondominiumMedia added in v1.2.0

type CondominiumMedia struct {
	Url   string      `json:"link"`
	Title null.String `json:"titulo"`
}

func (CondominiumMedia) MarshalJSON added in v1.2.0

func (cm CondominiumMedia) MarshalJSON() ([]byte, error)

type CondominiumMediaArray added in v1.2.0

type CondominiumMediaArray []CondominiumMedia

func (CondominiumMediaArray) Value added in v1.2.0

func (cma CondominiumMediaArray) Value() (driver.Value, error)

type CondominiumVideo added in v1.2.0

type CondominiumVideo struct {
	Url         string                `json:"href"`
	Title       null.String           `json:"title"`
	Description json2.NullEmptyString `json:"description"`
}

func (CondominiumVideo) MarshalJSON added in v1.2.0

func (cv CondominiumVideo) MarshalJSON() ([]byte, error)

type CondominiumVideoArray added in v1.2.0

type CondominiumVideoArray []CondominiumVideo

func (CondominiumVideoArray) Value added in v1.2.0

func (cv CondominiumVideoArray) Value() (driver.Value, error)

type MappedCondominiumVideo added in v1.2.0

type MappedCondominiumVideo struct {
	MappedVideo
	Description null.String `json:"description"`
}

type MappedMedia

type MappedMedia struct {
	Url          string      `json:"url"`
	ThumbnailUrl string      `json:"thumbnail_url"`
	Title        null.String `json:"title"`
}

type MappedVideo

type MappedVideo struct {
	Url   string      `json:"url"`
	Title null.String `json:"title"`
}

type Media

type Media struct {
	Url          string      `json:"link"`
	ThumbnailUrl string      `json:"link_thumb"`
	Title        null.String `json:"titulo"`
}

func (Media) MarshalJSON

func (m Media) MarshalJSON() ([]byte, error)

func (Media) Value

func (m Media) Value() (driver.Value, error)

type MediaArray

type MediaArray []Media

func (MediaArray) Value

func (ma MediaArray) Value() (driver.Value, error)

type Model

type Model interface {
	Identifier() int
}

type PaginatedResponse

type PaginatedResponse[T any] struct {
	Total      int `json:"total"`
	Page       int `json:"page"`
	PageSize   int `json:"pageSize"`
	TotalPages int `json:"totalPages"`
	Data       T   `json:"data"`
}

PaginatedResponse é o modelo base de qualquer resposta da rota de webservice da jetimob.

func (PaginatedResponse[T]) MaxPages

func (pr PaginatedResponse[T]) MaxPages() int

type Property

type Property struct {
	Id                         int                  `json:"id_imovel"`
	Type                       string               `json:"tipo"`
	CondominiumId              null.Int             `json:"id_condominio"`
	BrokerId                   int                  `json:"id_corretor"`
	StateId                    int                  `json:"id_estado"`
	CityId                     int                  `json:"id_cidade"`
	NeighborhoodId             int                  `json:"id_bairro"`
	IdentifierCode             string               `json:"codigo"`
	Contracts                  json.CommaStrSlice   `json:"contrato"`
	Subtype                    string               `json:"subtipo"`
	Notes                      json.NullEmptyString `json:"observacoes"`
	BuildingType               null.String          `json:"tipo_construcao"`
	DeliveryYear               null.Int             `json:"entrega_ano"`
	DeliveryMonth              null.Int             `json:"entrega_mes"`
	Furnished                  int                  `json:"mobiliado"`
	Suites                     int                  `json:"suites"`
	Bathrooms                  int                  `json:"banheiros"`
	Bedrooms                   int                  `json:"dormitorios"`
	Garages                    int                  `json:"garagens"`
	Financeable                int                  `json:"financiavel"`
	HasExclusivity             bool                 `json:"exclusividade"`
	TotalArea                  null.Float           `json:"area_total"`
	PrivateArea                null.Float           `json:"area_privativa"`
	UsefulArea                 null.Float           `json:"area_util"`
	MeasurementType            string               `json:"medida"`
	FloorTypes                 json.CommaStrSlice   `json:"tipo_piso"`
	TerrainWidthFront          null.Float           `json:"terreno_frente"`
	TerrainWidthBack           null.Float           `json:"terreno_fundos"`
	TerrainLengthLeft          null.Float           `json:"terreno_esquerdo"`
	TerrainLengthRight         null.Float           `json:"terreno_direita"`
	TerrainArea                null.Float           `json:"terreno_total"`
	CreatedAt                  json.JTime           `json:"data_cadastro"`
	BuildingStatus             json.NullEmptyString `json:"status"`
	ShowCondominiumValue       bool                 `json:"valor_condominio_visivel"`
	CondominiumValue           null.Float           `json:"valor_condominio"`
	ShowSaleValue              bool                 `json:"valor_venda_visivel"`
	SaleValue                  null.Float           `json:"valor_venda"`
	ShowRentalValue            bool                 `json:"valor_locacao_visivel"`
	RentalValue                null.Float           `json:"valor_locacao"`
	ShowSeasonalValue          bool                 `json:"valor_temporada_visivel"`
	SeasonalValue              null.Float           `json:"valor_temporada"`
	IptuFrequency              null.String          `json:"periodicidade_iptu"`
	IptuValueExempt            string               `json:"valor_iptu_isento"`
	ShowIptuValue              bool                 `json:"valor_iptu_visivel"`
	IptuValue                  null.Float           `json:"valor_iptu"`
	SeasonCalendar             SeasonCalendarArray  `json:"calendario_temporada"`
	RuralActivities            json.CommaStrSlice   `json:"rural.atividade_rural"`
	RuralHeadquarters          null.Int             `json:"rural.rural_sedes"`
	ArableArea                 null.Float           `json:"rural.rural_area_aravel"`
	AllowedGuests              null.Int             `json:"numero_pessoas"`
	MetaTitle                  json.NullEmptyString `json:"meta_title"`
	MetaDescription            json.NullEmptyString `json:"meta_description"`
	FireInsuranceValue         null.Float           `json:"valor_seguro_incendio"`
	CleaningFeeValue           null.Float           `json:"valor_taxa_limpeza"`
	Position                   null.String          `json:"posicao"`
	SolarPositions             json.CommaStrSlice   `json:"posicao_solar"`
	SeaDistance                null.Int             `json:"distancia_mar"`
	AcceptExchange             bool                 `json:"permuta"`
	Latitude                   null.Float           `json:"latitude"`
	Longitude                  null.Float           `json:"longitude"`
	OccupancyStatus            string               `json:"situacao"`
	Featured                   featuredStr          `json:"destaque"`
	FeatureUntil               null.Time            `json:"destaque_fim"`
	CondominiumType            null.String          `json:"condominio_tipo"`
	CondominiumName            null.String          `json:"condominio_nome"`
	GatedCondominium           null.Bool            `json:"condominio_fechado"`
	ShowFullAddress            bool                 `json:"endereco_completamente_visivel"`
	ShowAddressState           bool                 `json:"endereco_estado_visivel"`
	ShowAddressCity            bool                 `json:"endereco_cidade_visivel"`
	ShowAddressNeighborhood    bool                 `json:"endereco_bairro_visivel"`
	ShowAddressStreet          bool                 `json:"endereco_logradouro_visivel"`
	ShowAddressReference       bool                 `json:"endereco_referencia_visivel"`
	ShowAddressNumber          bool                 `json:"endereco_numero_visivel"`
	ShowAddressFloor           bool                 `json:"andar_visivel"`
	AddressState               string               `json:"endereco_estado"`
	AddressCity                string               `json:"endereco_cidade"`
	AddressNeighborhood        string               `json:"endereco_bairro"`
	AddressStreet              string               `json:"endereco_logradouro"`
	AddressZipcode             null.String          `json:"endereco_cep"`
	AddressReference           json.NullEmptyString `json:"endereco_referencia"`
	AddressNumber              string               `json:"endereco_numero"`
	AddressFloor               null.Int             `json:"andar"`
	GeopositionVisibility      int                  `json:"geoposicionamento_visivel"`
	AdTitle                    json.NullEmptyString `json:"titulo_anuncio"`
	AdDescription              json.NullEmptyString `json:"descricao_anuncio"`
	Labels                     json.CommaStrSlice   `json:"tags"`
	SuretyInsurance            null.Bool            `json:"seguro_fianca"`
	PropertyInfrastructures    json.CommaStrSlice   `json:"imovel_comodidades"`
	CondominiumInfrastructures json.CommaStrSlice   `json:"condominio_comodidades"`
	UpdatedAt                  json.JTime           `json:"updated_at"`
	ValidatedAt                json.JTime           `json:"data_atualizacao"`
	Videos                     VideoArray           `json:"videos"`
	Blueprints                 MediaArray           `json:"plantas"`
	Images                     MediaArray           `json:"imagens"`
	ArTour                     json.StrSlice        `json:"tour360"`
}

func (Property) Identifier

func (p Property) Identifier() int

func (*Property) UnmarshalJSON

func (p *Property) UnmarshalJSON(data []byte) error

type ResponseWithPagination

type ResponseWithPagination interface {
	MaxPages() int
}

type Rural

type Rural struct {
	Activities   json.CommaStrSlice `json:"atividade_rural"`
	Headquarters null.Int           `json:"rural_sedes"`
	ArableArea   null.Float         `json:"rural_area_aravel"`
}

type SeasonCalendar

type SeasonCalendar struct {
	Name               null.String `json:"nome"`
	StartDate          json.JTime  `json:"inicio"`
	EndDate            json.JTime  `json:"fim"`
	DailyRate          null.Float  `json:"valor_diaria"`
	MinimumDailyRental null.Int    `json:"minimo_diarias"`
}

type SeasonCalendarArray

type SeasonCalendarArray []SeasonCalendar

func (SeasonCalendarArray) Value

func (sc SeasonCalendarArray) Value() (driver.Value, error)

type Video

type Video struct {
	Url   string      `json:"link"`
	Title null.String `json:"titulo"`
}

func (Video) MarshalJSON

func (v Video) MarshalJSON() ([]byte, error)

func (Video) Value

func (v Video) Value() (driver.Value, error)

type VideoArray

type VideoArray []Video

func (VideoArray) Value

func (v VideoArray) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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