切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
庄敏学
2 years ago
提交
00102298790be652d8ddac2edbb2da52934da432
2 个父辈
6bdcb287
9afd848c
master
...
dev-pushdata
dev-tangxvhui
dev-zhengzhou
test
v1.3.2-fix
v1.4.0
v2.2.0-fix
20230410
20230403
20230331
20230324
20230315
20230203
20230112
20221208
20221205
v2.2.0
v2.0.0
v1.3.2
v1.3.2-fix
v1.3.1
v1.3.0
v1.2.4
合并分支 'dev_zhuangmx' 到 'test'
增加职位 查看合并请求
!2
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
75 行增加
和
4 行删除
debug.log
go_build_main_go
pkg/infrastructure/pg/init.go
pkg/infrastructure/pg/models/comapny.go
pkg/infrastructure/pg/models/department.go
pkg/infrastructure/pg/models/positions.go
pkg/infrastructure/pg/models/user.go
debug.log
查看文件 @
0010229
...
...
@@ -50,3 +50,56 @@
2022/11/10 09:29:56.217 [E] [asm_amd64.s:1594] performance kafka: client has run out of available brokers to talk to (Is your cluster reachable?) []
2022/11/10 09:30:15.476 [D] [router.go:977] performance | 127.0.0.1|[97;42m 200 [0m| 364.534µs| match|[97;44m GET [0m /log r:/log
2022/11/10 09:30:15.546 [D] [router.go:977] performance | 127.0.0.1|[97;43m 404 [0m| 959.763µs| nomatch|[97;44m GET [0m /favicon.ico
2022/11/10 15:07:19.528 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "company" ("id" bigserial, "logo" text, "name" text, "charge_user_ids" jsonb, "status" bigint, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:07:19.556 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "department" ("id" bigserial, "company_id" bigint, "level" bigint, "name" text, "parent_id" bigint, "charge_user_ids" jsonb, "path" text, "create_at" timestamptz, "update_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:07:19.583 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "user" ("id" bigserial, "account" text, "avatar_url" text, "company_id" bigint, "admin_type" bigint, "name" text, "email" text, "status" bigint, "department_id" jsonb, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:07:19.611 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "received_message" ("message_id" bigserial, "message_type" text, "message_body" text, "occurred_on" timestamptz, "create_at" timestamptz, PRIMARY KEY ("message_id")) null
2022/11/10 15:07:19.638 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role" ("id" bigserial, "name" text, "type" bigint, "description" text, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:07:19.666 [D] [hook.go:130] performance COMMENT ON TABLE public."role" IS '角色'; null
2022/11/10 15:07:19.695 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".id IS 'ID'; null
2022/11/10 15:07:19.723 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".name IS '角色名称'; null
2022/11/10 15:07:19.750 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".type IS '角色类型(0角色可删、1系统预置角色不可删)'; null
2022/11/10 15:07:19.777 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".description IS '角色描述'; null
2022/11/10 15:07:19.805 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".company_id IS '公司ID'; null
2022/11/10 15:07:19.834 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".created_at IS '创建时间'; null
2022/11/10 15:07:19.861 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".updated_at IS '更新时间'; null
2022/11/10 15:07:19.889 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".deleted_at IS '删除时间'; null
2022/11/10 15:07:19.916 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role_user" ("id" bigserial, "role_id" bigint, "user_id" bigint, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:07:19.944 [D] [hook.go:130] performance COMMENT ON TABLE public."role_user" IS '角色用户关系'; null
2022/11/10 15:07:19.971 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".id IS 'ID'; null
2022/11/10 15:07:19.998 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".role_id IS '角色ID'; null
2022/11/10 15:07:20.026 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".user_id IS '用户ID'; null
2022/11/10 15:07:20.054 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".company_id IS '公司ID'; null
2022/11/10 15:07:20.081 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".created_at IS '创建时间'; null
2022/11/10 15:07:20.109 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".updated_at IS '更新时间'; null
2022/11/10 15:07:20.136 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".deleted_at IS '删除时间'; null
2022/11/10 15:07:20.221 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "positions" ("id" bigserial, "company_id" bigint, "name" text, "parent_id" bigint, "path" text, "level" bigint, "remarks" text, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:07:20.257 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "user_positions" ("id" bigserial, "company_id" bigint, "position_id" bigint, "user_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:07:20.272 [I] [???:0] performance http server Running on http://:8082
2022/11/10 15:07:21.024 [E] [asm_amd64.s:1594] performance kafka: client has run out of available brokers to talk to (Is your cluster reachable?) []
2022/11/10 15:58:14.817 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "company" ("id" bigserial, "logo" text, "name" text, "charge_user_ids" jsonb, "status" bigint, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:58:14.843 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "department" ("id" bigserial, "company_id" bigint, "level" bigint, "name" text, "parent_id" bigint, "charge_user_ids" jsonb, "path" text, "create_at" timestamptz, "update_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:58:14.870 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "user" ("id" bigserial, "account" text, "avatar_url" text, "company_id" bigint, "admin_type" bigint, "name" text, "email" text, "status" bigint, "department_id" jsonb, "position_id" jsonb, "update_at" timestamptz, "create_at" timestamptz, "delete_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:58:14.897 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "received_message" ("message_id" bigserial, "message_type" text, "message_body" text, "occurred_on" timestamptz, "create_at" timestamptz, PRIMARY KEY ("message_id")) null
2022/11/10 15:58:14.924 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role" ("id" bigserial, "name" text, "type" bigint, "description" text, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:58:14.952 [D] [hook.go:130] performance COMMENT ON TABLE public."role" IS '角色'; null
2022/11/10 15:58:14.979 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".id IS 'ID'; null
2022/11/10 15:58:15.006 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".name IS '角色名称'; null
2022/11/10 15:58:15.033 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".type IS '角色类型(0角色可删、1系统预置角色不可删)'; null
2022/11/10 15:58:15.060 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".description IS '角色描述'; null
2022/11/10 15:58:15.087 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".company_id IS '公司ID'; null
2022/11/10 15:58:15.114 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".created_at IS '创建时间'; null
2022/11/10 15:58:15.141 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".updated_at IS '更新时间'; null
2022/11/10 15:58:15.168 [D] [hook.go:130] performance COMMENT ON COLUMN public."role".deleted_at IS '删除时间'; null
2022/11/10 15:58:15.194 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "role_user" ("id" bigserial, "role_id" bigint, "user_id" bigint, "company_id" bigint, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:58:15.222 [D] [hook.go:130] performance COMMENT ON TABLE public."role_user" IS '角色用户关系'; null
2022/11/10 15:58:15.249 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".id IS 'ID'; null
2022/11/10 15:58:15.275 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".role_id IS '角色ID'; null
2022/11/10 15:58:15.302 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".user_id IS '用户ID'; null
2022/11/10 15:58:15.329 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".company_id IS '公司ID'; null
2022/11/10 15:58:15.356 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".created_at IS '创建时间'; null
2022/11/10 15:58:15.383 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".updated_at IS '更新时间'; null
2022/11/10 15:58:15.409 [D] [hook.go:130] performance COMMENT ON COLUMN public."role_user".deleted_at IS '删除时间'; null
2022/11/10 15:58:15.435 [D] [hook.go:130] performance CREATE TABLE IF NOT EXISTS "positions" ("id" bigserial, "company_id" bigint, "name" text, "parent_id" bigint, "path" text, "level" bigint, "remarks" text, "created_at" timestamptz, "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id")) null
2022/11/10 15:58:15.450 [I] [???:0] performance http server Running on http://:8082
2022/11/10 15:58:16.194 [E] [asm_amd64.s:1594] performance kafka: client has run out of available brokers to talk to (Is your cluster reachable?) []
...
...
go_build_main_go
查看文件 @
0010229
不能预览此文件类型
pkg/infrastructure/pg/init.go
查看文件 @
0010229
...
...
@@ -33,6 +33,7 @@ func init() {
&
models
.
ReceivedMessage
{},
&
models
.
Role
{},
&
models
.
RoleUser
{},
&
models
.
Positions
{},
}
for
_
,
model
:=
range
tables
{
err
:=
DB
.
Model
(
model
)
.
CreateTable
(
&
orm
.
CreateTableOptions
{
...
...
pkg/infrastructure/pg/models/comapny.go
查看文件 @
0010229
...
...
@@ -11,5 +11,5 @@ type Company struct {
Status
int
//公司状态,1正常 2禁用
UpdateAt
time
.
Time
//更新时间
CreateAt
time
.
Time
//创建时间
DeleteAt
*
time
.
Time
//删除时间
DeleteAt
*
time
.
Time
`bun:",soft_delete"`
//删除时间
}
...
...
pkg/infrastructure/pg/models/department.go
查看文件 @
0010229
...
...
@@ -15,5 +15,5 @@ type Department struct {
Path
string
// 组织路径
CreateAt
time
.
Time
// 创建时间
UpdateAt
time
.
Time
// 更新时间
DeleteAt
*
time
.
Time
// 删除时间
DeleteAt
*
time
.
Time
`bun:",soft_delete"`
// 删除时间
}
...
...
pkg/infrastructure/pg/models/positions.go
0 → 100644
查看文件 @
0010229
package
models
import
"time"
type
Positions
struct
{
Id
int64
//ID
CompanyId
int64
//公司ID
Name
string
//职位名称
ParentId
int64
//父级职位
Path
string
//职位路径
Level
int
//层级
Remarks
string
//备注
CreatedAt
time
.
Time
UpdatedAt
time
.
Time
DeletedAt
*
time
.
Time
`bun:",soft_delete"`
}
...
...
pkg/infrastructure/pg/models/user.go
查看文件 @
0010229
...
...
@@ -12,8 +12,9 @@ type User struct {
Name
string
// 用户姓名
Email
string
// 邮箱
Status
int
// 用户状态(1正常 2禁用)
DepartmentId
[]
int
// 用户归属的部门
DepartmentId
[]
int64
// 用户归属的部门
PositionId
[]
int64
// 用户职位
UpdateAt
time
.
Time
// 更新时间
CreateAt
time
.
Time
// 创建时间
DeleteAt
*
time
.
Time
// 删除时间
DeleteAt
*
time
.
Time
`bun:",soft_delete"`
// 删除时间
}
...
...
请
注册
或
登录
后发表评论