domain

package
v0.0.0-...-6720ee0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

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 Category

type Category struct {
	ID        int    `json:"id" gorm:"primaryKey;autoIncrement"`
	Category  string `json:"category" gorm:"unique;not null"`
	IsDeleted bool   `json:"is_deleted" gorm:"Default:false" `
}

type CompletedImages

type CompletedImages struct {
	ID     int    `json:"id" gorm:"primaryKey;autoIncrement"`
	WorkID int    `json:"work_id"`
	Work   Work   `json:"-" gorm:"foreignkey:WorkID;constraint:OnDelete:CASCADE"`
	Image  string `json:"image"`
}

type District

type District struct {
	ID        int    `json:"id" gorm:"primaryKey;autoIncrement"`
	District  string `json:"district" gorm:"unique;not null"`
	StateID   int    `json:"state_id"`
	State     State  `json:"-" gorm:"foreignkey:StateID;constraint:OnDelete:CASCADE"`
	IsDeleted bool   `json:"is_deleted" gorm:"Default:false"`
}

type IdProof

type IdProof struct {
	ID       int      `json:"id" gorm:"primaryKey;autoIncrement"`
	ProID    int      `json:"pro_id"`
	Provider Provider `json:"-" gorm:"foreignkey:ProID;constraint:OnDelete:CASCADE"`
	IdProof  string   `json:"id_proof"`
}

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 PostImages struct {
	ID     int    `json:"id" gorm:"primaryKey;autoIncrement"`
	PostID int    `json:"post_id"`
	Post   Post   `json:"-" gorm:"foreignkey:PostID;constraint:OnDelete:CASCADE"`
	Image  string `json:"image"`
}

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 ProfileImages struct {
	ID       int      `json:"id" gorm:"primaryKey;autoIncrement"`
	ProID    int      `json:"pro_id"`
	Provider Provider `json:"-" gorm:"foreignkey:ProID;constraint:OnDelete:CASCADE"`
	Image    string   `json:"image"`
}

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 Rating

type Rating struct {
	ID       int    `json:"id" gorm:"primaryKey;autoIncrement"`
	Rating   int    `json:"rating" gorm:"rating"`
	Feedback string `json:"feedback"`
	WorkID   int    `json:"work_id"`
	Work     Work   `json:"-" gorm:"foreignkey:WorkID;constraint:OnDelete:CASCADE"`
}

type State

type State struct {
	ID        int    `json:"id" gorm:"primaryKey;autoIncrement"`
	State     string `json:"state" gorm:"unique;not null"`
	IsDeleted bool   `json:"is_deleted" 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')"`
}

type WorkspaceImages

type WorkspaceImages struct {
	ID     int    `json:"id" gorm:"primaryKey;autoIncrement"`
	WorkID int    `json:"work_id"`
	Work   Work   `json:"-" gorm:"foreignkey:WorkID;constraint:OnDelete:CASCADE"`
	Image  string `json:"image"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳