<commit_before>//
// Copyright (c) 2016 <NAME>
//
// This file is part of Clashr.
//
// Clashr is free software: you can redistribute it and/or modify it under the
// terms of the GNU Affero General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option)
// any later version.
//
// Clashr is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for
// more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with Clashr.  If not, see <http://www.gnu.org/licenses/>.
//

package models

import "time"

type Challenge struct {
	Id      int       `json:"-" xorm:"pk autoincr not null"`
	Name    string    `json:"name" xorm:"unique"`
	Details string    `json:"details" xorm:"text"`
	Tests   []Test    `json:"-" xorm:"-"`
	Upload  time.Time `json:"upload" db:"upload_date"`
}

type Challenges []Challenge

type Test struct {
	Id          int    `xorm: pk autoincr`
	Input       string `xorm: text`
	Output      string `xorm: text`
	ChallengeId int
}<commit_msg>models: remove all XORM code<commit_after>//
// Copyright (c) 2016 <NAME>
//
// This file is part of Clashr.
//
// Clashr is free software: you can redistribute it and/or modify it under the
// terms of the GNU Affero General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option)
// any later version.
//
// Clashr is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for
// more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with Clashr.  If not, see <http://www.gnu.org/licenses/>.
//

package models

import "time"

type Challenge struct {
	Id      int       `json:"-"`
	Name    string    `json:"name"`
	Details string    `json:"details"`
	Tests   []Test    `json:"-"`
	Upload  time.Time `json:"upload" db:"upload_date"`
}

type Challenges []Challenge

type Test struct {
	Id          int
	Input       string
	Output      string
	ChallengeId int
}
{'fraction_non_alphanumeric': 0.10165886856656742, 'fraction_numerical': 0.004253509145044662, 'mean_word_length': 3.0205128205128204, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4471446', 'n_tokens_mistral': 695, 'n_tokens_neox': 675, 'n_words': 312}