User.ts 519 B

123456789101112131415161718192021222324252627282930
  1. import sequelize from "./sequelize";
  2. import Sequelize, { Model } from "sequelize";
  3. class User extends Model {
  4. userTelegramId!: number;
  5. isAuthenticated!: boolean;
  6. permanentBan!: boolean;
  7. public readonly updatedAt!: Date;
  8. }
  9. User.init({
  10. userTelegramId: {
  11. type: Sequelize.BIGINT
  12. },
  13. isAuthenticated: {
  14. type: Sequelize.BOOLEAN,
  15. defaultValue: false,
  16. field: "activated"
  17. },
  18. permanentBan: {
  19. type: Sequelize.BOOLEAN,
  20. defaultValue: false
  21. }
  22. }, {
  23. sequelize
  24. })
  25. export default User;