1
use crate::tests_models::league::League;
2
use canyon_sql::{date_time::NaiveDate, macros::*};
3

            
4
61
#[derive(Debug, Clone, Fields, CanyonCrud, CanyonMapper, Eq, PartialEq)]
5
#[canyon_entity]
6
pub struct Tournament {
7
    #[primary_key]
8
    id: i32,
9
    ext_id: i64,
10
    slug: String,
11
    start_date: NaiveDate,
12
    end_date: NaiveDate,
13
    #[foreign_key(table = "league", column = "id")]
14
    league: i32,
15
}