You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

dataset.go 792 B

12345678910111213141516171819202122232425262728293031
  1. package models
  2. import (
  3. "code.gitea.io/gitea/modules/timeutil"
  4. )
  5. // Issue represents an issue or pull request of repository.
  6. type Dataset struct {
  7. ID int64 `xorm:"pk autoincr"`
  8. Title string `xorm:"INDEX NOT NULL"`
  9. Status int32 `xorm:"INDEX"`
  10. Category string
  11. Description string `xorm:"TEXT"`
  12. Download_times int64
  13. License string
  14. Task string
  15. Release_id int64 `xorm:"INDEX"`
  16. User_id int64 `xorm:"INDEX"`
  17. CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
  18. UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
  19. Attachments []*Attachment `xorm:"-"`
  20. }
  21. func CreateDataset(dataset *Dataset) (err error) {
  22. if _, err = x.Insert(dataset); err != nil {
  23. return err
  24. }
  25. return nil
  26. }