add tysc handlers to kontor-gin
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Assignment struct {
|
||||
ID string `gorm:"type:string;primary_key;" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_date" json:"created_date"`
|
||||
UpdatedAt time.Time `gorm:"column:last_modified_date" json:"last_modified_date"`
|
||||
DeletedAt *time.Time `gorm:"column:deleted_date" json:"deleted_date"`
|
||||
Version int `gorm:"default:0" json:"version"`
|
||||
ProfileID *string `gorm:"column:profile_id" json:"profile_id"`
|
||||
Profile *Profile `gorm:"foreignKey:ProfileID" json:"profile"`
|
||||
PermissionID *string `gorm:"column:permission_id" json:"permission_id"`
|
||||
Permission *Profile `gorm:"foreignKey:PermissionID" json:"permission"`
|
||||
}
|
||||
|
||||
func (assignment *Assignment) TableName() string {
|
||||
return "assignment"
|
||||
}
|
||||
|
||||
type AssignmentDTO struct {
|
||||
ID string `json:"id" binding:"required"`
|
||||
CreatedAt time.Time `json:"created_date" binding:"required"`
|
||||
UpdatedAt time.Time `json:"last_modified_date" binding:"required"`
|
||||
DeletedAt *time.Time `json:"deleted_date" binding:"omitempty"`
|
||||
Version int `json:"version" binding:"required"`
|
||||
ProfileID *string `json:"profile_id" binding:"required"`
|
||||
PermissionID *string `json:"permission_id" binding:"required"`
|
||||
}
|
||||
Reference in New Issue
Block a user