Julio Biason
11 years ago
1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@
|
||||
from datetime import date |
||||
from pony.orm import * |
||||
|
||||
db = Database("sqlite", "lyrics.sqlite", create_db=True) |
||||
|
||||
class Artist(db.Entity): |
||||
name = Required(unicode) |
||||
songs = Set("Song") |
||||
|
||||
class Song(db.Entity): |
||||
artists = Set(Artist) |
||||
name = Required(unicode) |
||||
done = Optional(date) |
||||
youtube = Optional(unicode) |
||||
lyric = Required("Lyric") |
||||
|
||||
class Lyric(db.Entity): |
||||
text = Required(LongUnicode) |
||||
song = Required(Song) |
Loading…
Reference in new issue