Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ModelTypeRegistry = map[string]any{ "Apartment": Apartment{}, "ApartmentBookingPrice": ApartmentBookingPrice{}, "ApartmentContract": ApartmentContract{}, "ApartmentHighlight": ApartmentHighlight{}, "Estate": Estate{}, "Tenant": Tenant{}, "User": User{}, "CustomSchema": CustomSchema{}, }
Functions ¶
This section is empty.
Types ¶
type Apartment ¶
type Apartment struct {
gorm.Model
EstateID int
Estate *Estate `gorm:"foreignKey:EstateID"`
ApartmentNumber string
Street string
ElectricityMeterNumber string
IsDeleted bool
DeletedAt *time.Time
ImageUrls []string `gorm:"type:json"`
IsVacant bool
Address string
BedroomCount int
BathroomCount int
GuestCount int
Size float64
Description string
}
Apartment represents an apartment unit within an estate
type ApartmentBookingPrice ¶
type ApartmentBookingPrice struct {
gorm.Model
ApartmentID int
Apartment *Apartment `gorm:"foreignKey:ApartmentID"`
BookingPrice float64 `gorm:"type:decimal(10,2)"`
BookingType uint
BookingMultiplier int
CreatedBy string
IsDeleted bool
DeletedAt *time.Time
}
ApartmentBookingPrice represents the pricing for an apartment
type ApartmentContract ¶
type ApartmentContract struct {
gorm.Model
ApartmentID int
Apartment *Apartment `gorm:"foreignKey:ApartmentID"`
ApartmentBookingPriceID int
ApartmentBookingPrice *ApartmentBookingPrice `gorm:"foreignKey:ApartmentBookingPriceID"`
TenantID int
Tenant *Tenant `gorm:"foreignKey:TenantID"`
ContractStart time.Time
ContractEnd time.Time
CreatedBy string
IsDeleted bool
DeletedAt *time.Time
BookingType uint
TotalCost float64 `gorm:"type:decimal(10,2)"`
PaymentMode string
Email string
}
ApartmentContract represents a rental contract for an apartment
type ApartmentHighlight ¶
type ApartmentHighlight struct {
gorm.Model
ApartmentID int
Apartment *Apartment `gorm:"foreignKey:ApartmentID"`
Feature string
}
ApartmentHighlight represents a feature or highlight of an apartment
type CustomSchema ¶
type CustomSchema struct {
gorm.Model
Title string `json:"title" gorm:"not null" validate:"nonzero"`
File string `json:"file" gorm:"not null"`
Duration int `json:"duration" gorm:"default:0"`
Thumbnail string `json:"thumbnail" gorm:"type:text"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"index"`
}
func (CustomSchema) TableName ¶
func (CustomSchema) TableName() string
type Estate ¶
type Estate struct {
gorm.Model
Name string
Address string
City string
State string
Country string
IsDeleted bool
UserManagerID uint
UserManager *User `gorm:"foreignKey:UserManagerID"`
}
Estate represents a real estate property
type Tenant ¶
type Tenant struct {
gorm.Model
FirstName string
LastName string
Email string
Phone string
ApartmentID int
Apartment *Apartment `gorm:"foreignKey:ApartmentID"`
CreatedBy string
IdentityDoc string
Signature string
IsDeleted bool
DeletedAt *time.Time
OwnerID int
ContractStart time.Time
ContractEnd time.Time
UserManagerID int
UserManager *User `gorm:"foreignKey:UserManagerID"`
}
Tenant represents a tenant renting an apartment
Click to show internal directories.
Click to hide internal directories.