22 lines
389 B
Go
22 lines
389 B
Go
package db
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
db "management/internal/db/sqlc"
|
|
)
|
|
|
|
func initDepartment() (*db.SysDepartment, error) {
|
|
arg := db.CreateSysDepartmentParams{
|
|
Name: "公司",
|
|
ParentID: 0,
|
|
ParentPath: ",0,",
|
|
Status: 0,
|
|
Sort: 6666,
|
|
CreatedAt: time.Now(),
|
|
UpdatedAt: time.Now(),
|
|
}
|
|
return db.Engine.CreateSysDepartment(context.Background(), &arg)
|
|
}
|