Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
admin-backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
admin-backend
Commits
5c682e14
Commit
5c682e14
authored
Mar 21, 2024
by
brent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify id
parent
098c045c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
11 deletions
+25
-11
task.go
controllers/task.go
+13
-0
app.go
models/app.go
+2
-2
funds.go
models/funds.go
+1
-1
task.go
models/task.go
+6
-5
user.go
models/user.go
+2
-2
whitelist.go
models/whitelist.go
+1
-1
No files found.
controllers/task.go
View file @
5c682e14
...
...
@@ -2243,6 +2243,19 @@ func (server *TaskController) GetLevelsByTypeId() {
server
.
respond
(
http
.
StatusOK
,
""
,
types
)
}
func
(
server
*
TaskController
)
AllCategorys
()
{
var
category
[]
*
models
.
Category
qs
:=
mysql
.
GetMysqlInstace
()
.
Ormer
.
QueryTable
(
"category"
)
.
Filter
(
"deleted"
,
0
)
.
OrderBy
(
"sort"
)
count
,
_
:=
qs
.
Count
()
logs
.
Debug
(
"types = "
,
count
)
if
count
>
0
{
qs
.
All
(
&
category
)
}
server
.
respond
(
http
.
StatusOK
,
""
,
category
)
}
func
(
server
*
TaskController
)
Enumeration
()
{
_
,
err
:=
server
.
Check
()
if
err
!=
nil
{
...
...
models/app.go
View file @
5c682e14
...
...
@@ -16,7 +16,7 @@ import (
//}
type
ApiKey
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
Name
string
`json:"name,omitempty";orm:"column(name)"`
ApiKey
string
`json:"api_key";orm:"column(api_key);size(255)"`
ApiKeyId
string
`json:"api_key_id";orm:"column(api_key_id);size(255)"`
...
...
@@ -27,7 +27,7 @@ type ApiKey struct {
}
type
JwtToken
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
Name
string
`json:"name,omitempty";orm:"column(name)"`
JwtCredential
string
`json:"jwt_credential,omitempty";orm:"column(jwt_credential)"`
JwtToken
string
`json:"jwt_token";orm:"column(jwt_token)"`
...
...
models/funds.go
View file @
5c682e14
...
...
@@ -210,7 +210,7 @@ type ChargeRequest struct {
}
type
ChargeRecord
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
UserId
int
`json:"user_id";orm:"column(user_id)"`
Amount
int64
`json:"amount";orm:"column(amount);size(7)"`
PayMethod
int
`json:"pay_method";orm:"column(pay_method);size(1)"`
...
...
models/task.go
View file @
5c682e14
...
...
@@ -32,16 +32,17 @@ type ExampleType struct {
}
type
Category
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
Desc
string
`json:"desc";orm:"column(desc);size(20)"`
EnDesc
string
`json:"en_desc";orm:"column(en_desc);size(20)"`
Sort
int
`json:"sort";orm:"column(sort)"`
CreatedTime
time
.
Time
`json:"created_time";orm:"column(created_time);type(datetime)"`
UpdatedTime
time
.
Time
`json:"updated_time";orm:"column(updated_time);type(datetime)"`
Deleted
int
`json:"deleted";orm:"column(deleted);size(1)"`
}
type
Computility
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
Model
string
`json:"model";orm:"column(model)"`
Series
string
`json:"series";orm:"column(series)"`
Cuda
string
`json:"cuda";orm:"column(cuda)"`
...
...
@@ -56,7 +57,7 @@ type Computility struct {
}
type
TaskType
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
Name
string
`json:"name";orm:"column(name);size(20)"`
Version
string
`json:"version,omitempty";orm:"column(version)"`
Desc
string
`json:"desc";orm:"column(desc);size(20)"`
...
...
@@ -93,7 +94,7 @@ type TaskType struct {
}
type
NewTaskType
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
Name
string
`json:"name";orm:"column(desc)"`
BaseModel
string
`json:"base_model";orm:"column(desc)"`
Model
string
`json:"model";orm:"column(model)"`
...
...
@@ -133,7 +134,7 @@ type NewTaskType struct {
}
type
Model
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
Tit
string
`json:"tit";orm:"column(tit);size(20)"`
Version
string
`json:"version,omitempty";orm:"column(version)"`
Content
string
`json:"content";orm:"column(content);size(20)"`
...
...
models/user.go
View file @
5c682e14
...
...
@@ -40,7 +40,7 @@ type LoginRequest struct {
}
type
UserLevel
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
Desc
string
`json:"desc";orm:"column(desc);size(20)"`
CreditQuota
int64
`json:"credit_quota";orm:"column(credit_quota)"`
FreeCallCountDay
int
`json:"free_call_count_day";orm:"column(free_call_count_day)"`
...
...
@@ -62,7 +62,7 @@ type UserLevel struct {
}
type
UserLevelTaskType
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
FreeCallCountDay
int
`json:"free_call_count_day"orm:"column(free_call_count_day)"`
FreeCallCountMonth
int
`json:"free_call_count_month"orm:"column(free_call_count_month)"`
FreeCallCountYear
int
`json:"free_call_count_year"orm:"column(free_call_count_year)"`
...
...
models/whitelist.go
View file @
5c682e14
...
...
@@ -3,7 +3,7 @@ package models
import
"time"
type
Whitelist
struct
{
Id
int
`orm:"column(id);auto"`
Id
int
`
json:"id";
orm:"column(id);auto"`
ProfitAddress
string
`json:"profit_address";orm:"column(profit_address)"`
NodeNum
int
`json:"node_num";orm:"column(node_num)"`
CreatedTime
time
.
Time
`json:"created_time";orm:"column(created_time);type(datetime)"`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment