package models import "time" type Position struct { tableName struct{} `pg:"position"` //职位ID Id int64 `pg:",pk"` //公司ID CompanyId int64 `comment:"公司ID"` //职位名称 Name string `comment:"职位名称"` //父级职位ID ParentId int64 `comment:"父级职位ID" pg:",use_zero"` //职位路径 Path string `comment:"职位路径"` //职位层级 Level int `comment:"职位层级" pg:",use_zero"` //创建时间 CreatedAt time.Time `comment:"创建时间" pg:"default:now()"` //更新时间 UpdatedAt time.Time `comment:"更新时间" pg:"default:now()"` //删除时间 DeletedAt *time.Time `comment:"删除时间" pg:",soft_delete"` }