package models

import "time"

type Photo struct {
	ID        uint32   `gorm:"primary_key"`
	File      string   `gorm:"not null"`
	Name      string   `gorm:"not null"`
	Checksum  string   `gorm:"unique;size:44;not null"`
	Author    *Account `gorm:"constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
	AuthorId  uint32
	Albums    []*Album `gorm:"many2many:album_photos"`
	CreatedAt time.Time
	UpdatedAt time.Time
}