mirror of
https://shylinux.com/x/enterprise
synced 2025-04-25 01:08:04 +08:00
add some
This commit is contained in:
parent
9ac2c12d20
commit
58e41d24f3
@ -12,6 +12,6 @@ ish_miss_prepare_project
|
||||
ish_miss_prepare_contexts
|
||||
ish_miss_prepare_resource
|
||||
|
||||
ish_miss_prepare community
|
||||
# ish_miss_prepare community
|
||||
|
||||
ish_miss_make; [ -z "$*" ] || ish_miss_serve "$@"
|
||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module shylinux.com/x/enterprise
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
shylinux.com/x/community v0.0.4
|
||||
shylinux.com/x/community v0.0.5
|
||||
shylinux.com/x/ice v1.5.44
|
||||
shylinux.com/x/icebergs v1.9.44
|
||||
shylinux.com/x/mysql-story v0.6.18
|
||||
|
4
go.sum
4
go.sum
@ -178,8 +178,8 @@ gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde/go.mod h1:hbnx/Oo0ChWMn1BIhpy
|
||||
gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||
gorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg=
|
||||
gorm.io/gorm v1.25.11/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
|
||||
shylinux.com/x/community v0.0.4 h1:E52a1/MaeB/mnPo+GiKxtKINNTyN0JEcPZIJcRgxZmw=
|
||||
shylinux.com/x/community v0.0.4/go.mod h1:JDPG8S21VOKn5hoa2YdCp87MMpYv+6777ut8dHopww0=
|
||||
shylinux.com/x/community v0.0.5 h1:lo2SkTyuZHcXV7I4diakPe/n83AEb4nFfyfJXee58ao=
|
||||
shylinux.com/x/community v0.0.5/go.mod h1:QXbZEzEkPbCurkQxHb3fUwiTUa6YiR35BrlXUmcKTtk=
|
||||
shylinux.com/x/go-git/v5 v5.6.7 h1:WD5QSco7m3QooPCgdvQ6/GyGIFPun8C+hex5N41LYlk=
|
||||
shylinux.com/x/go-git/v5 v5.6.7/go.mod h1:Qb0lA+uIrofZg8NQerhYcJHgGWixFqvS6p3aJ/L5Nlk=
|
||||
shylinux.com/x/go-qrcode v0.0.3 h1:RMo+Vidbgq3HatLBj7DDXcTbTLFUwzis5K7TqBkD38U=
|
||||
|
@ -35,17 +35,6 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
})
|
||||
return s.Table.RewriteAppend(m)
|
||||
}
|
||||
func (s Table) CheckRole(m *ice.Message, arg ...string) *ice.Message {
|
||||
role := UserReposRole(kit.Int(m.Cmd(userRepos{}, s.Select, m.OptionSimple(model.REPOS_UID, model.USER_UID)).Append(model.ROLE)))
|
||||
m.WarnNotRight(!kit.IsIn(role.String(), append(arg, UserReposCreator.String())...), role.String())
|
||||
return m
|
||||
}
|
||||
func (s Table) recordEvent(m *ice.Message, info string, arg ...string) {
|
||||
s.Table.RecordEvent(m, m.Option(model.REPOS_UID), info, kit.Select(m.Option(model.UID), arg, 0))
|
||||
}
|
||||
func (s Table) recordEventWithName(m *ice.Message, info string, arg ...string) {
|
||||
s.Table.RecordEventWithName(m, m.Option(model.REPOS_UID), info)
|
||||
}
|
||||
|
||||
type Tables struct{ Table }
|
||||
|
||||
|
@ -6,10 +6,8 @@ import (
|
||||
)
|
||||
|
||||
type Portal struct {
|
||||
gonganxitong.Portal
|
||||
placeCreate string `name:"placeCreate city_name* company_name* repos_name*" role:"void"`
|
||||
guanlixitong.Portal
|
||||
placeCreate string `name:"placeCreate city_name* company_name* repos_type*:select repos_name*" role:"void"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
gonganxitong.PortalCmd(Portal{Portal: gonganxitong.NewPortal(userRepos{}, repos{}, guanlixitong.Company{})})
|
||||
}
|
||||
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userRepos{}, repos{})}) }
|
||||
|
@ -16,7 +16,7 @@ type release struct {
|
||||
|
||||
func (s release) Create(m *ice.Message, arg ...string) {
|
||||
s.Table.Create(m, kit.Simple(arg, m.OptionSimple(model.USER_UID, model.REPOS_UID))...)
|
||||
s.recordEventWithName(m, "")
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s release) List(m *ice.Message, arg ...string) {
|
||||
s.TablesWithRole(m, arg, s.userRepos, s.repos, s, model.TITLE, model.CONTENT).Display("")
|
||||
|
@ -1,27 +1,15 @@
|
||||
package development
|
||||
|
||||
import "shylinux.com/x/ice"
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
"shylinux.com/x/enterprise/src/guanlixitong"
|
||||
)
|
||||
|
||||
type userRepos struct{ Table }
|
||||
|
||||
func init() { ice.TeamCtxCmd(userRepos{}) }
|
||||
|
||||
type UserReposRole int
|
||||
type UserReposRole = guanlixitong.UserGroupRole
|
||||
|
||||
const (
|
||||
UserReposVisitor UserReposRole = iota
|
||||
UserReposCreator
|
||||
UserReposLeader
|
||||
UserReposWorker
|
||||
UserReposServer
|
||||
)
|
||||
|
||||
var UserReposRoleList = map[UserReposRole]string{
|
||||
UserReposVisitor: "visitor",
|
||||
UserReposCreator: "creator",
|
||||
UserReposLeader: "leader",
|
||||
UserReposWorker: "worker",
|
||||
UserReposServer: "server",
|
||||
}
|
||||
|
||||
func (s UserReposRole) String() string { return UserReposRoleList[s] }
|
||||
var UserReposRoleList = guanlixitong.UserGroupRoleList
|
||||
|
@ -3,8 +3,10 @@ package main
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
_ "shylinux.com/x/enterprise/src/development"
|
||||
_ "shylinux.com/x/enterprise/src/gongyinglian"
|
||||
_ "shylinux.com/x/enterprise/src/guanlixitong"
|
||||
_ "shylinux.com/x/enterprise/src/operation"
|
||||
_ "shylinux.com/x/enterprise/src/shichangyingxiao"
|
||||
_ "shylinux.com/x/enterprise/src/zijinlian"
|
||||
)
|
||||
|
@ -35,17 +35,6 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
})
|
||||
return s.Table.RewriteAppend(m)
|
||||
}
|
||||
func (s Table) CheckRole(m *ice.Message, arg ...string) *ice.Message {
|
||||
role := UserCloudRole(kit.Int(m.Cmd(userCloud{}, s.Select, m.OptionSimple(model.CLOUD_UID, model.USER_UID)).Append(model.ROLE)))
|
||||
m.WarnNotRight(!kit.IsIn(role.String(), append(arg, UserCloudCreator.String())...), role.String())
|
||||
return m
|
||||
}
|
||||
func (s Table) recordEvent(m *ice.Message, info string, arg ...string) {
|
||||
s.Table.RecordEvent(m, m.Option(model.CLOUD_UID), info, kit.Select(m.Option(model.UID), arg, 0))
|
||||
}
|
||||
func (s Table) recordEventWithName(m *ice.Message, info string, arg ...string) {
|
||||
s.Table.RecordEventWithName(m, m.Option(model.CLOUD_UID), info)
|
||||
}
|
||||
|
||||
type Tables struct{ Table }
|
||||
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
)
|
||||
|
||||
type Portal struct {
|
||||
gonganxitong.Portal
|
||||
guanlixitong.Portal
|
||||
placeCreate string `name:"placeCreate city_name* company_name* cloud_type*:select cloud_name*" role:"void"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
gonganxitong.PortalCmd(Portal{Portal: gonganxitong.NewPortal(userCloud{}, cloud{}, guanlixitong.Company{})})
|
||||
gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userCloud{}, cloud{})})
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ type publish struct {
|
||||
|
||||
func (s publish) Create(m *ice.Message, arg ...string) {
|
||||
s.Table.Create(m, kit.Simple(arg, m.OptionSimple(model.USER_UID, model.CLOUD_UID))...)
|
||||
s.recordEventWithName(m, "")
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s publish) List(m *ice.Message, arg ...string) {
|
||||
s.TablesWithRole(m, arg, s.userCloud, s.cloud, s, model.TITLE, model.CONTENT).Display("")
|
||||
|
@ -1,27 +1,15 @@
|
||||
package operation
|
||||
|
||||
import "shylinux.com/x/ice"
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
"shylinux.com/x/enterprise/src/guanlixitong"
|
||||
)
|
||||
|
||||
type userCloud struct{ Table }
|
||||
|
||||
func init() { ice.TeamCtxCmd(userCloud{}) }
|
||||
|
||||
type UserCloudRole int
|
||||
type UserCloudRole = guanlixitong.UserGroupRole
|
||||
|
||||
const (
|
||||
UserCloudVisitor UserCloudRole = iota
|
||||
UserCloudCreator
|
||||
UserCloudLeader
|
||||
UserCloudWorker
|
||||
UserCloudServer
|
||||
)
|
||||
|
||||
var UserCloudRoleList = map[UserCloudRole]string{
|
||||
UserCloudVisitor: "visitor",
|
||||
UserCloudCreator: "creator",
|
||||
UserCloudLeader: "leader",
|
||||
UserCloudWorker: "worker",
|
||||
UserCloudServer: "server",
|
||||
}
|
||||
|
||||
func (s UserCloudRole) String() string { return UserCloudRoleList[s] }
|
||||
var UserCloudRoleList = guanlixitong.UserGroupRoleList
|
||||
|
@ -1,40 +1,28 @@
|
||||
{
|
||||
"3b0ced2e41179097e594b91c3c36536b": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/person-at-home.png",
|
||||
"index": "web.team.operation.member",
|
||||
"name": "场景成员",
|
||||
"order": "80",
|
||||
"time": "2024-08-24 11:07:55.172"
|
||||
}
|
||||
},
|
||||
"53b0f8b9867485bb8864f2205e31897e": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/activity-grid.png",
|
||||
"index": "web.team.operation.service",
|
||||
"name": "服务发现",
|
||||
"order": "102",
|
||||
"time": "2024-08-24 11:07:55.179"
|
||||
}
|
||||
},
|
||||
"65c0459a8b23e672deebedb5c1c76fe5": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/activity-grid.png",
|
||||
"index": "web.team.operation.publish",
|
||||
"name": "系统发布",
|
||||
"order": "1",
|
||||
"time": "2024-08-27 09:10:02.041"
|
||||
}
|
||||
},
|
||||
"6ca4f1fc571350c2498bc5c1d7ac3563": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/qr-code.png",
|
||||
"index": "web.team.operation.qrcode",
|
||||
"name": "场景码",
|
||||
"order": "90",
|
||||
"role": "creator",
|
||||
"time": "2024-08-24 11:07:55.167"
|
||||
@ -42,10 +30,7 @@
|
||||
},
|
||||
"85c8678d4af08bb0c3e9560155b7c98f": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/property-with-timer.png",
|
||||
"index": "web.team.operation.event",
|
||||
"name": "事件流",
|
||||
"order": "91",
|
||||
"role": "creator",
|
||||
"time": "2024-08-24 11:07:55.172"
|
||||
@ -53,30 +38,21 @@
|
||||
},
|
||||
"b2d8434f3ab5340408f71c4bf087e3d9": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/multiple-smartphones.png",
|
||||
"index": "web.team.operation.recent",
|
||||
"name": "最近访问",
|
||||
"order": "101",
|
||||
"time": "2024-08-24 11:07:55.176"
|
||||
}
|
||||
},
|
||||
"ca74fb83cfd850b1ca03fe18976c253a": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/test-partial-passed.png",
|
||||
"index": "web.team.operation.message",
|
||||
"name": "消息待办",
|
||||
"order": "100",
|
||||
"time": "2024-08-24 11:07:55.173"
|
||||
}
|
||||
},
|
||||
"d47d5d11064235734413113c7440af7f": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/receipt-approved.png",
|
||||
"index": "web.team.operation.allow",
|
||||
"name": "权限审批",
|
||||
"order": "93",
|
||||
"role": "creator",
|
||||
"time": "2024-08-24 11:07:55.187"
|
||||
@ -84,20 +60,14 @@
|
||||
},
|
||||
"ec25b5c62a4d26688fe114d9b25f7a56": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/customer-support.png",
|
||||
"index": "web.team.operation.support",
|
||||
"name": "客服支持",
|
||||
"order": "103",
|
||||
"time": "2024-08-24 11:07:55.187"
|
||||
}
|
||||
},
|
||||
"f7484dd174d63a6800f84d1fb5fbb584": {
|
||||
"meta": {
|
||||
"enable": "true",
|
||||
"icons": "https://img.icons8.com/officel/80/edit-property.png",
|
||||
"index": "web.team.operation.apply",
|
||||
"name": "权限申请",
|
||||
"order": "92",
|
||||
"role": "creator",
|
||||
"time": "2024-08-24 11:07:55.200"
|
||||
|
Loading…
x
Reference in New Issue
Block a user