mirror of
https://github.com/solero/houdini.git
synced 2024-12-22 13:33:39 +00:00
New igloo data models
This commit is contained in:
parent
28766b1e93
commit
4f20a05efc
68
Houdini/Data/Igloo.py
Normal file
68
Houdini/Data/Igloo.py
Normal file
@ -0,0 +1,68 @@
|
||||
from Houdini.Data import db
|
||||
|
||||
|
||||
class Flooring(db.Model):
|
||||
__tablename__ = 'flooring'
|
||||
|
||||
ID = db.Column(db.Integer, primary_key=True)
|
||||
Name = db.Column(db.String(50))
|
||||
Cost = db.Column(db.Integer, nullable=False, server_default=db.text("0"))
|
||||
Patched = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
|
||||
|
||||
|
||||
class Furniture(db.Model):
|
||||
__tablename__ = 'furniture'
|
||||
|
||||
ID = db.Column(db.Integer, primary_key=True)
|
||||
Name = db.Column(db.String(50), nullable=False)
|
||||
Type = db.Column(db.SmallInteger, nullable=False, server_default=db.text("1"))
|
||||
Sort = db.Column(db.SmallInteger, nullable=False, server_default=db.text("1"))
|
||||
Cost = db.Column(db.Integer, nullable=False, server_default=db.text("0"))
|
||||
Member = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
|
||||
Patched = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
|
||||
Bait = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
|
||||
MaxQuantity = db.Column(db.SmallInteger, nullable=False, server_default=db.text("100"))
|
||||
|
||||
|
||||
class Igloo(db.Model):
|
||||
__tablename__ = 'igloo'
|
||||
|
||||
ID = db.Column(db.Integer, primary_key=True)
|
||||
Name = db.Column(db.String(50), nullable=False)
|
||||
Cost = db.Column(db.SmallInteger, nullable=False, server_default=db.text("0"))
|
||||
Patched = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
|
||||
|
||||
|
||||
class IglooFurniture(db.Model):
|
||||
__tablename__ = 'igloo_furniture'
|
||||
|
||||
IglooID = db.Column(db.ForeignKey('penguin_igloo_room.ID', ondelete='CASCADE', onupdate='CASCADE'),
|
||||
primary_key=True, nullable=False, index=True)
|
||||
FurnitureID = db.Column(db.ForeignKey('furniture.ID', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||
nullable=False)
|
||||
X = db.Column(db.SmallInteger, primary_key=True, nullable=False, server_default=db.text("0"))
|
||||
Y = db.Column(db.SmallInteger, primary_key=True, nullable=False, server_default=db.text("0"))
|
||||
Frame = db.Column(db.SmallInteger, primary_key=True, nullable=False, server_default=db.text("0"))
|
||||
Rotation = db.Column(db.SmallInteger, primary_key=True, nullable=False, server_default=db.text("0"))
|
||||
|
||||
|
||||
class IglooLike(db.Model):
|
||||
__tablename__ = 'igloo_like'
|
||||
|
||||
IglooID = db.Column(db.ForeignKey('penguin_igloo_room.ID', ondelete='CASCADE', onupdate='CASCADE'),
|
||||
primary_key=True, nullable=False)
|
||||
OwnerID = db.Column(db.ForeignKey('penguin.ID', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||
nullable=False)
|
||||
PlayerID = db.Column(db.ForeignKey('penguin.ID', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
|
||||
nullable=False)
|
||||
Count = db.Column(db.SmallInteger, nullable=False)
|
||||
Date = db.Column(db.Date, nullable=False, server_default=db.text("now()"))
|
||||
|
||||
|
||||
class Location(db.Model):
|
||||
__tablename__ = 'location'
|
||||
|
||||
ID = db.Column(db.Integer, primary_key=True)
|
||||
Name = db.Column(db.String(50), nullable=False)
|
||||
Cost = db.Column(db.Integer, nullable=False, server_default=db.text("0"))
|
||||
Patched = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
|
Loading…
Reference in New Issue
Block a user