generated from NSObjects/go-template
/
api.go
26 lines (23 loc) · 966 Bytes
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
*
* api.go
* model
*
* Created by lintao on 2024/1/2 11:21
* Copyright © 2020-2024 LINTAO. All rights reserved.
*
*/
package model
type API struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id" copier:"ID"`
Name string `gorm:"column:name;type:varchar(50);not null" json:"name" copier:"Name"`
Path string `gorm:"column:path;type:varchar(50);not null;uniqueIndex:udx_name_path" copier:"Path"`
Method string `gorm:"column:method;type:varchar(50);not null;uniqueIndex:udx_name_path" copier:"Method"`
Description string `gorm:"column:description;type:varchar(50);not null" json:"description"`
APIGroup string `gorm:"column:api_group;type:varchar(50);not null" json:"api_group"`
CreatedAt string `gorm:"column:created_at;type:varchar(50);not null" json:"created_at"`
UpdatedAt string `gorm:"column:updated_at;type:varchar(50);not null" json:"updated_at"`
}
func (API) TableName() string {
return "api"
}