不吹不擂,你想要的Python面试都在这里了【315+道题】 (4)

from datetime import datetime 
from sqlalchemy.ext.declarative import declarative_base 
from sqlalchemy import Column, Integer, String, DateTime 

 Base = declarative_base()

 class UserInfo(Base):
 __tablename__ = 'userinfo'
 id = Column(Integer, primary_key=True, autoincrement=True)
 name = Column(String(64), unique=True)
 ctime = Column(DateTime, default=datetime.now())

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wpgsjf.html