Documentation
¶
Index ¶
- type Admin
- type Bid
- type Category
- type CompletedImages
- type District
- type IdProof
- type Post
- type PostImages
- type PreferredLocation
- type Probook
- type Profession
- type ProfileImages
- type Provider
- type ProviderNotification
- type Rating
- type State
- type User
- type UserNotification
- type Work
- type WorkspaceImages
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
Name string `json:"name" gorm:"validate:required"`
Email string `json:"email" gorm:"validate:required"`
Password string `json:"password" gorm:"validate:required"`
Previlege string `json:"previlege" gorm:"previlege:2;default:'normal_admin';previlage IN ('super_admin','normal_admin')"`
}
type Bid ¶
type Bid struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
WorkID int `json:"work_id"`
Work Work `json:"-" gorm:"foreignkey:WorkID;constraint:OnDelete:CASCADE"`
ProID int `json:"pro_id"`
Provider Provider `json:"-" gorm:"foreignkey:ProID;constraint:OnDelete:CASCADE"`
Estimate float64 `json:"estimate"`
Description string `json:"description"`
}
type CompletedImages ¶
type Post ¶
type Post struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
ProID int `json:"pro_id"`
Provider Provider `json:"-" gorm:"foreignkey:ProID;constraint:OnDelete:CASCADE"`
WorkID int `json:"work_id"`
Work Work `json:"-" gorm:"foreignkey:WorkID;constraint:OnDelete:CASCADE"`
Description string `json:"description"`
}
type PostImages ¶
type PreferredLocation ¶
type PreferredLocation struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
ProID int `json:"pro_id"`
Provider Provider `json:"-" gorm:"foreignkey:ProID;constraint:OnDelete:CASCADE"`
DistrictID int `json:"district_id"`
District District `json:"-" gorm:"foreignkey:DistrictID;constraint:OnDelete:CASCADE"`
}
type Probook ¶
type Probook struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
ProID int `json:"pro_id"`
Provider Provider `json:"-" gorm:"foreignkey:ProID;constraint:OnDelete:CASCADE"`
ProfessionID int `json:"profession_id"`
Profession Profession `json:"-" gorm:"foreignkey:ProfessionID;constraint:OnDelete:CASCADE"`
}
type Profession ¶
type Profession struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
Profession string `json:"profession" gorm:"unique,not null"`
CategoryID int `json:"category_id"`
Category Category `json:"-" gorm:"foreignkey:CategoryID;constraint:OnDelete:CASCADE"`
IsDeleted bool `json:"is_deleted" gorm:"Default:false" `
}
type ProfileImages ¶
type Provider ¶
type Provider struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
Name string `json:"name" gorm:"not null"`
Email string `json:"email" gorm:"not null"`
Password string `json:"password" gorm:"not null"`
Phone string `json:"phone" gorm:"not null"`
IsVerified bool `json:"verified" gorm:"default:false"`
IsRejected bool `json:"is_rejected" gorm:"default:false"`
}
type ProviderNotification ¶
type ProviderNotification struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
ProID int `json:"pro_id"`
Provider Provider `json:"-" gorm:"foreignkey:ProID;constraint:OnDelete:CASCADE"`
Time time.Time `json:"time"`
Description string `json:"description"`
TargetURL string `json:"target_url"`
IsRead bool `json:"is_read" gorm:"default:false"`
}
type User ¶
type User struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
Name string `json:"name" gorm:"not null"`
Email string `json:"email" gorm:"not null"`
Phone string `json:"phone" gorm:"unique;not null"`
Password string `json:"password" gorm:"not null"`
IsBlocked bool `json:"is_blocked" gorm:"Default:false"`
}
type UserNotification ¶
type UserNotification struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
UserID int `json:"user_id"`
User User `json:"-" gorm:"foreignkey:UserID;constraint:OnDelete:CASCADE"`
Time time.Time `json:"time"`
Description string `json:"description"`
TargetURL string `json:"target_url"`
IsRead bool `json:"is_read" gorm:"default:false"`
}
type Work ¶
type Work struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
Street string `json:"street"`
DistrictID int `json:"district_id"`
District District `json:"-" gorm:"foreignkey:DistrictID;constraint:OnDelete:CASCADE"`
StateID int `json:"state_id"`
State State `json:"-" gorm:"foreignkey:StateID;constraint:OnDelete:CASCADE"`
TargetProfessionID int `json:"target_profession"`
Profession Profession `json:"-" gorm:"foreignkey:TargetProfessionID;constraint:OnDelete:CASCADE"`
UserID int `json:"user_id"`
User User `json:"-" gorm:"foreignkey:UserID;constraint:OnDelete:CASCADE"`
ProID int `json:"pro_id"`
Provider Provider `json:"-" gorm:"foreignkey:ProID;constraint:OnDelete:CASCADE"`
WorkStatus string `json:"work_status" gorm:"column:work_status;default:'listed';check:work_status IN ('listed','committed','completed')"`
}
Click to show internal directories.
Click to hide internal directories.