mirror of
https://shylinux.com/x/enterprise
synced 2025-04-25 17:18:06 +08:00
add some
This commit is contained in:
parent
ea1d354e02
commit
cde3aeb19c
@ -20,23 +20,16 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type UserRepos struct {
|
type UserRepos struct {
|
||||||
db.ModelWithUID
|
db.ModelUserPlace
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
ReposUID string `gorm:"type:char(32);index"`
|
ReposUID string `gorm:"type:char(32);index"`
|
||||||
Role uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Repos struct {
|
type Repos struct {
|
||||||
db.ModelWithUID
|
db.ModelPlace
|
||||||
CompanyUID string `gorm:"type:char(32);index"`
|
CompanyUID string `gorm:"type:char(32);index"`
|
||||||
Name string `gorm:"type:varchar(64)"`
|
|
||||||
Type uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Release struct {
|
type Release struct {
|
||||||
db.ModelWithUID
|
db.ModelContent
|
||||||
ReposUID string `gorm:"type:char(32);index"`
|
ReposUID string `gorm:"type:char(32);index"`
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
Title string `gorm:"type:varchar(64)"`
|
|
||||||
Content string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { db.CmdModels("", &UserRepos{}, &Repos{}, &Release{}) }
|
func init() { db.CmdModels("", &UserRepos{}, &Repos{}, &Release{}) }
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"portal": "系统开发",
|
"portal": "系统开发",
|
||||||
"placeCreate": "创建项目",
|
|
||||||
"placeRemove": "删除项目",
|
|
||||||
"member": "项目成员",
|
"member": "项目成员",
|
||||||
"release": "版本发布",
|
"release": "版本发布",
|
||||||
"icons": {
|
"icons": {
|
||||||
|
@ -1,43 +1,8 @@
|
|||||||
package development
|
package development
|
||||||
|
|
||||||
import (
|
import "shylinux.com/x/ice"
|
||||||
"shylinux.com/x/ice"
|
|
||||||
|
|
||||||
"shylinux.com/x/enterprise/src/development/model"
|
type userRepos struct{ Table }
|
||||||
)
|
|
||||||
|
|
||||||
type userRepos struct {
|
|
||||||
Table
|
|
||||||
repos repos
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s userRepos) User(m *ice.Message, arg ...string) {
|
|
||||||
s.FieldsWithCreatedAT(m, s, model.USER_UID, model.ROLE)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.REPOS_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.REPOS_UID, arg[0], model.UID, arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
m.RenameAppend(model.ROLE, model.USER_REPOS_ROLE)
|
|
||||||
s.SelectJoinUser(m)
|
|
||||||
}
|
|
||||||
func (s userRepos) List(m *ice.Message, arg ...string) {
|
|
||||||
s.Tables(m, s.repos).FieldsWithCreatedAT(m, s,
|
|
||||||
model.REPOS_NAME, model.REPOS_TYPE, model.USER_REPOS_ROLE,
|
|
||||||
model.COMPANY_UID, model.REPOS_UID,
|
|
||||||
)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.USER_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.USER_UID, arg[0], model.REPOS_UID, arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.SelectJoinCompany(m)
|
|
||||||
s.SelectJoinCity(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userRepos{}) }
|
func init() { ice.TeamCtxCmd(userRepos{}) }
|
||||||
|
|
||||||
|
@ -54,17 +54,12 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type UserStore struct {
|
type UserStore struct {
|
||||||
db.ModelWithUID
|
db.ModelUserPlace
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
StoreUID string `gorm:"type:char(32);index"`
|
StoreUID string `gorm:"type:char(32);index"`
|
||||||
Role uint8 `gorm:"default:0"`
|
|
||||||
Init uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Store struct {
|
type Store struct {
|
||||||
db.ModelWithUID
|
db.ModelPlace
|
||||||
CompanyUID string `gorm:"type:char(32);index"`
|
CompanyUID string `gorm:"type:char(32);index"`
|
||||||
Name string `gorm:"type:varchar(64)"`
|
|
||||||
Type uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Shop struct {
|
type Shop struct {
|
||||||
db.ModelWithUID
|
db.ModelWithUID
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"portal": "供应链", "placeCreate": "创建生意", "placeRemove": "删除生意",
|
"portal": "供应链",
|
||||||
"goods": "商品", "sell": "出货", "purchase": "进货", "expense": "开支",
|
"goods": "商品", "sell": "出货", "purchase": "进货", "expense": "开支",
|
||||||
"payment": "付款", "express": "寄货", "return": "退贷", "refund": "退款",
|
"payment": "付款", "express": "寄货", "return": "退贷", "refund": "退款",
|
||||||
"process": "生产", "again": "再来一单",
|
"process": "生产", "again": "再来一单",
|
||||||
|
@ -1,44 +1,8 @@
|
|||||||
package gongyinglian
|
package gongyinglian
|
||||||
|
|
||||||
import (
|
import "shylinux.com/x/ice"
|
||||||
"shylinux.com/x/ice"
|
|
||||||
|
|
||||||
"shylinux.com/x/enterprise/src/gongyinglian/model"
|
type userStore struct{ Table }
|
||||||
)
|
|
||||||
|
|
||||||
type userStore struct {
|
|
||||||
Table
|
|
||||||
store store
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s userStore) User(m *ice.Message, arg ...string) {
|
|
||||||
s.FieldsWithCreatedAT(m, s, model.USER_UID, model.ROLE)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.STORE_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.STORE_UID, arg[0], model.UID, arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
m.RenameAppend(model.ROLE, model.USER_STORE_ROLE)
|
|
||||||
s.SelectJoinUser(m)
|
|
||||||
}
|
|
||||||
func (s userStore) List(m *ice.Message, arg ...string) {
|
|
||||||
s.Tables(m, s.store).FieldsWithCreatedAT(m, s,
|
|
||||||
model.STORE_NAME, model.STORE_TYPE, model.USER_STORE_ROLE,
|
|
||||||
model.COMPANY_UID, model.STORE_UID,
|
|
||||||
model.INIT,
|
|
||||||
)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.USER_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.USER_UID, arg[0], s.Key(s, model.STORE_UID), arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.SelectJoinCompany(m)
|
|
||||||
s.SelectJoinCity(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userStore{}) }
|
func init() { ice.TeamCtxCmd(userStore{}) }
|
||||||
|
|
||||||
|
@ -20,29 +20,19 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type UserGroup struct {
|
type UserGroup struct {
|
||||||
db.ModelWithUID
|
db.ModelUserPlace
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
GroupUID string `gorm:"type:char(32);index"`
|
GroupUID string `gorm:"type:char(32);index"`
|
||||||
Role uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Group struct {
|
type Group struct {
|
||||||
db.ModelWithUID
|
db.ModelPlace
|
||||||
CompanyUID string `gorm:"type:char(32);index"`
|
CompanyUID string `gorm:"type:char(32);index"`
|
||||||
Name string `gorm:"type:varchar(64)"`
|
|
||||||
Type uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Company struct {
|
type Company struct {
|
||||||
db.ModelWithUID
|
db.ModelStreet
|
||||||
CityUID string `gorm:"type:char(32);index:idx_city"`
|
|
||||||
Name string `gorm:"type:varchar(64);index:idx_city"`
|
|
||||||
Info string
|
|
||||||
}
|
}
|
||||||
type Target struct {
|
type Target struct {
|
||||||
db.ModelWithUID
|
db.ModelContent
|
||||||
GroupUID string `gorm:"type:char(32);index"`
|
GroupUID string `gorm:"type:char(32);index"`
|
||||||
UserUID string `gorm:"type:char(32)"`
|
|
||||||
Title string `gorm:"type:varchar(64)"`
|
|
||||||
Content string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { db.CmdModels("", &UserGroup{}, &Group{}, &Company{}, &Target{}) }
|
func init() { db.CmdModels("", &UserGroup{}, &Group{}, &Company{}, &Target{}) }
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"portal": "管理系统",
|
"portal": "管理系统",
|
||||||
"placeCreate": "创建团队",
|
|
||||||
"placeRemove": "退出团队",
|
|
||||||
"target": "目标计划",
|
"target": "目标计划",
|
||||||
"member": "团队成员",
|
"member": "团队成员",
|
||||||
"icons": {
|
"icons": {
|
||||||
|
@ -1,43 +1,8 @@
|
|||||||
package guanlixitong
|
package guanlixitong
|
||||||
|
|
||||||
import (
|
import "shylinux.com/x/ice"
|
||||||
"shylinux.com/x/ice"
|
|
||||||
|
|
||||||
"shylinux.com/x/enterprise/src/guanlixitong/model"
|
type userGroup struct{ Table }
|
||||||
)
|
|
||||||
|
|
||||||
type userGroup struct {
|
|
||||||
Table
|
|
||||||
group group
|
|
||||||
company company
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s userGroup) User(m *ice.Message, arg ...string) {
|
|
||||||
s.FieldsWithCreatedAT(m, s, model.USER_UID, model.ROLE)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.GROUP_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.GROUP_UID, arg[0], model.UID, arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
m.RenameAppend(model.ROLE, model.USER_GROUP_ROLE)
|
|
||||||
s.SelectJoinUser(m)
|
|
||||||
}
|
|
||||||
func (s userGroup) List(m *ice.Message, arg ...string) {
|
|
||||||
s.Tables(m, s.group, s.company).FieldsWithCreatedAT(m, s,
|
|
||||||
model.GROUP_NAME, model.GROUP_TYPE, model.USER_GROUP_ROLE,
|
|
||||||
model.CITY_UID, model.COMPANY_NAME, model.GROUP_UID,
|
|
||||||
)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.USER_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.USER_UID, arg[0], s.Key(s, model.GROUP_UID), arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.SelectJoinCity(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userGroup{Table: NewTable(userGroup{}, group{})}) }
|
func init() { ice.TeamCtxCmd(userGroup{Table: NewTable(userGroup{}, group{})}) }
|
||||||
|
|
||||||
|
@ -20,23 +20,16 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type UserCloud struct {
|
type UserCloud struct {
|
||||||
db.ModelWithUID
|
db.ModelUserPlace
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
CloudUID string `gorm:"type:char(32);index"`
|
CloudUID string `gorm:"type:char(32);index"`
|
||||||
Role uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Cloud struct {
|
type Cloud struct {
|
||||||
db.ModelWithUID
|
db.ModelPlace
|
||||||
CompanyUID string `gorm:"type:char(32);index"`
|
CompanyUID string `gorm:"type:char(32);index"`
|
||||||
Name string `gorm:"type:varchar(64)"`
|
|
||||||
Type uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Publish struct {
|
type Publish struct {
|
||||||
db.ModelWithUID
|
db.ModelContent
|
||||||
CloudUID string `gorm:"type:char(32);index"`
|
CloudUID string `gorm:"type:char(32);index"`
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
Title string `gorm:"type:varchar(64)"`
|
|
||||||
Content string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { db.CmdModels("", &UserCloud{}, &Cloud{}, &Publish{}) }
|
func init() { db.CmdModels("", &UserCloud{}, &Cloud{}, &Publish{}) }
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"portal": "系统运维",
|
"portal": "系统运维",
|
||||||
"placeCreate": "创建集群",
|
|
||||||
"placeRemove": "删除集群",
|
|
||||||
"publish": "系统发布",
|
"publish": "系统发布",
|
||||||
"icons": {
|
"icons": {
|
||||||
"publish": "https://img.icons8.com/officel/80/activity-grid.png"
|
"publish": "https://img.icons8.com/officel/80/activity-grid.png"
|
||||||
|
@ -1,43 +1,8 @@
|
|||||||
package operation
|
package operation
|
||||||
|
|
||||||
import (
|
import "shylinux.com/x/ice"
|
||||||
"shylinux.com/x/ice"
|
|
||||||
|
|
||||||
"shylinux.com/x/enterprise/src/operation/model"
|
type userCloud struct{ Table }
|
||||||
)
|
|
||||||
|
|
||||||
type userCloud struct {
|
|
||||||
Table
|
|
||||||
cloud cloud
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s userCloud) User(m *ice.Message, arg ...string) {
|
|
||||||
s.FieldsWithCreatedAT(m, s, model.USER_UID, model.ROLE)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.CLOUD_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.CLOUD_UID, arg[0], model.UID, arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
m.RenameAppend(model.ROLE, model.USER_CLOUD_ROLE)
|
|
||||||
s.SelectJoinUser(m)
|
|
||||||
}
|
|
||||||
func (s userCloud) List(m *ice.Message, arg ...string) {
|
|
||||||
s.Tables(m, s.cloud).FieldsWithCreatedAT(m, s,
|
|
||||||
model.CLOUD_NAME, model.CLOUD_TYPE, model.USER_CLOUD_ROLE,
|
|
||||||
model.COMPANY_UID, model.CLOUD_UID,
|
|
||||||
)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.USER_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.USER_UID, arg[0], s.Key(s, model.CLOUD_UID), arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.SelectJoinCompany(m)
|
|
||||||
s.SelectJoinCity(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userCloud{}) }
|
func init() { ice.TeamCtxCmd(userCloud{}) }
|
||||||
|
|
||||||
|
@ -14,30 +14,22 @@ const (
|
|||||||
CHANNEL_UID = "channel_uid"
|
CHANNEL_UID = "channel_uid"
|
||||||
CHANNEL_NAME = "channel_name"
|
CHANNEL_NAME = "channel_name"
|
||||||
CHANNEL_TYPE = "channel_type"
|
CHANNEL_TYPE = "channel_type"
|
||||||
PROMOTION_UID = "_uid"
|
PROMOTION_UID = "promotion_uid"
|
||||||
COMPANY_UID = "company_uid"
|
COMPANY_UID = "company_uid"
|
||||||
CITY_UID = "city_uid"
|
CITY_UID = "city_uid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserChannel struct {
|
type UserChannel struct {
|
||||||
db.ModelWithUID
|
db.ModelUserPlace
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
ChannelUID string `gorm:"type:char(32);index"`
|
ChannelUID string `gorm:"type:char(32);index"`
|
||||||
Role uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Channel struct {
|
type Channel struct {
|
||||||
db.ModelWithUID
|
db.ModelPlace
|
||||||
CompanyUID string `gorm:"type:char(32);index"`
|
CompanyUID string `gorm:"type:char(32);index"`
|
||||||
Name string `gorm:"type:varchar(64)"`
|
|
||||||
Type uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Promotion struct {
|
type Promotion struct {
|
||||||
db.ModelWithUID
|
db.ModelContent
|
||||||
ChannelUID string `gorm:"type:char(32);index"`
|
ChannelUID string `gorm:"type:char(32);index"`
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
Title string `gorm:"type:varchar(64)"`
|
|
||||||
Content string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func init() { db.CmdModels("", &UserChannel{}, &Channel{}, &Promotion{}) }
|
func init() { db.CmdModels("", &UserChannel{}, &Channel{}, &Promotion{}) }
|
@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"portal": "市场营销",
|
"portal": "市场营销",
|
||||||
"placeCreate": "创建场景",
|
|
||||||
"placeRemove": "删除场景",
|
|
||||||
"": "场景应用",
|
"": "场景应用",
|
||||||
"icons": {
|
"icons": {
|
||||||
"": "https://img.icons8.com/officel/80/activity-grid.png"
|
"": "https://img.icons8.com/officel/80/activity-grid.png"
|
||||||
|
@ -1,43 +1,8 @@
|
|||||||
package shichangyingxiao
|
package shichangyingxiao
|
||||||
|
|
||||||
import (
|
import "shylinux.com/x/ice"
|
||||||
"shylinux.com/x/ice"
|
|
||||||
|
|
||||||
"shylinux.com/x/enterprise/src/shichangyingxiao/model"
|
type userChannel struct{ Table }
|
||||||
)
|
|
||||||
|
|
||||||
type userChannel struct {
|
|
||||||
Table
|
|
||||||
channel channel
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s userChannel) User(m *ice.Message, arg ...string) {
|
|
||||||
s.FieldsWithCreatedAT(m, s, model.USER_UID, model.ROLE)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.CHANNEL_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.CHANNEL_UID, arg[0], model.UID, arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
m.RenameAppend(model.ROLE, model.USER_CHANNEL_ROLE)
|
|
||||||
s.SelectJoinUser(m)
|
|
||||||
}
|
|
||||||
func (s userChannel) List(m *ice.Message, arg ...string) {
|
|
||||||
s.Tables(m, s.channel).FieldsWithCreatedAT(m, s,
|
|
||||||
model.CHANNEL_NAME, model.CHANNEL_TYPE, model.USER_CHANNEL_ROLE,
|
|
||||||
model.COMPANY_UID, model.CHANNEL_UID,
|
|
||||||
)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.USER_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.USER_UID, arg[0], s.Key(s, model.CHANNEL_UID), arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.SelectJoinCompany(m)
|
|
||||||
s.SelectJoinCity(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userChannel{}) }
|
func init() { ice.TeamCtxCmd(userChannel{}) }
|
||||||
|
|
||||||
|
@ -14,30 +14,22 @@ const (
|
|||||||
INVESTOR_UID = "investor_uid"
|
INVESTOR_UID = "investor_uid"
|
||||||
INVESTOR_NAME = "investor_name"
|
INVESTOR_NAME = "investor_name"
|
||||||
INVESTOR_TYPE = "investor_type"
|
INVESTOR_TYPE = "investor_type"
|
||||||
INVESTMENT_UID = "_uid"
|
INVESTMENT_UID = "investment_uid"
|
||||||
COMPANY_UID = "company_uid"
|
COMPANY_UID = "company_uid"
|
||||||
CITY_UID = "city_uid"
|
CITY_UID = "city_uid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserInvestor struct {
|
type UserInvestor struct {
|
||||||
db.ModelWithUID
|
db.ModelUserPlace
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
InvestorUID string `gorm:"type:char(32);index"`
|
InvestorUID string `gorm:"type:char(32);index"`
|
||||||
Role uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Investor struct {
|
type Investor struct {
|
||||||
db.ModelWithUID
|
db.ModelPlace
|
||||||
CompanyUID string `gorm:"type:char(32);index"`
|
CompanyUID string `gorm:"type:char(32);index"`
|
||||||
Name string `gorm:"type:varchar(64)"`
|
|
||||||
Type uint8 `gorm:"default:0"`
|
|
||||||
}
|
}
|
||||||
type Investment struct {
|
type Investment struct {
|
||||||
db.ModelWithUID
|
db.ModelContent
|
||||||
InvestorUID string `gorm:"type:char(32);index"`
|
InvestorUID string `gorm:"type:char(32);index"`
|
||||||
UserUID string `gorm:"type:char(32);index"`
|
|
||||||
Title string `gorm:"type:varchar(64)"`
|
|
||||||
Content string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func init() { db.CmdModels("", &UserInvestor{}, &Investor{}, &Investment{}) }
|
func init() { db.CmdModels("", &UserInvestor{}, &Investor{}, &Investment{}) }
|
@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"portal": "资金链",
|
"portal": "资金链",
|
||||||
"placeCreate": "创建场景",
|
|
||||||
"placeRemove": "删除场景",
|
|
||||||
"": "场景应用",
|
"": "场景应用",
|
||||||
"icons": {
|
"icons": {
|
||||||
"": "https://img.icons8.com/officel/80/activity-grid.png"
|
"": "https://img.icons8.com/officel/80/activity-grid.png"
|
||||||
|
@ -1,43 +1,8 @@
|
|||||||
package zijinlian
|
package zijinlian
|
||||||
|
|
||||||
import (
|
import "shylinux.com/x/ice"
|
||||||
"shylinux.com/x/ice"
|
|
||||||
|
|
||||||
"shylinux.com/x/enterprise/src/zijinlian/model"
|
type userInvestor struct{ Table }
|
||||||
)
|
|
||||||
|
|
||||||
type userInvestor struct {
|
|
||||||
Table
|
|
||||||
investor investor
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s userInvestor) User(m *ice.Message, arg ...string) {
|
|
||||||
s.FieldsWithCreatedAT(m, s, model.USER_UID, model.ROLE)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.INVESTOR_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.INVESTOR_UID, arg[0], model.UID, arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
m.RenameAppend(model.ROLE, model.USER_INVESTOR_ROLE)
|
|
||||||
s.SelectJoinUser(m)
|
|
||||||
}
|
|
||||||
func (s userInvestor) List(m *ice.Message, arg ...string) {
|
|
||||||
s.Tables(m, s.investor).FieldsWithCreatedAT(m, s,
|
|
||||||
model.INVESTOR_NAME, model.INVESTOR_TYPE, model.USER_INVESTOR_ROLE,
|
|
||||||
model.COMPANY_UID, model.INVESTOR_UID,
|
|
||||||
)
|
|
||||||
if len(arg) == 1 {
|
|
||||||
s.Select(m, model.USER_UID, arg[0])
|
|
||||||
} else if len(arg) == 2 {
|
|
||||||
s.SelectDetail(m, model.USER_UID, arg[0], s.Key(s, model.INVESTOR_UID), arg[1])
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
s.SelectJoinCompany(m)
|
|
||||||
s.SelectJoinCity(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(userInvestor{}) }
|
func init() { ice.TeamCtxCmd(userInvestor{}) }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user