Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task struct { Id int `gorm:"type:int;primaryKey;autoIncrement" json:"id"` UserId int `gorm:"int" json:"userId"` Title string `gorm:"type:varchar(255)" json:"title"` Description string `gorm:"type:text" json:"description"` Status string `gorm:"type:varchar(50)" json:"status"` Reason string `gorm:"type:text; default:" json:"reason"` Revision string `gorm:"int; default:0" json:"revision"` DueDate string `gorm:"type:varchar(50)" json:"dueDate"` SubmitDate string `gorm:"type:varchar(50)" json:"submitDate"` RejectedDate string `gorm:"type:varchar(50)" json:"rejectDate"` ApprovedDate string `gorm:"type:varchar(50)" json:"approvedDate"` Attachment string `gorm:"type:varchar(255)" json:"attachment"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` User User `gorm:"foreignKey:UserId" json:"user,omitempty"` }
type User ¶
type User struct { Id int `gorm:"type:int;primaryKey;autoIncrement" json:"id"` Role string `gorm:"type:varchar(10)" json:"role,omitempty"` Name string `gorm:"type:varchar(255)" json:"name"` Email string `gorm:"type:varchar(50)" json:"email,omitempty"` Password string `gorm:"type:varchar(255)" json:"password,omitempty"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Task []Task `gorm:"constraint:OnDelete:CASCADE" json:"tasks,omitempty"` }
Click to show internal directories.
Click to hide internal directories.