|
12345678910111213141516171819202122232425262728293031 |
- package models
-
- import (
- "code.gitea.io/gitea/modules/timeutil"
- )
-
- // Issue represents an issue or pull request of repository.
- type Dataset struct {
- ID int64 `xorm:"pk autoincr"`
- Title string `xorm:"INDEX NOT NULL"`
- Status int32 `xorm:"INDEX"`
- Category string
- Description string `xorm:"TEXT"`
- Download_times int64
- License string
- Task string
- Release_id int64 `xorm:"INDEX"`
- User_id int64 `xorm:"INDEX"`
- CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
- UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
-
- Attachments []*Attachment `xorm:"-"`
- }
-
- func CreateDataset(dataset *Dataset) (err error) {
- if _, err = x.Insert(dataset); err != nil {
- return err
- }
-
- return nil
- }
|